From e712cadb3afaab094f0d5f1ebded23673a1e468f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 7 Sep 2024 19:23:10 +0300 Subject: [PATCH 01/46] Spider queen antag v0.2 --- .../Components/DamageContactsComponent.cs | 16 +++++++++++++ .../Components/DamagedByContactComponent.cs | 10 +++++++- .../Damage/Systems/DamageContactsSystem.cs | 23 +++++++++++++++++-- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 3 +++ .../Entities/Objects/Misc/spider_web.yml | 23 ++++++++++++++++++- Resources/Prototypes/SS220/tags.yml | 7 ++++++ 6 files changed, 78 insertions(+), 4 deletions(-) diff --git a/Content.Shared/Damage/Components/DamageContactsComponent.cs b/Content.Shared/Damage/Components/DamageContactsComponent.cs index 4ae88db8d72bea..e3895de2534eb2 100644 --- a/Content.Shared/Damage/Components/DamageContactsComponent.cs +++ b/Content.Shared/Damage/Components/DamageContactsComponent.cs @@ -17,4 +17,20 @@ public sealed partial class DamageContactsComponent : Component /// [DataField("ignoreWhitelist")] public EntityWhitelist? IgnoreWhitelist; + + //SS220 Add ignore blacklist begin + /// + /// Entities that damaged by this entity + /// + [DataField] + public EntityWhitelist? IgnoreBlacklist; + //SS220 Add ignore blacklist end + + //SS220 Add stand still time begin + /// + /// How many seconds does a entity need to stand still to start taking damage + /// + [DataField] + public TimeSpan StandStillTime = TimeSpan.Zero; + //SS220 Add stand still time end } diff --git a/Content.Shared/Damage/Components/DamagedByContactComponent.cs b/Content.Shared/Damage/Components/DamagedByContactComponent.cs index bc86f1f5e2a158..59cceb713bccdb 100644 --- a/Content.Shared/Damage/Components/DamagedByContactComponent.cs +++ b/Content.Shared/Damage/Components/DamagedByContactComponent.cs @@ -3,7 +3,7 @@ namespace Content.Shared.Damage.Components; -[NetworkedComponent, RegisterComponent] +[NetworkedComponent, RegisterComponent, AutoGenerateComponentState] public sealed partial class DamagedByContactComponent : Component { [DataField("nextSecond", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)] @@ -11,4 +11,12 @@ public sealed partial class DamagedByContactComponent : Component [ViewVariables] public DamageSpecifier? Damage; + + //SS220 Add stand still time begin + [ViewVariables, AutoNetworkedField] + public TimeSpan LastMovement = TimeSpan.Zero; + + [DataField, ViewVariables, AutoNetworkedField] + public TimeSpan StandStillTime = TimeSpan.Zero; + //SS220 Add stand still time end } diff --git a/Content.Shared/Damage/Systems/DamageContactsSystem.cs b/Content.Shared/Damage/Systems/DamageContactsSystem.cs index 7728012bb42709..d0a37df2b2fc61 100644 --- a/Content.Shared/Damage/Systems/DamageContactsSystem.cs +++ b/Content.Shared/Damage/Systems/DamageContactsSystem.cs @@ -21,6 +21,9 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnEntityEnter); SubscribeLocalEvent(OnEntityExit); + + //SS220 Add stand still time + SubscribeLocalEvent(OnMove); } public override void Update(float frameTime) @@ -31,7 +34,8 @@ public override void Update(float frameTime) while (query.MoveNext(out var ent, out var damaged)) { - if (_timing.CurTime < damaged.NextSecond) + if (_timing.CurTime < damaged.NextSecond || + _timing.CurTime < damaged.LastMovement + damaged.StandStillTime) //SS220 Add stand still time continue; damaged.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); @@ -90,10 +94,25 @@ private void OnEntityEnter(EntityUid uid, DamageContactsComponent component, ref if (HasComp(otherUid)) return; - if (_whitelistSystem.IsWhitelistPass(component.IgnoreWhitelist, otherUid)) + if (_whitelistSystem.IsWhitelistPass(component.IgnoreWhitelist, otherUid) || + _whitelistSystem.IsBlacklistFail(component.IgnoreBlacklist, otherUid)) //SS220 Add ignore blacklist return; var damagedByContact = EnsureComp(otherUid); damagedByContact.Damage = component.Damage; + + //SS220 Add stand still time begin + damagedByContact.StandStillTime = component.StandStillTime; + Dirty(otherUid, damagedByContact); + //SS220 Add stand still time end + } + + //SS220 Add stand still time begin + private void OnMove(Entity ent, ref MoveEvent args) + { + var (uid, component) = ent; + component.LastMovement = _timing.CurTime; + Dirty(uid, component); } + //SS220 Add stand still time end } diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 01fa40a84eef20..16f1a2df3b0268 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -17,6 +17,8 @@ - type: InputMover - type: MobMover - type: HTN + rootTask: + task: SimpleHostileCompound - type: Sprite drawdepth: Mobs sprite: Mobs/Animals/spider.rsi @@ -93,6 +95,7 @@ tags: - CannotSuicide - DoorBumpOpener + - SpiderQueen - type: Tool # Open door from xeno.yml. speedModifier: 1.5 qualities: diff --git a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml index cf848fba0683df..1137c723b697e0 100644 --- a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml +++ b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml @@ -89,6 +89,16 @@ - type: SpeedModifierContacts walkSpeedModifier: 0.25 sprintSpeedModifier: 0.25 + - type: DamageContacts + standStillTime: 3 + damage: + types: + Slash: -10 + Piercing: -40 + ignoreBlacklist: + tags: + - SpiderQueen + - SpiderServant - type: entity parent: BaseSpiderWeb @@ -99,7 +109,8 @@ snap: - Wall components: - + - type: Sprite + color: gray - type: Destructible thresholds: - trigger: @@ -111,6 +122,16 @@ - type: SpeedModifierContacts walkSpeedModifier: 0.15 sprintSpeedModifier: 0.15 + - type: DamageContacts + standStillTime: 3 + damage: + types: + Slash: -10 + Piercing: -40 + ignoreBlacklist: + tags: + - SpiderQueen + - SpiderServant - type: entity parent: BaseSpiderWeb diff --git a/Resources/Prototypes/SS220/tags.yml b/Resources/Prototypes/SS220/tags.yml index 00821a55cd8d08..4757d46887f711 100644 --- a/Resources/Prototypes/SS220/tags.yml +++ b/Resources/Prototypes/SS220/tags.yml @@ -107,3 +107,10 @@ # EscapePod - type: Tag id: EscapePod + +# Spider queen antag +- type: Tag + id: SpiderQueen + +- type: Tag + id: SpiderServant From d81a662b359c9577c4b8fe846734d505521ca826 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 7 Sep 2024 20:49:21 +0300 Subject: [PATCH 02/46] move actions to unique component --- .../Components/SpiderQueenComponent.cs | 15 +++++++++ .../SpiderQueen/Systems/SpiderQueenSystem.cs | 32 +++++++++++++++++++ .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 18 ++++++----- 3 files changed, 57 insertions(+), 8 deletions(-) create mode 100644 Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs create mode 100644 Content.Shared/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs new file mode 100644 index 00000000000000..a3fceb469de84b --- /dev/null +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -0,0 +1,15 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Robust.Shared.GameStates; +using Robust.Shared.Prototypes; + +namespace Content.Shared.SS220.SpiderQueen.Components; + +[RegisterComponent, NetworkedComponent] +public sealed partial class SpiderQueenComponent : Component +{ + /// + /// List of actions + /// + [DataField] + public List? Actions; +} diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs new file mode 100644 index 00000000000000..497947ecbec774 --- /dev/null +++ b/Content.Shared/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -0,0 +1,32 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Shared.Actions; +using Content.Shared.SS220.SpiderQueen.Components; + +namespace Content.Shared.SS220.SpiderQueen.Systems; + +public sealed partial class SpiderQueenSystem : EntitySystem +{ + [Dependency] private readonly SharedActionsSystem _actionsSystem = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnStartup); + } + + private void OnStartup(Entity ent, ref ComponentStartup args) + { + var (uid, component) = ent; + if (component.Actions != null) + { + foreach (var action in component.Actions) + { + if (string.IsNullOrWhiteSpace(action)) + continue; + + _actionsSystem.AddAction(uid, action); + } + } + } +} diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 16f1a2df3b0268..d32acc6771d2fb 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -157,15 +157,17 @@ components: - type: AutoImplant implants: - - LightImplantSpiderEggHunter - - LightImplantSpiderWallWebDurable - - LightImplantSpiderEggDrone - - LightImplantSpiderEggGhost - - LightImplantSpiderCrystal - - LightImplantSpiderLittle - - LightImplantSingleSpiderWebDurable - - LightImplantSpiderEggShooter - ThermalVisionImplant + - type: SpiderQueen + actions: + - ActionSpawnSpiderEggDrone + - ActionSpawnSpiderEggHunter + - ActionSpawnSpiderEggGhost + - ActionSpawnSpiderEggShooter + - ActionSpawnSpiderLittle + - ActionSpawnSpiderCrystal + - ActionSpawnSingleSpiderWebDurable + - ActionSpawnSpiderWallWebDurable - type: Butcherable spawned: - id: FoodMeatSpider From 6ea99135028b819955cee0243c07da3518dd212f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 7 Sep 2024 23:40:49 +0300 Subject: [PATCH 03/46] add mana system --- .../SS220/SpiderQueen/SpiderQueenSystem.cs | 58 ++++++++++++++ .../Components/SpiderQueenComponent.cs | 27 ++++++- .../SpiderQueen/SharedSpiderQueenEvents.cs | 29 +++++++ .../Systems/SharedSpiderQueenSystem.cs | 76 +++++++++++++++++++ .../SpiderQueen/Systems/SpiderQueenSystem.cs | 32 -------- .../ru-RU/ss220/spider-queen/spider-queen.ftl | 2 + .../SS220/Actions/Spider_actions.yml | 27 +++---- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 2 + 8 files changed, 205 insertions(+), 48 deletions(-) create mode 100644 Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs create mode 100644 Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs create mode 100644 Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs delete mode 100644 Content.Shared/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs create mode 100644 Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs new file mode 100644 index 00000000000000..385812e8f6958f --- /dev/null +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs @@ -0,0 +1,58 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Server.Popups; +using Content.Shared.Coordinates.Helpers; +using Content.Shared.FixedPoint; +using Content.Shared.SS220.SpiderQueen; +using Content.Shared.SS220.SpiderQueen.Components; +using Content.Shared.SS220.SpiderQueen.Systems; +using Content.Shared.Storage; +using Robust.Shared.Map; +using Robust.Shared.Random; + +namespace Content.Server.SS220.SpiderQueen; + +public sealed partial class SpiderQueenSystem : SharedSpiderQueenSystem +{ + [Dependency] private readonly PopupSystem _popup = default!; + [Dependency] private readonly IRobustRandom _random = default!; + [Dependency] private readonly IMapManager _mapManager = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnWorldSpawn); + } + + private void OnWorldSpawn(SpiderWorldSpawnEvent args) + { + if (args.Handled) + return; + + var performer = args.Performer; + if (args.Cost > FixedPoint2.Zero) + { + if (!TryComp(args.Performer, out var component) || + component is null) + return; + + if (!CheckEnoughMana(performer, component, args.Cost)) + { + _popup.PopupEntity(Loc.GetString("spider-queen-not-enough-mana"), performer, performer); + return; + } + + component.CurrentMana -= args.Cost; + Dirty(performer, component); + } + + var getProtos = EntitySpawnCollection.GetSpawns(args.Prototypes, _random); + var targetMapCords = args.Target; + foreach (var proto in getProtos) + { + Spawn(proto, targetMapCords.SnapToGrid(EntityManager, _mapManager)); + targetMapCords = targetMapCords.Offset(args.Offset); + } + args.Handled = true; + } +} diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index a3fceb469de84b..a2720d2f4903e8 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -1,12 +1,37 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Shared.FixedPoint; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.SS220.SpiderQueen.Components; -[RegisterComponent, NetworkedComponent] +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class SpiderQueenComponent : Component { + /// + /// Current amount of mana + /// + [DataField, AutoNetworkedField] + public FixedPoint2 CurrentMana = FixedPoint2.Zero; + + /// + /// Maximum amount of mana + /// + [DataField] + public FixedPoint2 MaxMana = 200f; + + [DataField] + public bool ShouldShowMana = true; + + /// + /// How much mana will be generated in a second + /// + [DataField] + public FixedPoint2 PassiveGeneration = 0.5f; + + [ViewVariables] + public TimeSpan NextSecond = TimeSpan.Zero; + /// /// List of actions /// diff --git a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs new file mode 100644 index 00000000000000..3e66a4f3e623e5 --- /dev/null +++ b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs @@ -0,0 +1,29 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Shared.Actions; +using Content.Shared.FixedPoint; +using Content.Shared.Storage; +using System.Numerics; + +namespace Content.Shared.SS220.SpiderQueen; + +public sealed partial class SpiderWorldSpawnEvent : WorldTargetActionEvent +{ + /// + /// The list of prototypes will spawn + /// + [DataField] + public List Prototypes = new(); + + /// + /// The offset the prototypes will spawn in on relative to the one prior. + /// Set to 0,0 to have them spawn on the same tile. + /// + [DataField] + public Vector2 Offset; + + /// + /// The cost of mana to use this action + /// + [DataField] + public FixedPoint2 Cost = FixedPoint2.Zero; +} diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs new file mode 100644 index 00000000000000..3c02fcd0362ef0 --- /dev/null +++ b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs @@ -0,0 +1,76 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Shared.Actions; +using Content.Shared.Examine; +using Content.Shared.FixedPoint; +using Content.Shared.Popups; +using Content.Shared.SS220.SpiderQueen.Components; +using Robust.Shared.Timing; + +namespace Content.Shared.SS220.SpiderQueen.Systems; + +public abstract class SharedSpiderQueenSystem : EntitySystem +{ + [Dependency] private readonly SharedActionsSystem _actionsSystem = default!; + [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly SharedPopupSystem _popup = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnStartup); + SubscribeLocalEvent(OnExamine); + } + + public override void Update(float frameTime) + { + base.Update(frameTime); + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var comp)) + { + if (_timing.CurTime < comp.NextSecond) + continue; + + comp.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); + + var newValue = comp.CurrentMana + comp.PassiveGeneration; + comp.CurrentMana = newValue > comp.MaxMana + ? comp.MaxMana + : newValue; + Dirty(uid, comp); + } + } + + private void OnStartup(Entity ent, ref ComponentStartup args) + { + var (uid, component) = ent; + if (component.Actions != null) + { + foreach (var action in component.Actions) + { + if (string.IsNullOrWhiteSpace(action)) + continue; + + _actionsSystem.AddAction(uid, action); + } + } + } + + private void OnExamine(Entity entity, ref ExaminedEvent args) + { + if (args.Examined == args.Examiner && entity.Comp.ShouldShowMana) + { + args.PushMarkup(Loc.GetString("spider-queen-mana-amount", + ("current", entity.Comp.CurrentMana.Int()), ("max", entity.Comp.MaxMana.Int()))); + } + } + + /// + /// Checks if there is enough mana for some action + /// + public bool CheckEnoughMana(EntityUid uid, SpiderQueenComponent component, FixedPoint2 cost) + { + return component.CurrentMana >= cost; + } +} diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs deleted file mode 100644 index 497947ecbec774..00000000000000 --- a/Content.Shared/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ /dev/null @@ -1,32 +0,0 @@ -// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt -using Content.Shared.Actions; -using Content.Shared.SS220.SpiderQueen.Components; - -namespace Content.Shared.SS220.SpiderQueen.Systems; - -public sealed partial class SpiderQueenSystem : EntitySystem -{ - [Dependency] private readonly SharedActionsSystem _actionsSystem = default!; - - public override void Initialize() - { - base.Initialize(); - - SubscribeLocalEvent(OnStartup); - } - - private void OnStartup(Entity ent, ref ComponentStartup args) - { - var (uid, component) = ent; - if (component.Actions != null) - { - foreach (var action in component.Actions) - { - if (string.IsNullOrWhiteSpace(action)) - continue; - - _actionsSystem.AddAction(uid, action); - } - } - } -} diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl new file mode 100644 index 00000000000000..3a11d26397ccb7 --- /dev/null +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -0,0 +1,2 @@ +spider-queen-mana-amount = У вас [color=yellow]{ $current } маны[/color]. Ваш максимум — [color=yellow]{ $max } маны[/color]. +spider-queen-not-enough-mana = Недостаточно маны diff --git a/Resources/Prototypes/SS220/Actions/Spider_actions.yml b/Resources/Prototypes/SS220/Actions/Spider_actions.yml index 90c4cf69b71213..48abeebe2b90bf 100644 --- a/Resources/Prototypes/SS220/Actions/Spider_actions.yml +++ b/Resources/Prototypes/SS220/Actions/Spider_actions.yml @@ -4,18 +4,18 @@ abstract: true components: - type: WorldTargetAction - useDelay: 200 - range: 1 + useDelay: 2 + range: 2 itemIconStyle: BigAction icon: sprite: SS220/Interface/Actions/action_spider.rsi state: guard_spawn - event: !type:WorldSpawnSpellEvent + event: !type:SpiderWorldSpawnEvent prototypes: - id: SpiderEggDrone amount: 1 offset: 0, 1 - speech: action-speech-spell-spider + cost: 10 - type: entity id: BaseActionSpawnSingleSpiderWeb @@ -46,12 +46,12 @@ noSpawn: true components: - type: WorldTargetAction - event: !type:WorldSpawnSpellEvent + event: !type:SpiderWorldSpawnEvent prototypes: - id: SpiderEggDrone amount: 1 offset: 0, 1 - speech: action-speech-spell-spider + cost: 10 - type: entity parent: BaseActionSpawnSpiderEgg @@ -63,13 +63,12 @@ icon: sprite: SS220/Interface/Actions/action_spider.rsi state: hunter_spawn - useDelay: 300 #КД - event: !type:WorldSpawnSpellEvent + event: !type:SpiderWorldSpawnEvent prototypes: - id: SpiderEggHunter amount: 1 offset: 0, 1 - speech: action-speech-spell-spider + cost: 30 - type: entity parent: BaseActionSpawnSpiderEgg @@ -81,13 +80,12 @@ icon: sprite: SS220/Interface/Actions/action_spider.rsi state: nurse_spawn - useDelay: 350 - event: !type:WorldSpawnSpellEvent + event: !type:SpiderWorldSpawnEvent prototypes: - id: SpiderEggGhost amount: 1 offset: 0, 1 - speech: action-speech-spell-spider + cost: 40 - type: entity parent: BaseActionSpawnSpiderEgg @@ -99,13 +97,12 @@ icon: sprite: SS220/Interface/Actions/action_spider.rsi state: viper_spawn - useDelay: 380 - event: !type:WorldSpawnSpellEvent + event: !type:SpiderWorldSpawnEvent prototypes: - id: SpiderEggShooter amount: 1 offset: 0, 1 - speech: action-speech-spell-spider + cost: 20 #Spider - type: entity diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index d32acc6771d2fb..ade954b72a9e9a 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -159,6 +159,8 @@ implants: - ThermalVisionImplant - type: SpiderQueen + currentMana: 50 + passiveGeneration: 0.5 actions: - ActionSpawnSpiderEggDrone - ActionSpawnSpiderEggHunter From 77a8728695b034113305cb6019d96f81037b6eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sun, 8 Sep 2024 22:26:47 +0300 Subject: [PATCH 04/46] Add cocooning action --- .../SS220/SpiderQueen/SpiderQueenSystem.cs | 29 +++++++++ .../Components/SpiderCocoonComponent.cs | 9 +++ .../Components/SpiderQueenComponent.cs | 10 ++- .../SpiderQueen/SharedSpiderQueenEvents.cs | 14 ++++ .../Systems/SharedSpiderQueenSystem.cs | 65 ++++++++++++++++++- .../ru-RU/ss220/spider-queen/spider-queen.ftl | 3 + .../SS220/Actions/Spider_actions.yml | 14 ++++ .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 3 + .../Structures/Specific/spider_structures.yml | 50 ++++++++++++++ Resources/Prototypes/SS220/tags.yml | 3 + 10 files changed, 196 insertions(+), 4 deletions(-) create mode 100644 Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs index 385812e8f6958f..dd908b830a5535 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs @@ -2,10 +2,13 @@ using Content.Server.Popups; using Content.Shared.Coordinates.Helpers; using Content.Shared.FixedPoint; +using Content.Shared.Mobs.Systems; using Content.Shared.SS220.SpiderQueen; using Content.Shared.SS220.SpiderQueen.Components; using Content.Shared.SS220.SpiderQueen.Systems; using Content.Shared.Storage; +using Robust.Server.GameObjects; +using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Random; @@ -16,12 +19,17 @@ public sealed partial class SpiderQueenSystem : SharedSpiderQueenSystem [Dependency] private readonly PopupSystem _popup = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IMapManager _mapManager = default!; + [Dependency] private readonly TransformSystem _transform = default!; + [Dependency] private readonly MobStateSystem _mobState = default!; + [Dependency] private readonly SharedContainerSystem _container = default!; public override void Initialize() { base.Initialize(); SubscribeLocalEvent(OnWorldSpawn); + + SubscribeLocalEvent(OnAfterCocooning); } private void OnWorldSpawn(SpiderWorldSpawnEvent args) @@ -55,4 +63,25 @@ private void OnWorldSpawn(SpiderWorldSpawnEvent args) } args.Handled = true; } + + private void OnAfterCocooning(Entity entity, ref AfterCocooningEvent args) + { + if (args.Cancelled || args.Target is not EntityUid target) + return; + + if (!TryComp(target, out var transform) || !_mobState.IsDead(target)) + return; + + var targetCords = _transform.GetMoverCoordinates(target, transform); + var cocoonUid = Spawn(entity.Comp.CocoonProto, targetCords.SnapToGrid(EntityManager, _mapManager)); + + if (!TryComp(cocoonUid, out var spiderCocoon) || + !_container.TryGetContainer(cocoonUid, spiderCocoon.CocoonContainerId, out var container)) + { + Log.Error($"{cocoonUid} doesn't have required components to cocooning target"); + return; + } + + _container.Insert(target, container); + } } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs new file mode 100644 index 00000000000000..ef9f1e3752725f --- /dev/null +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs @@ -0,0 +1,9 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +namespace Content.Shared.SS220.SpiderQueen.Components; + +[RegisterComponent] +public sealed partial class SpiderCocoonComponent : Component +{ + [DataField("container", required: true)] + public string CocoonContainerId = "cocoon"; +} diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index a2720d2f4903e8..f41060475b6c59 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -18,10 +18,10 @@ public sealed partial class SpiderQueenComponent : Component /// Maximum amount of mana /// [DataField] - public FixedPoint2 MaxMana = 200f; + public FixedPoint2 MaxMana = FixedPoint2.Zero; [DataField] - public bool ShouldShowMana = true; + public bool ShouldShowMana = false; /// /// How much mana will be generated in a second @@ -37,4 +37,10 @@ public sealed partial class SpiderQueenComponent : Component /// [DataField] public List? Actions; + + /// + /// Id of the cocoon prototype + /// + [DataField] + public EntProtoId CocoonProto = "SpiderCocoon"; } diff --git a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs index 3e66a4f3e623e5..148fa0d02ad663 100644 --- a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs +++ b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs @@ -1,7 +1,10 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt using Content.Shared.Actions; +using Content.Shared.DoAfter; using Content.Shared.FixedPoint; using Content.Shared.Storage; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; using System.Numerics; namespace Content.Shared.SS220.SpiderQueen; @@ -27,3 +30,14 @@ public sealed partial class SpiderWorldSpawnEvent : WorldTargetActionEvent [DataField] public FixedPoint2 Cost = FixedPoint2.Zero; } + +public sealed partial class SpiderCocooningActionEvent : EntityTargetActionEvent +{ + [DataField] + public TimeSpan CocooningTime = TimeSpan.Zero; +} + +[Serializable, NetSerializable] +public sealed partial class AfterCocooningEvent : SimpleDoAfterEvent +{ +} diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs index 3c02fcd0362ef0..240d2bb663661b 100644 --- a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs +++ b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs @@ -1,18 +1,26 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt using Content.Shared.Actions; +using Content.Shared.DoAfter; using Content.Shared.Examine; using Content.Shared.FixedPoint; +using Content.Shared.Humanoid; +using Content.Shared.Mobs.Systems; using Content.Shared.Popups; using Content.Shared.SS220.SpiderQueen.Components; +using Content.Shared.Storage.Components; +using Robust.Shared.Network; using Robust.Shared.Timing; namespace Content.Shared.SS220.SpiderQueen.Systems; public abstract class SharedSpiderQueenSystem : EntitySystem { - [Dependency] private readonly SharedActionsSystem _actionsSystem = default!; + [Dependency] private readonly SharedActionsSystem _actions = default!; [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; + [Dependency] private readonly MobStateSystem _mobState = default!; + [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; + [Dependency] private readonly INetManager _net = default!; public override void Initialize() { @@ -20,6 +28,7 @@ public override void Initialize() SubscribeLocalEvent(OnStartup); SubscribeLocalEvent(OnExamine); + SubscribeLocalEvent(OnCocooningAction); } public override void Update(float frameTime) @@ -52,7 +61,7 @@ private void OnStartup(Entity ent, ref ComponentStartup ar if (string.IsNullOrWhiteSpace(action)) continue; - _actionsSystem.AddAction(uid, action); + _actions.AddAction(uid, action); } } } @@ -66,6 +75,58 @@ private void OnExamine(Entity entity, ref ExaminedEvent ar } } + private void OnCocooningAction(Entity entity, ref SpiderCocooningActionEvent args) + { + if (args.Handled) + return; + + var performer = args.Performer; + var target = args.Target; + + if (!_mobState.IsDead(target)) + { + _popup.PopupEntity(Loc.GetString("cocooning-target-not-dead"), performer, performer); + return; + } + + if (!HasComp(target)) + { + _popup.PopupEntity(Loc.GetString("cocooning-target-not-humanoid"), performer, performer); + return; + } + + var doAfterArgs = new DoAfterArgs( + EntityManager, + performer, + args.CocooningTime, + new AfterCocooningEvent(), + performer, + target + ) + { + Broadcast = false, + BreakOnDamage = false, + BreakOnMove = true, + NeedHand = false, + BlockDuplicate = true, + CancelDuplicate = true, + DuplicateCondition = DuplicateConditions.SameEvent + }; + + var started = _doAfter.TryStartDoAfter(doAfterArgs); + if (started) + { + args.Handled = true; + } + else + { + if (_net.IsClient) + Log.Error($"Failed to start DoAfter by {performer}"); + + return; + } + } + /// /// Checks if there is enough mana for some action /// diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index 3a11d26397ccb7..33e936764ad7c7 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -1,2 +1,5 @@ spider-queen-mana-amount = У вас [color=yellow]{ $current } маны[/color]. Ваш максимум — [color=yellow]{ $max } маны[/color]. spider-queen-not-enough-mana = Недостаточно маны + +cocooning-target-not-dead = Цель должна быть мертва +cocooning-target-not-humanoid = Цель должна быть гуманоидом diff --git a/Resources/Prototypes/SS220/Actions/Spider_actions.yml b/Resources/Prototypes/SS220/Actions/Spider_actions.yml index 48abeebe2b90bf..0f0acd81d1ec06 100644 --- a/Resources/Prototypes/SS220/Actions/Spider_actions.yml +++ b/Resources/Prototypes/SS220/Actions/Spider_actions.yml @@ -231,3 +231,17 @@ amount: 1 offset: 0, 1 speech: action-speech-spell-spider + +#Cocooning +- type: entity + id: ActionSpiderCoconning + name: окукливание + description: Покрывает цель паутиной + noSpawn: true + components: + - type: EntityTargetAction + event: !type:SpiderCocooningActionEvent + cocooningTime: 5 + itemIconStyle: NoItem + icon: { sprite: SS220/DemonRofler/dark_reaper.rsi, state: icon_jneceat } + useDelay: 10 diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index ade954b72a9e9a..59aedca35a83c8 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -160,6 +160,8 @@ - ThermalVisionImplant - type: SpiderQueen currentMana: 50 + maxMana: 200 + shouldShowMana: true passiveGeneration: 0.5 actions: - ActionSpawnSpiderEggDrone @@ -170,6 +172,7 @@ - ActionSpawnSpiderCrystal - ActionSpawnSingleSpiderWebDurable - ActionSpawnSpiderWallWebDurable + - ActionSpiderCoconning - type: Butcherable spawned: - id: FoodMeatSpider diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index 94d57e7034c7cb..703f8314ac270b 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -177,3 +177,53 @@ - type: Construction graph: WebStructures node: wall + +# Cocoon +- type: entity + id: SpiderCocoon + name: кокон + description: описание + components: + - type: Icon + sprite: Structures/Storage/Crates/generic.rsi + state: icon + - type: Sprite + sprite: Structures/Storage/Crates/generic.rsi + layers: + - state: icon + - type: Transform + anchored: true + - type: Physics + bodyType: Static + canCollide: false + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb {} + - type: Clickable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Wood + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 20 + behaviors: + - !type:EmptyContainersBehaviour + containers: + - cocoon + - !type:PlaySoundBehavior + sound: + path: /Audio/Effects/poster_broken.ogg + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: ContainerContainer + containers: + cocoon: !type:Container + - type: Tag + tags: + - SpiderCocoon + - type: SpiderCocoon + container: cocoon diff --git a/Resources/Prototypes/SS220/tags.yml b/Resources/Prototypes/SS220/tags.yml index 4757d46887f711..7e471f821b2aaf 100644 --- a/Resources/Prototypes/SS220/tags.yml +++ b/Resources/Prototypes/SS220/tags.yml @@ -114,3 +114,6 @@ - type: Tag id: SpiderServant + +- type: Tag + id: SpiderCocoon From 3b7623517911239d16f63e43c6174f89d32ed955 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Mon, 9 Sep 2024 20:24:07 +0300 Subject: [PATCH 05/46] Actions optimization and delete needless implants --- .../Components/SpiderQueenComponent.cs | 9 -- .../Systems/SharedSpiderQueenSystem.cs | 18 +-- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 31 ++-- .../Entities/Objects/Misc/spider_implants.yml | 141 ------------------ 4 files changed, 16 insertions(+), 183 deletions(-) delete mode 100644 Resources/Prototypes/SS220/Entities/Objects/Misc/spider_implants.yml diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index f41060475b6c59..7b29bcedf85965 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -20,9 +20,6 @@ public sealed partial class SpiderQueenComponent : Component [DataField] public FixedPoint2 MaxMana = FixedPoint2.Zero; - [DataField] - public bool ShouldShowMana = false; - /// /// How much mana will be generated in a second /// @@ -32,12 +29,6 @@ public sealed partial class SpiderQueenComponent : Component [ViewVariables] public TimeSpan NextSecond = TimeSpan.Zero; - /// - /// List of actions - /// - [DataField] - public List? Actions; - /// /// Id of the cocoon prototype /// diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs index 240d2bb663661b..4bbf749f071274 100644 --- a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs +++ b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs @@ -26,7 +26,6 @@ public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnStartup); SubscribeLocalEvent(OnExamine); SubscribeLocalEvent(OnCocooningAction); } @@ -51,24 +50,9 @@ public override void Update(float frameTime) } } - private void OnStartup(Entity ent, ref ComponentStartup args) - { - var (uid, component) = ent; - if (component.Actions != null) - { - foreach (var action in component.Actions) - { - if (string.IsNullOrWhiteSpace(action)) - continue; - - _actions.AddAction(uid, action); - } - } - } - private void OnExamine(Entity entity, ref ExaminedEvent args) { - if (args.Examined == args.Examiner && entity.Comp.ShouldShowMana) + if (args.Examined == args.Examiner) { args.PushMarkup(Loc.GetString("spider-queen-mana-amount", ("current", entity.Comp.CurrentMana.Int()), ("max", entity.Comp.MaxMana.Int()))); diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 59aedca35a83c8..eb4542ec0c4b9f 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -161,8 +161,8 @@ - type: SpiderQueen currentMana: 50 maxMana: 200 - shouldShowMana: true passiveGeneration: 0.5 + - type: ActionGrant actions: - ActionSpawnSpiderEggDrone - ActionSpawnSpiderEggHunter @@ -253,11 +253,11 @@ types: Piercing: 5 #Damage Structural: 10 - - type: AutoImplant - implants: - - LightImplantSpiderWallWebDurable - - LightImplantSpiderCrystal - - LightImplantSingleSpiderWebShortDelay + - type: ActionGrant + actions: + - ActionSpawnSpiderWallWebDurable + - ActionSpawnSpiderCrystal + - ActionSpawnSingleSpiderWebShortDelay - type: Spider webPrototype: SpiderWebDespawned - type: MovementSpeedModifier @@ -316,9 +316,9 @@ - type: MovementSpeedModifier baseWalkSpeed : 3 baseSprintSpeed : 3.9 - - type: AutoImplant - implants: - - LightImplantSingleSpiderWebLongDelay + - type: ActionGrant + actions: + - ActionSpawnSingleSpiderWebLongDelay - type: entity parent: @@ -394,9 +394,9 @@ - type: MovementSpeedModifier baseWalkSpeed : 1.5 baseSprintSpeed : 3.9 - - type: AutoImplant - implants: - - LightImplantSingleSpiderWebLongDelay + - type: ActionGrant + actions: + - ActionSpawnSingleSpiderWebLongDelay - type: entity parent: @@ -465,13 +465,12 @@ availableModes: - FullAuto soundGunshot: /Audio/Weapons/Xeno/alien_spitacid.ogg - - type: AutoImplant - implants: - - LightImplantSingleSpiderWebClown + - type: ActionGrant + actions: + - ActionSpawnSingleSpiderWebClown - type: MovementSpeedModifier baseWalkSpeed : 3 baseSprintSpeed : 3.7 - - type: entity parent: - BaseMobSpiderQueen diff --git a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_implants.yml b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_implants.yml deleted file mode 100644 index e5fec988fbea1e..00000000000000 --- a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_implants.yml +++ /dev/null @@ -1,141 +0,0 @@ -#Base -- type: entity - parent: BaseSubdermalImplant - id: BaseLightImplantSpider - abstract: true - components: - - type: SubdermalImplant - - type: PointLight - enabled: false - radius: 2.5 - softness: 5 - mask: /Textures/Effects/LightMasks/cone.png - autoRot: true - - type: Tag - tags: - - SubdermalImplant - - HideContextMenu - - Flashlight - - type: UnpoweredFlashlight - -# #Egg -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSpiderEggDrone - name: guard spider egg - description: He is also a drone and can build crystals and walls. - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSpiderEggDrone - -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSpiderEggHunter - name: hunter spider egg - description: - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSpiderEggHunter - -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSpiderEggGhost - name: ghost spider egg - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSpiderEggGhost - -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSpiderEggShooter - name: shooter spider egg - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSpiderEggShooter - -#Spider -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSpiderLittle - name: release the spiderlings - description: Releases three small spiders that attack your prey. The spiders disappear after 20 seconds. - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSpiderLittle - -# #Cristal -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSpiderCrystal - name: create a crystal shard - description: A shard that serves as a backlight for spiders. - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSpiderCrystal - -#Wall -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSpiderWallWeb - name: create a wall - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSpiderWallWeb - -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSpiderWallWebDurable - name: create a durable wall - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSpiderWallWebDurable - -#Web -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSingleSpiderWebShortDelay - name: spin a web - description: Creates a web that slows down your prey. - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSingleSpiderWebShortDelay - -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSingleSpiderWebLongDelay - name: spin a web - description: Creates a web that slows down your prey. - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSingleSpiderWebLongDelay - -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSingleSpiderWebDurable - name: spin a durable web - description: Creates a web that slows down your prey. - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSingleSpiderWebDurable - -#Clown web -- type: entity - parent: BaseLightImplantSpider - id: LightImplantSingleSpiderWebClown - name: spin a clown web - description: Creates a web that slows down your prey. - noSpawn: true - components: - - type: SubdermalImplant - implantAction: ActionSpawnSingleSpiderWebClown From b4f5fb694e64bdaf39974097829d16924dab193a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Mon, 9 Sep 2024 20:31:52 +0300 Subject: [PATCH 06/46] some optimization --- Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs | 2 +- .../SS220/SpiderQueen/SharedSpiderQueenEvents.cs | 1 - .../SpiderQueen/Systems/SharedSpiderQueenSystem.cs | 10 ---------- 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs index dd908b830a5535..ec12e30d95056b 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs @@ -44,7 +44,7 @@ private void OnWorldSpawn(SpiderWorldSpawnEvent args) component is null) return; - if (!CheckEnoughMana(performer, component, args.Cost)) + if (component.CurrentMana < args.Cost) { _popup.PopupEntity(Loc.GetString("spider-queen-not-enough-mana"), performer, performer); return; diff --git a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs index 148fa0d02ad663..a567de1f809c94 100644 --- a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs +++ b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs @@ -3,7 +3,6 @@ using Content.Shared.DoAfter; using Content.Shared.FixedPoint; using Content.Shared.Storage; -using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using System.Numerics; diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs index 4bbf749f071274..4690079640cf9b 100644 --- a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs +++ b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs @@ -2,12 +2,10 @@ using Content.Shared.Actions; using Content.Shared.DoAfter; using Content.Shared.Examine; -using Content.Shared.FixedPoint; using Content.Shared.Humanoid; using Content.Shared.Mobs.Systems; using Content.Shared.Popups; using Content.Shared.SS220.SpiderQueen.Components; -using Content.Shared.Storage.Components; using Robust.Shared.Network; using Robust.Shared.Timing; @@ -110,12 +108,4 @@ private void OnCocooningAction(Entity entity, ref SpiderCo return; } } - - /// - /// Checks if there is enough mana for some action - /// - public bool CheckEnoughMana(EntityUid uid, SpiderQueenComponent component, FixedPoint2 cost) - { - return component.CurrentMana >= cost; - } } From 3271958caa4e900cfbd0c97a674d4ee9151495cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Tue, 10 Sep 2024 21:45:31 +0300 Subject: [PATCH 07/46] add mana generation bonus from cocoons --- .../SS220/SpiderQueen/SpiderQueenSystem.cs | 46 ++++++++++++++++++- .../Components/SpiderCocoonComponent.cs | 21 ++++++++- .../Components/SpiderQueenComponent.cs | 18 ++++++++ .../SpiderQueen/SharedSpiderQueenEvents.cs | 3 ++ .../Systems/SharedSpiderQueenSystem.cs | 2 +- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 1 + .../Structures/Specific/spider_structures.yml | 1 + 7 files changed, 88 insertions(+), 4 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs index ec12e30d95056b..654f4b9ec9bf75 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs @@ -27,9 +27,10 @@ public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnWorldSpawn); - SubscribeLocalEvent(OnAfterCocooning); + SubscribeLocalEvent(OnShutdown); + + SubscribeLocalEvent(OnWorldSpawn); } private void OnWorldSpawn(SpiderWorldSpawnEvent args) @@ -83,5 +84,46 @@ private void OnAfterCocooning(Entity entity, ref AfterCoco } _container.Insert(target, container); + entity.Comp.CocoonsList.Add(cocoonUid); + Dirty(entity.Owner, entity.Comp); + + spiderCocoon.CocoonOwner = entity.Owner; + Dirty(cocoonUid, spiderCocoon); + + UpdateCocoonsBonus(entity.Owner); + } + + private void OnShutdown(Entity entity, ref ComponentShutdown args) + { + var (uid, comp) = entity; + if (comp.CocoonOwner is null || + !TryComp(comp.CocoonOwner, out var queenComponent)) + return; + + queenComponent.CocoonsList.Remove(uid); + UpdateCocoonsBonus(comp.CocoonOwner.Value); + } + + /// + /// Updates the bonus that cocoons give + /// + private void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? component = null) + { + if (!Resolve(spider, ref component)) + return; + + var newBonus = FixedPoint2.Zero; + var i = 0; + foreach (var cocoon in component.CocoonsList) + { + if (!TryComp(cocoon, out var spiderCocoon)) + continue; + + newBonus += spiderCocoon.ManaGenerationBonus * Math.Pow(component.CocoonsBonusCoefficient.Double(), i); + i++; + } + + component.CocoonsManaBonus = newBonus; + Dirty(spider, component); } } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs index ef9f1e3752725f..bf3b45362b5640 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs @@ -1,9 +1,28 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Shared.FixedPoint; +using Robust.Shared.GameStates; + namespace Content.Shared.SS220.SpiderQueen.Components; -[RegisterComponent] +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class SpiderCocoonComponent : Component { + /// + /// The entity that created this cocoon + /// + [ViewVariables, AutoNetworkedField] + public EntityUid? CocoonOwner; + + /// + /// ID of the container in which the entities placed in the cocoon are stored + /// [DataField("container", required: true)] public string CocoonContainerId = "cocoon"; + + /// + /// Bonus to passive mana generation from this cocoon. + /// This value may vary depending on the number of cocoons. + /// + [DataField] + public FixedPoint2 ManaGenerationBonus = FixedPoint2.Zero; } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index 7b29bcedf85965..3dc2fc74a11d00 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -34,4 +34,22 @@ public sealed partial class SpiderQueenComponent : Component /// [DataField] public EntProtoId CocoonProto = "SpiderCocoon"; + + /// + /// List of cocoons created by this entity + /// + [ViewVariables, AutoNetworkedField] + public List CocoonsList = new(); + + /// + /// The bonus to passive mana generation that give by cocoons + /// + [ViewVariables, AutoNetworkedField] + public FixedPoint2 CocoonsManaBonus = FixedPoint2.Zero; + + /// + /// Coefficient that indicating how much the bonus from each subsequent cocoon will decrease + /// + [DataField] + public FixedPoint2 CocoonsBonusCoefficient = 1f; } diff --git a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs index a567de1f809c94..342e98a2f45551 100644 --- a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs +++ b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs @@ -32,6 +32,9 @@ public sealed partial class SpiderWorldSpawnEvent : WorldTargetActionEvent public sealed partial class SpiderCocooningActionEvent : EntityTargetActionEvent { + /// + /// The time it takes to create a cocoon on the target + /// [DataField] public TimeSpan CocooningTime = TimeSpan.Zero; } diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs index 4690079640cf9b..5dbea6b02c8475 100644 --- a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs +++ b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs @@ -40,7 +40,7 @@ public override void Update(float frameTime) comp.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); - var newValue = comp.CurrentMana + comp.PassiveGeneration; + var newValue = comp.CurrentMana + comp.PassiveGeneration + comp.CocoonsManaBonus; comp.CurrentMana = newValue > comp.MaxMana ? comp.MaxMana : newValue; diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index eb4542ec0c4b9f..74b1c2c5197510 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -162,6 +162,7 @@ currentMana: 50 maxMana: 200 passiveGeneration: 0.5 + cocoonsBonusCoefficient: 0.9 - type: ActionGrant actions: - ActionSpawnSpiderEggDrone diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index 703f8314ac270b..bd2b29711478ef 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -227,3 +227,4 @@ - SpiderCocoon - type: SpiderCocoon container: cocoon + manaGenerationBonus: 1 From b1febd27b1b59314418ebf54d49871ca24b1ac50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Thu, 12 Sep 2024 21:39:02 +0300 Subject: [PATCH 08/46] Add game rule and some fixes --- .../Markers/AntagSpawnMarkerComponent.cs | 7 ++ .../SpiderQueen/SpiderQueenRuleComponent.cs | 21 +++++ .../SpiderQueen/SpiderQueenRuleSystem.cs | 82 +++++++++++++++++++ .../ru-RU/ss220/misc/spider-implants.ftl | 34 -------- .../prototypes/entities/markings/markers.ftl | 3 + .../markers/Spawners/antag-markers.yml | 16 ++++ .../Entities/markers/Spawners/ghost_roles.yml | 2 +- .../SS220/GameRules/midround_antags.yml | 21 +++++ 8 files changed, 151 insertions(+), 35 deletions(-) create mode 100644 Content.Server/SS220/Markers/AntagSpawnMarkerComponent.cs create mode 100644 Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs create mode 100644 Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs delete mode 100644 Resources/Locale/ru-RU/ss220/misc/spider-implants.ftl create mode 100644 Resources/Locale/ru-RU/ss220/prototypes/entities/markings/markers.ftl create mode 100644 Resources/Prototypes/SS220/Entities/markers/Spawners/antag-markers.yml diff --git a/Content.Server/SS220/Markers/AntagSpawnMarkerComponent.cs b/Content.Server/SS220/Markers/AntagSpawnMarkerComponent.cs new file mode 100644 index 00000000000000..20ae229c053899 --- /dev/null +++ b/Content.Server/SS220/Markers/AntagSpawnMarkerComponent.cs @@ -0,0 +1,7 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +namespace Content.Server.SS220.Markers; + +[RegisterComponent] +public sealed partial class AntagSpawnMarkerComponent : Component +{ +} diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs new file mode 100644 index 00000000000000..62da4af45fc9dc --- /dev/null +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs @@ -0,0 +1,21 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Shared.Whitelist; + +namespace Content.Server.SS220.SpiderQueen; + +[RegisterComponent] +public sealed partial class SpiderQueenRuleComponent : Component +{ + /// + /// ID of the spawner of this antagonist + /// + [DataField] + public string SpawnerID = "SpawnPointGhostSpaceQueen"; + + /// + /// Spawn on a random entity that passed whitelist. + /// If null - spawn on a random tile. + /// + [DataField] + public EntityWhitelist? MarkersWhitelist; +} diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs new file mode 100644 index 00000000000000..c4073e369bb4b6 --- /dev/null +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs @@ -0,0 +1,82 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Server.Antag; +using Content.Server.GameTicking.Rules; +using Content.Server.Respawn; +using Content.Server.SS220.Markers; +using Content.Server.Station.Components; +using Content.Server.Station.Systems; +using Content.Shared.Whitelist; +using Robust.Shared.Map; + +namespace Content.Server.SS220.SpiderQueen; + +public sealed class SpiderQueenRuleSystem : GameRuleSystem +{ + [Dependency] private readonly EntityWhitelistSystem _entityWhitelist = default!; + [Dependency] private readonly SharedTransformSystem _transform = default!; + [Dependency] private readonly StationSystem _station = default!; + [Dependency] private readonly SpecialRespawnSystem _specialRespawn = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnAntagSelectEntity); + SubscribeLocalEvent(OnAntagSelectLocation); + } + + private void OnAntagSelectEntity(Entity ent, ref AntagSelectEntityEvent args) + { + if (args.Handled) + return; + + args.Entity = Spawn(ent.Comp.SpawnerID); + } + + private void OnAntagSelectLocation(Entity ent, ref AntagSelectLocationEvent args) + { + if (args.Handled) + return; + + List validCoordinates = new(); + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out _)) + { + if (_entityWhitelist.IsWhitelistFail(ent.Comp.MarkersWhitelist, uid) || + !TryComp(uid, out var transform)) + continue; + + validCoordinates.Add(_transform.ToMapCoordinates(transform.Coordinates)); + } + + if (validCoordinates.Count > 0) + args.Coordinates = validCoordinates; + else + { + EntityUid? grid = null; + EntityUid? map = null; + foreach (var station in _station.GetStationsSet()) + { + if (!TryComp(station, out var data)) + continue; + + grid = _station.GetLargestGrid(data); + if (!grid.HasValue) + continue; + + map = Transform(grid.Value).MapUid; + if (!map.HasValue) + continue; + + break; + } + + if (!grid.HasValue || !map.HasValue) + return; + + _specialRespawn.TryFindRandomTile(grid.Value, map.Value, 30, out var randomCoords); + args.Coordinates.Add(_transform.ToMapCoordinates(randomCoords)); + } + } +} + diff --git a/Resources/Locale/ru-RU/ss220/misc/spider-implants.ftl b/Resources/Locale/ru-RU/ss220/misc/spider-implants.ftl deleted file mode 100644 index 43b6e542e5eb84..00000000000000 --- a/Resources/Locale/ru-RU/ss220/misc/spider-implants.ftl +++ /dev/null @@ -1,34 +0,0 @@ -ent-LightImplantSpiderEggDrone = Яйцо охранного паука - .desc = Он же трутень, может строить кристаллы и стены. - -ent-LightImplantSpiderEggHunter = Яйцо паука охотника - -ent-LightImplantSpiderEggGhost = Яйцо паука призрака - -ent-LightImplantSpiderEggShooter = Яйцо паука стрелка - - -ent-LightImplantSpiderLittle = Выпустить паучат - .desc = Выпускает трёх маленьких пауков, которые атакуют вашу добычу. Пауки исчезают через 20 секунд. - - -ent-LightImplantSpiderCrystal = Создать осколок кристалла - .desc = Осколок, который служит подсветкой для пауков. - - -ent-LightImplantSpiderWallWeb = Создать стену - -ent-LightImplantSpiderWallWebDurable = Создать прочную стену - - -ent-LightImplantSingleSpiderWebShortDelay = Пустить паутину - .desc = Создаёт паутину, которая замедляет вашу добычу. - -ent-LightImplantSingleSpiderWebLongDelay = { ent-LightImplantSingleSpiderWebShortDelay } - .desc = { ent-LightImplantSingleSpiderWebShortDelay.desc } - -ent-LightImplantSingleSpiderWebDurable = Пустить прочную паутину - .desc = { ent-LightImplantSingleSpiderWebShortDelay.desc } - -ent-LightImplantSingleSpiderWebClown = Пустить клоунскую паутину - .desc = { ent-LightImplantSingleSpiderWebShortDelay.desc } diff --git a/Resources/Locale/ru-RU/ss220/prototypes/entities/markings/markers.ftl b/Resources/Locale/ru-RU/ss220/prototypes/entities/markings/markers.ftl new file mode 100644 index 00000000000000..d3153d3d573e84 --- /dev/null +++ b/Resources/Locale/ru-RU/ss220/prototypes/entities/markings/markers.ftl @@ -0,0 +1,3 @@ +ent-SpiderQueenSpawnMarker = маркер спавна королевы пауков + .desc = Маркер, обозначающий координату, в которой возможен спавн королевы пауков + .suffix = Улей пауков diff --git a/Resources/Prototypes/SS220/Entities/markers/Spawners/antag-markers.yml b/Resources/Prototypes/SS220/Entities/markers/Spawners/antag-markers.yml new file mode 100644 index 00000000000000..f1cc905066d692 --- /dev/null +++ b/Resources/Prototypes/SS220/Entities/markers/Spawners/antag-markers.yml @@ -0,0 +1,16 @@ +- type: entity + parent: MarkerBase + id: SpiderQueenSpawnMarker + name: spider queen spawn marker + description: A marker indicating the coordinate at which the spider queen can spawn. + suffix: Spiders hive + components: + - type: Sprite + layers: + - state: pink + - sprite: Mobs/Animals/spider.rsi + state: midwife + - type: Tag + tags: + - SpiderQueenSpawnMarker + - type: AntagSpawnMarker diff --git a/Resources/Prototypes/SS220/Entities/markers/Spawners/ghost_roles.yml b/Resources/Prototypes/SS220/Entities/markers/Spawners/ghost_roles.yml index 4761f7a83c337c..dd767b82108e18 100644 --- a/Resources/Prototypes/SS220/Entities/markers/Spawners/ghost_roles.yml +++ b/Resources/Prototypes/SS220/Entities/markers/Spawners/ghost_roles.yml @@ -1,9 +1,9 @@ #Used by gamerule - type: entity + parent: BaseAntagSpawner id: SpawnPointGhostSpaceQueen name: спавнер роли королевы-пауков suffix: паук-королева - parent: MarkerBase components: - type: GhostRole name: spider-royQueen-name diff --git a/Resources/Prototypes/SS220/GameRules/midround_antags.yml b/Resources/Prototypes/SS220/GameRules/midround_antags.yml index a4ea755e37f97b..7211285b02f3cf 100644 --- a/Resources/Prototypes/SS220/GameRules/midround_antags.yml +++ b/Resources/Prototypes/SS220/GameRules/midround_antags.yml @@ -37,3 +37,24 @@ - type: DarkReaperRole prototype: DarkReaper - type: DarkReaperMajorRule + +- type: entity + parent: BaseGameRule + id: SpiderQueenSpawn + categories: [ GameRules ] + components: + - type: StationEvent + weight: 7.5 + duration: 1 + earliestStart: 45 + minimumPlayers: 30 + - type: AntagSelection + selectionTime: PrePlayerSpawn + definitions: + - max: 1 + playerRatio: 10 + spawnerPrototype: SpawnPointGhostSpaceQueen + - type: SpiderQueenRule + markersWhitelist: + tags: + - SpiderQueenSpawnMarker From 565273af45be37f030a84834e93c90c1f9a72d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 13 Sep 2024 16:54:52 +0300 Subject: [PATCH 09/46] add cocoons sprites and some changes --- .../SS220/SpiderQueen/SpiderQueenSystem.cs | 7 +- .../Components/SpiderQueenComponent.cs | 2 +- .../SS220/Actions/Spider_actions.yml | 6 +- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 3 + .../Entities/Objects/Misc/spider_web.yml | 1 - .../Structures/Specific/spider_structures.yml | 169 ++++++++++++++---- .../Graphs/structures/spider_structures.yml | 54 ++++++ .../Graphs/structures/steelstairs.yml | 4 +- Resources/Prototypes/SS220/tags.yml | 3 + .../Actions/action_spider.rsi/cocoon.png | Bin 0 -> 1370 bytes .../action_spider.rsi/crystal_spawn.png | Bin 0 -> 1362 bytes .../Actions/action_spider.rsi/meta.json | 6 + .../Specific/cocoon.rsi/cocoon1.png | Bin 0 -> 1622 bytes .../Specific/cocoon.rsi/cocoon2.png | Bin 0 -> 1281 bytes .../Specific/cocoon.rsi/destroyed_cocoon1.png | Bin 0 -> 1576 bytes .../Specific/cocoon.rsi/destroyed_cocoon2.png | Bin 0 -> 1138 bytes .../Structures/Specific/cocoon.rsi/meta.json | 23 +++ 17 files changed, 239 insertions(+), 39 deletions(-) create mode 100644 Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml create mode 100644 Resources/Textures/SS220/Interface/Actions/action_spider.rsi/cocoon.png create mode 100644 Resources/Textures/SS220/Interface/Actions/action_spider.rsi/crystal_spawn.png create mode 100644 Resources/Textures/SS220/Structures/Specific/cocoon.rsi/cocoon1.png create mode 100644 Resources/Textures/SS220/Structures/Specific/cocoon.rsi/cocoon2.png create mode 100644 Resources/Textures/SS220/Structures/Specific/cocoon.rsi/destroyed_cocoon1.png create mode 100644 Resources/Textures/SS220/Structures/Specific/cocoon.rsi/destroyed_cocoon2.png create mode 100644 Resources/Textures/SS220/Structures/Specific/cocoon.rsi/meta.json diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs index 654f4b9ec9bf75..fd85587b6f63bf 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs @@ -74,7 +74,8 @@ private void OnAfterCocooning(Entity entity, ref AfterCoco return; var targetCords = _transform.GetMoverCoordinates(target, transform); - var cocoonUid = Spawn(entity.Comp.CocoonProto, targetCords.SnapToGrid(EntityManager, _mapManager)); + var cocoonPrototypeID = _random.Pick(entity.Comp.CocoonPrototypes); + var cocoonUid = Spawn(cocoonPrototypeID, targetCords); if (!TryComp(cocoonUid, out var spiderCocoon) || !_container.TryGetContainer(cocoonUid, spiderCocoon.CocoonContainerId, out var container)) @@ -116,7 +117,9 @@ private void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? componen var i = 0; foreach (var cocoon in component.CocoonsList) { - if (!TryComp(cocoon, out var spiderCocoon)) + if (!TryComp(cocoon, out var spiderCocoon) || + !_container.TryGetContainer(cocoon, spiderCocoon.CocoonContainerId, out var container) || + container.Count <= 0) continue; newBonus += spiderCocoon.ManaGenerationBonus * Math.Pow(component.CocoonsBonusCoefficient.Double(), i); diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index 3dc2fc74a11d00..0ed24de900f353 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -33,7 +33,7 @@ public sealed partial class SpiderQueenComponent : Component /// Id of the cocoon prototype /// [DataField] - public EntProtoId CocoonProto = "SpiderCocoon"; + public List CocoonPrototypes = new(); /// /// List of cocoons created by this entity diff --git a/Resources/Prototypes/SS220/Actions/Spider_actions.yml b/Resources/Prototypes/SS220/Actions/Spider_actions.yml index 0f0acd81d1ec06..01a8e22c0b2478 100644 --- a/Resources/Prototypes/SS220/Actions/Spider_actions.yml +++ b/Resources/Prototypes/SS220/Actions/Spider_actions.yml @@ -137,8 +137,8 @@ range: 1 itemIconStyle: BigAction icon: - sprite: Structures/Decoration/crystal.rsi - state: crystal1 + sprite: SS220/Interface/Actions/action_spider.rsi + state: crystal_spawn event: !type:WorldSpawnSpellEvent prototypes: - id: ShardCrystalBlueXeno @@ -243,5 +243,5 @@ event: !type:SpiderCocooningActionEvent cocooningTime: 5 itemIconStyle: NoItem - icon: { sprite: SS220/DemonRofler/dark_reaper.rsi, state: icon_jneceat } + icon: { sprite: SS220/Interface/Actions/action_spider.rsi, state: cocoon } useDelay: 10 diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 74b1c2c5197510..761959a6074bd7 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -163,6 +163,9 @@ maxMana: 200 passiveGeneration: 0.5 cocoonsBonusCoefficient: 0.9 + cocoonPrototypes: + - SpiderCocoonHorizontal + - SpiderCocoonVertical - type: ActionGrant actions: - ActionSpawnSpiderEggDrone diff --git a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml index 1137c723b697e0..2a99170ea46aab 100644 --- a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml +++ b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml @@ -110,7 +110,6 @@ - Wall components: - type: Sprite - color: gray - type: Destructible thresholds: - trigger: diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index bd2b29711478ef..8bab8acde820d4 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -49,6 +49,78 @@ types: Blunt: 5 +- type: entity + id: BaseSpiderCocoon + name: spider cocoon + description: описание + abstract: true + components: + - type: Icon + sprite: SS220/Structures/Specific/cocoon.rsi + - type: Sprite + sprite: SS220/Structures/Specific/cocoon.rsi + drawdepth: Items + - type: Transform + - type: Physics + bodyType: Static + canCollide: false + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb {} + - type: Clickable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Wood + - type: Destructible + - type: ContainerContainer + containers: + cocoon: !type:Container + - type: Tag + tags: + - SpiderCocoon + - type: SpiderCocoon + container: cocoon + manaGenerationBonus: 1 + +- type: entity + id: BaseSpiderCocoonDestroyed + name: spider cocoon destroyed + description: описание + abstract: true + components: + - type: Icon + sprite: SS220/Structures/Specific/cocoon.rsi + - type: Sprite + sprite: SS220/Structures/Specific/cocoon.rsi + drawdepth: Items + - type: Transform + - type: Physics + bodyType: Static + canCollide: false + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb {} + - type: Clickable + - type: Damageable + damageContainer: Inorganic + damageModifierSet: Wood + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 20 + behaviors: + - !type:PlaySoundBehavior + sound: + path: /Audio/Effects/poster_broken.ogg + - !type:DoActsBehavior + acts: [ "Destruction" ] + + #Tile (used to spawn walls) # - type: entity # parent: BaseFloorTileItemSpiders @@ -180,31 +252,16 @@ # Cocoon - type: entity - id: SpiderCocoon - name: кокон - description: описание + parent: BaseSpiderCocoon + id: SpiderCocoonHorizontal components: - type: Icon - sprite: Structures/Storage/Crates/generic.rsi - state: icon + sprite: SS220/Structures/Specific/cocoon.rsi + state: cocoon1 - type: Sprite - sprite: Structures/Storage/Crates/generic.rsi + sprite: SS220/Structures/Specific/cocoon.rsi layers: - - state: icon - - type: Transform - anchored: true - - type: Physics - bodyType: Static - canCollide: false - - type: Fixtures - fixtures: - fix1: - shape: - !type:PhysShapeAabb {} - - type: Clickable - - type: Damageable - damageContainer: Inorganic - damageModifierSet: Wood + - state: cocoon1 - type: Destructible thresholds: - trigger: @@ -217,14 +274,66 @@ - !type:PlaySoundBehavior sound: path: /Audio/Effects/poster_broken.ogg + - !type:ChangeConstructionNodeBehavior + node: cocoonHorizontalDestroyed - !type:DoActsBehavior acts: [ "Destruction" ] - - type: ContainerContainer - containers: - cocoon: !type:Container - - type: Tag - tags: - - SpiderCocoon - - type: SpiderCocoon - container: cocoon - manaGenerationBonus: 1 + - type: Construction + graph: SpiderCocoon + node: cocoonHorizontal + +- type: entity + parent: BaseSpiderCocoon + id: SpiderCocoonVertical + components: + - type: Icon + state: cocoon2 + - type: Sprite + layers: + - state: cocoon2 + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 20 + behaviors: + - !type:EmptyContainersBehaviour + containers: + - cocoon + - !type:PlaySoundBehavior + sound: + path: /Audio/Effects/poster_broken.ogg + - !type:ChangeConstructionNodeBehavior + node: cocoonVerticalDestroyed + - !type:DoActsBehavior + acts: [ "Destruction" ] + - type: Construction + graph: SpiderCocoon + node: cocoonVertical + +# Destroyed cocoon +- type: entity + parent: BaseSpiderCocoonDestroyed + id: SpiderCocoonHorizontalDestroyed + components: + - type: Icon + state: destroyed_cocoon1 + - type: Sprite + layers: + - state: destroyed_cocoon1 + - type: Construction + graph: SpiderCocoon + node: cocoonHorizontalDestroyed + +- type: entity + parent: BaseSpiderCocoonDestroyed + id: SpiderCocoonVerticalDestroyed + components: + - type: Icon + state: destroyed_cocoon2 + - type: Sprite + layers: + - state: destroyed_cocoon2 + - type: Construction + graph: SpiderCocoon + node: cocoonVerticalDestroyed diff --git a/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml b/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml new file mode 100644 index 00000000000000..836ad78fe54042 --- /dev/null +++ b/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml @@ -0,0 +1,54 @@ +- type: constructionGraph + id: SpiderCocoon + start: destroy + graph: + - node: cocoonHorizontal + entity: SpiderCocoonHorizontal + edges: + - to: cocoonHorizontalDestroyed + completed: + - !type:EmptyContainer + container: cocoon + - !type:SpawnPrototype + prototype: MaterialWebSilk1 + amount: 2 + steps: + - tool: Slicing + doAfter: 3 + + - node: cocoonVertical + entity: SpiderCocoonVertical + edges: + - to: cocoonVerticalDestroyed + completed: + - !type:EmptyContainer + container: cocoon + - !type:SpawnPrototype + prototype: MaterialWebSilk1 + amount: 2 + steps: + - tool: Slicing + doAfter: 3 + + - node: cocoonHorizontalDestroyed + entity: SpiderCocoonHorizontalDestroyed + edges: + - to: destroy + steps: + - tool: Slicing + doAfter: 3 + + - node: cocoonVerticalDestroyed + entity: SpiderCocoonVerticalDestroyed + edges: + - to: destroy + steps: + - tool: Slicing + doAfter: 3 + + - node: destroy + actions: + - !type:SpawnPrototype + prototype: MaterialWebSilk1 + amount: 4 + - !type:DeleteEntity diff --git a/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/steelstairs.yml b/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/steelstairs.yml index 96557293e4148b..5b74ac44a8f5f7 100644 --- a/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/steelstairs.yml +++ b/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/steelstairs.yml @@ -1,4 +1,4 @@ -- type: constructionGraph +- type: constructionGraph id: SteelStairs start: start graph: @@ -84,4 +84,4 @@ - !type:DeleteEntity {} steps: - tool: Anchoring - doAfter: 1 \ No newline at end of file + doAfter: 1 diff --git a/Resources/Prototypes/SS220/tags.yml b/Resources/Prototypes/SS220/tags.yml index 7e471f821b2aaf..8d9e165a5a08de 100644 --- a/Resources/Prototypes/SS220/tags.yml +++ b/Resources/Prototypes/SS220/tags.yml @@ -117,3 +117,6 @@ - type: Tag id: SpiderCocoon + +- type: Tag + id: SpiderQueenSpawnMarker diff --git a/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/cocoon.png b/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/cocoon.png new file mode 100644 index 0000000000000000000000000000000000000000..ab0e3043a9430f662b8bd1992674e0b326011409 GIT binary patch literal 1370 zcmV-g1*Q6lP)Px(`bk7VR9J<@m%oqPL=?wAIf5M}vILAJ4qv#lDKgc%a&;>%TGDLA6=;Q&l_C_7 zf|Mrz0)GSr1(BdYiXcJ}%{94IF1k>#qVN`pDX_VONeVm7=%UyNL9v>-{dJd1n!L)M zU+??g`_7y9;5Ew$^YQ+BAN~jM(c0$#th^}!`1_x1YQrDuN=dKR!*Lv{szSHso)d;4-EQ~LGiJGUYyd`i z6h%0WLs^zIO#@*6rIbi1SzlkD;>V;+lG*~8W$GdkLJ$N2LI|XkxUP%VnxZJIHvpQZ zvA~Wa$MV31^DW{y#&un)s&q$S*REZo*Xt36A+GBZh9Ll2YnrB^EK7tCXss;)o2FrVdz-Jn z`SD1_hHr;*AdX|ClqjVLf`GCtfiW4&vb1ims*1X&B3W}lt4tQeT z2pAK!*X!A|Z)6TYS(XGrfbaXbuFG&ZB+D{{5Uj7SQ`a?FmeJ{SEHTqGB~4T74W$%P zN}C^&B(ZPDtSr2SgTa6x2=F|Q<>h5gojS#EIJ9ZDs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@E`!4ot^Tm*t&HqH*VbE;-%GZSgsmy79-S-RRQ6Z6PZkg6DLl{ z_lb!Kxi*u@_!_Ub(G1=@JHVwYe*j=v7VFlnBODIofwGRjq0AK9>2yjQG9^$;vb=@VqW&-inK2Y$z89Nm^3-12?`v5$7@`Qzj1uV<* z9NPlU`Qhf=DZnuqIR}&ay(&;Yq}1nAI^jV58sS`M{buH$Wdi?sH2Xhrj%J?W6jtU0 zr#JPtSpny`Cg3b;=gi^!CWg~@j=upRM0VNhl`Ccd000hUSV?A0O#mtY000O800000 U007cclK=n!07*qoM6N<$f}sA5V*mgE literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/meta.json b/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/meta.json index e53770b396e3e6..e062f97dfaff72 100644 --- a/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/meta.json +++ b/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/meta.json @@ -27,6 +27,12 @@ }, { "name": "clown_web_spawn" + }, + { + "name": "cocoon" + }, + { + "name": "crystal_spawn" } ] } diff --git a/Resources/Textures/SS220/Structures/Specific/cocoon.rsi/cocoon1.png b/Resources/Textures/SS220/Structures/Specific/cocoon.rsi/cocoon1.png new file mode 100644 index 0000000000000000000000000000000000000000..c416be97995b5df5b77405db6d7e33addf9bdb6d GIT binary patch literal 1622 zcmV-c2C4apP)Px*5J^NqR9Ju* zVa}ZMoag&}p7We@o`EjndEOQEM8|yJU-^~3UUs8>v2KdGuCGPOoMc$jwBJu7(Xnyy z7=d0B!z4lmP9>q99%}zNM&Km&x~{KuSX^bQBrLw#6plt+&qF*Y^^NAv2Ul=7AkBEPt}cnti;jT;E%u@Isl zrMxvWGjl9d^Yim7%46HM<>SYXsn_ddG8q8gy?e*CYuCu-a&(A^xw*M3z{T0w*@av# zw*oLTGZREGpU>m_{z{($oS&b+P_NfN#9}eh=`>*vzkU10nKNg8`o6!COeS$%mrN!@ zv)RNj3=)Y19ROawe96+%k_7%imu;s+C4b-E-X6(hQhxmSk;%zP?%ur{825cY@Um1Y z#eu)2QYq^7I*CLA-}f;L1Jg7qm&;g|MK*hw60@_j|I{=M&+`Cwfq_n&g@pxjx!fTW z+qR{YQts^R$YQZ5rIhm1r%zH!DckL~{PN|CRIpQYnUphUo9_Cy_`{uh&^!U1elsgmSqY*sv@MfXT^807gegxq9^~$z*a6xTGQ# z+=i~}GBGiM>$>Q=POVm>(P#vObX~`B95R^? z?cm@5fJ&tTz`(#jK&o6W2RY?=9?fR+NHPWyNT<_`j*g=1I-cjz-`@{_=Xp4eL$leW zR;!W8WLRBY#j-4FwHlUXvA@3$fUfH_o6W#;&+~$%*xue|a&i*Kac~^xC;``XF${xB zrGjain5KzkSyZc4CMG5@P4mchQ*)F!j)UvE0ocL80j}%f`#!H;y#nC<`}YB{LZJYi z154PpE$`g9!^Xx2rfJe>G#DKnWoT#!$8peg9n&;%94FX*x~^kc7Nt^&Mx(*?>(?oj zN=N$6o;@3oQ%TrpG?<>A-fg$rQ=N#d#Q^c-$rG~KEUi`xAONgZtHBZ|_QS)&n5Ido zR3e+r2JK3vLVtfhjYb2@vUv064TVC1<>h6TmzR0__AS%X(?x*U+1cQ<6}BB**OG`l zc<_Mx_wNVa-t)_P!U30`1$kafEqUpqiZc0mCv6)|G(XC|2H0wUl<%5 z{M4;DjdcSLzonG7G)+sY@pwG`?_U8|cH{B*1%Om4l~p#wm`8R&ugVn;y^hD@`zQUd zL}hSr@b3WU&z}z*h?0m!2ci=0*EB78%D>;SxyfYmk6t!UOY##HP9hQgqdrOZPdo<1 U*5D|l$^ZZW07*qoM6N<$f}zkU+W-In literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Structures/Specific/cocoon.rsi/cocoon2.png b/Resources/Textures/SS220/Structures/Specific/cocoon.rsi/cocoon2.png new file mode 100644 index 0000000000000000000000000000000000000000..b04b1f6e8e49c43308e53108918fe916dca0b87e GIT binary patch literal 1281 zcmV+c1^)VpP)Px(y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-n{&x{l*G+`M@+9zcyoBW}Pj3<-h&UDvTJ z3&(K~Lh$(UWA5C!6HOfU@K^;Vn{Sc|!!SynPABU3`|+4nRTUvbJo{Bujhk(<(}EXQiL>3!*yL;*Nq2K zE|-fNwcT!W<;oROsnn5S7((v<3c#dHN)X9p@?tujUX|;&Z{Pl)C<a({1p2iYg}Ef?FRsd00000NkvXXu0mjfyxDVk literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Structures/Specific/cocoon.rsi/destroyed_cocoon1.png b/Resources/Textures/SS220/Structures/Specific/cocoon.rsi/destroyed_cocoon1.png new file mode 100644 index 0000000000000000000000000000000000000000..078b07ec6de88602e5889ab9f559a57af5b085d0 GIT binary patch literal 1576 zcmV+@2G{wCP)Px);z>k7R9J`qDuoM7>P34 zP=Jt-ZAC(Y!WNWi60SfLDN;doMPglCI6mp{>XfsWV%HSAo?PxiBs^E(S#8$qgeO_v znR)Zx_kMQv8z4q}-=CMi=o;sI_ebW&*^SOAaf*zwMik6>hAE{>7l9bsxIO}4+{Q47 zkbw(9$ln;XKSuzZhn_Lk2m|T&`v-%;pm-jL;o~gl{OCtYGZ98V#@L9+Y(%p(v@si+ znhoh+M@$CDI47L*-7pB>_vZ;A8`*5O5H5!V5e`7^hYTMh}BhGK%z6~NHCWLGVA?}){Ig+aN z_4OkFa2zN7^5sjsc<}tcO<9h#=Wwrx}@l|7l2At(`DGfgwdV69dI=X_T&O|xN| zW8YtHRI63Et_xk)p=lcO`8+gDla6OO=SR|s zX_{DGUWRF!KSzU-%|CH`e2h#cBR+llgc~<*V0CpBx~{|XJaEpT>pB3S*=)*E!F63E zlgYr?!-o&|*4EZQDb1{`tcY^CEKJixr_%|SXx8_Ayng-q%z2|^G8s{=R$&+h>h(Hw zT}P+WfvT#QnVEs(H~@gTxw!xUV+@Qj*tU&Ut0f}}BENU<9){(>ty{NnczB4z!^5<6 zPAOfwfB*gxF#H&Ko(EM`15}h!0D$Ydn4X?SyWNK8c_4bV=%NZf+s~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$SA_xM4 zAn4gAO0vg+h}if2t^Vu*G))T|jRvM^QZAR7otEdc3s8h}crf+R^y zO-*rda1a9bk|Hh$h{%({h)f1SU84*+ys4|QEfRaJr@z;PU0 z*Zp6qsJl_`bjO z=+UE(4Z+1%V5fAi+eg^MpW=x?XhY8|evt&Jx?tk>)Jo;`c^F`Z7+ z?RMkL9LJ$hC;%XeV(L5=zX^`xkjZ4|e=#GT{@72)e{^CCPzYKeI{*Lx07*qoM6N<$ Eg0H|ChX4Qo literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Structures/Specific/cocoon.rsi/meta.json b/Resources/Textures/SS220/Structures/Specific/cocoon.rsi/meta.json new file mode 100644 index 00000000000000..3f1b42638204a7 --- /dev/null +++ b/Resources/Textures/SS220/Structures/Specific/cocoon.rsi/meta.json @@ -0,0 +1,23 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from Paradise at https://github.com/ss220club/Paradise-SS220/blob/master/icons/effects/effects.dmi, modified by Estkemran (Github) for SS220", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "cocoon1" + }, + { + "name": "destroyed_cocoon1" + }, + { + "name": "cocoon2" + }, + { + "name": "destroyed_cocoon2" + } + ] +} From 35f960bdf0c7d3cd0284d2258ad66caca1d509f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 13 Sep 2024 20:07:12 +0300 Subject: [PATCH 10/46] some fixes... --- .../SpiderQueen/SpiderQueenRuleSystem.cs | 8 +++----- .../Graphs/structures/spider_structures.yml | 20 +++++++++---------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs index c4073e369bb4b6..43c68983c529f1 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs @@ -71,11 +71,9 @@ private void OnAntagSelectLocation(Entity ent, ref Ant break; } - if (!grid.HasValue || !map.HasValue) - return; - - _specialRespawn.TryFindRandomTile(grid.Value, map.Value, 30, out var randomCoords); - args.Coordinates.Add(_transform.ToMapCoordinates(randomCoords)); + if (grid.HasValue && map.HasValue && + _specialRespawn.TryFindRandomTile(grid.Value, map.Value, 30, out var randomCoords)) + args.Coordinates.Add(_transform.ToMapCoordinates(randomCoords)); } } } diff --git a/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml b/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml index 836ad78fe54042..73f2b9676fda56 100644 --- a/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml +++ b/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml @@ -1,7 +1,14 @@ - type: constructionGraph id: SpiderCocoon - start: destroy + start: start graph: + - node: start + actions: + - !type:SpawnPrototype + prototype: MaterialWebSilk1 + amount: 4 + - !type:DeleteEntity + - node: cocoonHorizontal entity: SpiderCocoonHorizontal edges: @@ -33,7 +40,7 @@ - node: cocoonHorizontalDestroyed entity: SpiderCocoonHorizontalDestroyed edges: - - to: destroy + - to: start steps: - tool: Slicing doAfter: 3 @@ -41,14 +48,7 @@ - node: cocoonVerticalDestroyed entity: SpiderCocoonVerticalDestroyed edges: - - to: destroy + - to: start steps: - tool: Slicing doAfter: 3 - - - node: destroy - actions: - - !type:SpawnPrototype - prototype: MaterialWebSilk1 - amount: 4 - - !type:DeleteEntity From c815f988544449d7d8561bdc6a51c36e1a4d7149 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 13 Sep 2024 21:12:35 +0300 Subject: [PATCH 11/46] Game Rule fixes --- Content.Server/Roles/RoleSystem.cs | 3 +++ .../SS220/Roles/SpiderQueenRoleComponent.cs | 9 +++++++++ .../SS220/SpiderQueen/SpiderQueenRuleComponent.cs | 6 ------ .../SS220/SpiderQueen/SpiderQueenRuleSystem.cs | 9 --------- Resources/Prototypes/SS220/Antags/spider_queen.yml | 5 +++++ .../Entities/markers/Spawners/ghost_roles.yml | 3 +-- .../Prototypes/SS220/GameRules/midround_antags.yml | 14 ++++++++++---- 7 files changed, 28 insertions(+), 21 deletions(-) create mode 100644 Content.Server/SS220/Roles/SpiderQueenRoleComponent.cs create mode 100644 Resources/Prototypes/SS220/Antags/spider_queen.yml diff --git a/Content.Server/Roles/RoleSystem.cs b/Content.Server/Roles/RoleSystem.cs index 03513d205f57a9..e87b6fdccbd2bc 100644 --- a/Content.Server/Roles/RoleSystem.cs +++ b/Content.Server/Roles/RoleSystem.cs @@ -1,3 +1,4 @@ +using Content.Server.SS220.Roles; using Content.Shared.Roles; using Content.Shared.SS220.DarkReaper; using Content.Shared.SS220.MindSlave; @@ -24,6 +25,8 @@ public override void Initialize() SubscribeAntagEvents(); //SS220 DarkReaper SubscribeAntagEvents(); + //SS220 Spider queen + SubscribeAntagEvents(); } public string? MindGetBriefing(EntityUid? mindId) diff --git a/Content.Server/SS220/Roles/SpiderQueenRoleComponent.cs b/Content.Server/SS220/Roles/SpiderQueenRoleComponent.cs new file mode 100644 index 00000000000000..ab5d1a7622d081 --- /dev/null +++ b/Content.Server/SS220/Roles/SpiderQueenRoleComponent.cs @@ -0,0 +1,9 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Shared.Roles; + +namespace Content.Server.SS220.Roles; + +[RegisterComponent, ExclusiveAntagonist] +public sealed partial class SpiderQueenRoleComponent : AntagonistRoleComponent +{ +} diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs index 62da4af45fc9dc..574461ae7adb4c 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs @@ -6,12 +6,6 @@ namespace Content.Server.SS220.SpiderQueen; [RegisterComponent] public sealed partial class SpiderQueenRuleComponent : Component { - /// - /// ID of the spawner of this antagonist - /// - [DataField] - public string SpawnerID = "SpawnPointGhostSpaceQueen"; - /// /// Spawn on a random entity that passed whitelist. /// If null - spawn on a random tile. diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs index 43c68983c529f1..6f2ef2a5da7144 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs @@ -21,18 +21,9 @@ public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnAntagSelectEntity); SubscribeLocalEvent(OnAntagSelectLocation); } - private void OnAntagSelectEntity(Entity ent, ref AntagSelectEntityEvent args) - { - if (args.Handled) - return; - - args.Entity = Spawn(ent.Comp.SpawnerID); - } - private void OnAntagSelectLocation(Entity ent, ref AntagSelectLocationEvent args) { if (args.Handled) diff --git a/Resources/Prototypes/SS220/Antags/spider_queen.yml b/Resources/Prototypes/SS220/Antags/spider_queen.yml new file mode 100644 index 00000000000000..3e8fae3a6c3677 --- /dev/null +++ b/Resources/Prototypes/SS220/Antags/spider_queen.yml @@ -0,0 +1,5 @@ +- type: antag + id: SpiderQueen + name: roles-antag-spider-queen-name + antagonist: true + objective: roles-antag-spider-queen-objective diff --git a/Resources/Prototypes/SS220/Entities/markers/Spawners/ghost_roles.yml b/Resources/Prototypes/SS220/Entities/markers/Spawners/ghost_roles.yml index dd767b82108e18..84058f8cb3f879 100644 --- a/Resources/Prototypes/SS220/Entities/markers/Spawners/ghost_roles.yml +++ b/Resources/Prototypes/SS220/Entities/markers/Spawners/ghost_roles.yml @@ -1,5 +1,6 @@ #Used by gamerule - type: entity + categories: [ HideSpawnMenu, Spawner ] parent: BaseAntagSpawner id: SpawnPointGhostSpaceQueen name: спавнер роли королевы-пауков @@ -17,8 +18,6 @@ time: 18000 # 5h raffle: settings: default - - type: GhostRoleMobSpawner - prototype: MobSpiderSpaceQueen - type: Sprite sprite: Markers/jobs.rsi layers: diff --git a/Resources/Prototypes/SS220/GameRules/midround_antags.yml b/Resources/Prototypes/SS220/GameRules/midround_antags.yml index 7211285b02f3cf..ef6214babde508 100644 --- a/Resources/Prototypes/SS220/GameRules/midround_antags.yml +++ b/Resources/Prototypes/SS220/GameRules/midround_antags.yml @@ -38,6 +38,7 @@ prototype: DarkReaper - type: DarkReaperMajorRule + # Spider queen - type: entity parent: BaseGameRule id: SpiderQueenSpawn @@ -48,13 +49,18 @@ duration: 1 earliestStart: 45 minimumPlayers: 30 + - type: AntagSpawner + prototype: MobSpiderSpaceQueen - type: AntagSelection - selectionTime: PrePlayerSpawn definitions: - - max: 1 - playerRatio: 10 + - prefRoles: [ SpiderQueen ] spawnerPrototype: SpawnPointGhostSpaceQueen + max: 1 + playerRatio: 10 + mindComponents: + - type: SpiderQueenRole + prototype: SpiderQueen - type: SpiderQueenRule markersWhitelist: tags: - - SpiderQueenSpawnMarker + - SpiderQueenSpawnMarker From 81af71436c02a6bde751ec822cd447e790606b67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 13 Sep 2024 22:12:54 +0300 Subject: [PATCH 12/46] Add cocoons objective --- .../CreateCocoonsConditionComponent.cs | 7 +++ .../Systems/CreateCocoonsConditionSystem.cs | 49 +++++++++++++++++++ .../objectives/conditions/create-cocoons.ftl | 12 +++++ .../ru-RU/ss220/spider-queen/spider-queen.ftl | 2 + .../SS220/GameRules/midround_antags.yml | 3 ++ .../SS220/Objectives/spider_queen.yml | 28 +++++++++++ 6 files changed, 101 insertions(+) create mode 100644 Content.Server/SS220/Objectives/Components/CreateCocoonsConditionComponent.cs create mode 100644 Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs create mode 100644 Resources/Locale/ru-RU/ss220/objectives/conditions/create-cocoons.ftl create mode 100644 Resources/Prototypes/SS220/Objectives/spider_queen.yml diff --git a/Content.Server/SS220/Objectives/Components/CreateCocoonsConditionComponent.cs b/Content.Server/SS220/Objectives/Components/CreateCocoonsConditionComponent.cs new file mode 100644 index 00000000000000..bd348a1608c059 --- /dev/null +++ b/Content.Server/SS220/Objectives/Components/CreateCocoonsConditionComponent.cs @@ -0,0 +1,7 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +namespace Content.Server.SS220.Objectives.Components; + +[RegisterComponent] +public sealed partial class CreateCocoonsConditionComponent : Component +{ +} diff --git a/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs b/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs new file mode 100644 index 00000000000000..316f08a32d9292 --- /dev/null +++ b/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs @@ -0,0 +1,49 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Server.Objectives.Systems; +using Content.Server.SS220.Objectives.Components; +using Content.Shared.Mind; +using Content.Shared.Objectives.Components; +using Content.Shared.SS220.SpiderQueen.Components; + +namespace Content.Server.SS220.Objectives.Systems; + +public sealed partial class CreateCocoonsConditionSystem : EntitySystem +{ + [Dependency] private readonly NumberObjectiveSystem _number = default!; + + private Dictionary IsCompletedOnce = new(); + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnGetProgress); + } + + private void OnGetProgress(Entity ent, ref ObjectiveGetProgressEvent args) + { + args.Progress = GetProgress(args.Mind, _number.GetTarget(ent.Owner)); + } + + private float GetProgress(MindComponent mind, int target) + { + if (IsCompletedOnce.TryGetValue(mind, out var comleted) && + comleted) + return 1f; + + var mobUid = mind.CurrentEntity; + if (mobUid is null || + !TryComp(mobUid, out var spiderQueen)) + return 0f; + + if (spiderQueen.CocoonsList.Count >= target) + { + IsCompletedOnce.Add(mind, true); + return 1f; + } + else + { + return 0f; + } + } +} diff --git a/Resources/Locale/ru-RU/ss220/objectives/conditions/create-cocoons.ftl b/Resources/Locale/ru-RU/ss220/objectives/conditions/create-cocoons.ftl new file mode 100644 index 00000000000000..a1d5c29320755e --- /dev/null +++ b/Resources/Locale/ru-RU/ss220/objectives/conditions/create-cocoons.ftl @@ -0,0 +1,12 @@ +objective-create-cocoons-title = + Создать { $count } { $count -> + [one] кокон + [few] кокона + *[other] коконов + }. +objective-create-cocoons-description = + Используйте действие «Окукливание» чтобы создать { $count } { $count -> + [one] кокон + [few] кокона + *[other] коконов + }. diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index 33e936764ad7c7..c74b8f10f90177 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -3,3 +3,5 @@ spider-queen-not-enough-mana = Недостаточно маны cocooning-target-not-dead = Цель должна быть мертва cocooning-target-not-humanoid = Цель должна быть гуманоидом + +objective-issuer-spider-queen = [color=#7567b6]Spider Queen[/color] diff --git a/Resources/Prototypes/SS220/GameRules/midround_antags.yml b/Resources/Prototypes/SS220/GameRules/midround_antags.yml index ef6214babde508..3d37cd3a2c8364 100644 --- a/Resources/Prototypes/SS220/GameRules/midround_antags.yml +++ b/Resources/Prototypes/SS220/GameRules/midround_antags.yml @@ -51,6 +51,9 @@ minimumPlayers: 30 - type: AntagSpawner prototype: MobSpiderSpaceQueen + - type: AntagObjectives + objectives: + - CreateCocoonsObjective - type: AntagSelection definitions: - prefRoles: [ SpiderQueen ] diff --git a/Resources/Prototypes/SS220/Objectives/spider_queen.yml b/Resources/Prototypes/SS220/Objectives/spider_queen.yml new file mode 100644 index 00000000000000..bcf37becfd4f00 --- /dev/null +++ b/Resources/Prototypes/SS220/Objectives/spider_queen.yml @@ -0,0 +1,28 @@ +- type: entity + abstract: true + parent: BaseObjective + id: BaseSpiderQueenObjective + components: + - type: Objective + difficulty: 1.5 + issuer: objective-issuer-spider-queen + - type: RoleRequirement + roles: + components: + - SpiderQueenRole + +- type: entity + parent: BaseSpiderQueenObjective + id: CreateCocoonsObjective + components: + - type: Objective + icon: + sprite: SS220/Structures/Specific/cocoon.rsi + state: cocoon2 + - type: NumberObjective + # dragon can only spawn 3 rifts so keep objective the same + min: 2 + max: 2 + title: objective-create-cocoons-title + description: objective-create-cocoons-description + - type: CreateCocoonsCondition From 67697fd0fde43622467532b4178450148a67675c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 14 Sep 2024 15:22:18 +0300 Subject: [PATCH 13/46] Add survive objective and fixes --- .../SpiderQueen/Components/SpiderQueenComponent.cs | 10 ++++++++-- .../SpiderQueen/Systems/SharedSpiderQueenSystem.cs | 10 ++++++++++ .../create-cocoons.ftl => spider-queen.ftl} | 7 +++++++ .../Locale/ru-RU/ss220/spider-queen/spider-queen.ftl | 1 + .../Prototypes/SS220/GameRules/midround_antags.yml | 1 + .../Prototypes/SS220/Objectives/spider_queen.yml | 11 +++++++++++ 6 files changed, 38 insertions(+), 2 deletions(-) rename Resources/Locale/ru-RU/ss220/objectives/{conditions/create-cocoons.ftl => spider-queen.ftl} (53%) diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index 0ed24de900f353..2e1d7c9e18d7b7 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -24,7 +24,7 @@ public sealed partial class SpiderQueenComponent : Component /// How much mana will be generated in a second /// [DataField] - public FixedPoint2 PassiveGeneration = 0.5f; + public FixedPoint2 PassiveGeneration = FixedPoint2.New(0.5); [ViewVariables] public TimeSpan NextSecond = TimeSpan.Zero; @@ -51,5 +51,11 @@ public sealed partial class SpiderQueenComponent : Component /// Coefficient that indicating how much the bonus from each subsequent cocoon will decrease /// [DataField] - public FixedPoint2 CocoonsBonusCoefficient = 1f; + public FixedPoint2 CocoonsBonusCoefficient = FixedPoint2.New(1); + + /// + /// The minimum distance between cocoons for their spawn + /// + [DataField] + public float CocoonsMinDistance = 0.5f; } diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs index 5dbea6b02c8475..327b4c9888d37e 100644 --- a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs +++ b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs @@ -19,6 +19,7 @@ public abstract class SharedSpiderQueenSystem : EntitySystem [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly INetManager _net = default!; + [Dependency] private readonly EntityLookupSystem _entityLookup = default!; public override void Initialize() { @@ -65,6 +66,15 @@ private void OnCocooningAction(Entity entity, ref SpiderCo var performer = args.Performer; var target = args.Target; + foreach (var entityInRange in _entityLookup.GetEntitiesInRange(target, entity.Comp.CocoonsMinDistance)) + { + if (!HasComp(entityInRange)) + continue; + + _popup.PopupEntity(Loc.GetString("cocooning-too-close"), performer, performer); + return; + } + if (!_mobState.IsDead(target)) { _popup.PopupEntity(Loc.GetString("cocooning-target-not-dead"), performer, performer); diff --git a/Resources/Locale/ru-RU/ss220/objectives/conditions/create-cocoons.ftl b/Resources/Locale/ru-RU/ss220/objectives/spider-queen.ftl similarity index 53% rename from Resources/Locale/ru-RU/ss220/objectives/conditions/create-cocoons.ftl rename to Resources/Locale/ru-RU/ss220/objectives/spider-queen.ftl index a1d5c29320755e..a1b31a2288d04d 100644 --- a/Resources/Locale/ru-RU/ss220/objectives/conditions/create-cocoons.ftl +++ b/Resources/Locale/ru-RU/ss220/objectives/spider-queen.ftl @@ -1,3 +1,10 @@ +ent-BaseSpiderQueenObjective = { ent-BaseObjective } + .desc = { ent-BaseObjective.desc } +ent-CreateCocoonsObjective= { ent-BaseSpiderQueenObjective } + .desc = { ent-BaseSpiderQueenObjective.desc } +ent-SpiderQueenSurviveObjective = Выжить + .desc = Вы должны оставаться в живых, чтобы сохранять контроль. + objective-create-cocoons-title = Создать { $count } { $count -> [one] кокон diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index c74b8f10f90177..cd72d60fe7604e 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -1,6 +1,7 @@ spider-queen-mana-amount = У вас [color=yellow]{ $current } маны[/color]. Ваш максимум — [color=yellow]{ $max } маны[/color]. spider-queen-not-enough-mana = Недостаточно маны +cocooning-too-close = Слишком близко к другому кокону cocooning-target-not-dead = Цель должна быть мертва cocooning-target-not-humanoid = Цель должна быть гуманоидом diff --git a/Resources/Prototypes/SS220/GameRules/midround_antags.yml b/Resources/Prototypes/SS220/GameRules/midround_antags.yml index 3d37cd3a2c8364..c4052278f3eed4 100644 --- a/Resources/Prototypes/SS220/GameRules/midround_antags.yml +++ b/Resources/Prototypes/SS220/GameRules/midround_antags.yml @@ -54,6 +54,7 @@ - type: AntagObjectives objectives: - CreateCocoonsObjective + - SpiderQueenSurviveObjective - type: AntagSelection definitions: - prefRoles: [ SpiderQueen ] diff --git a/Resources/Prototypes/SS220/Objectives/spider_queen.yml b/Resources/Prototypes/SS220/Objectives/spider_queen.yml index bcf37becfd4f00..6cfaf81fb67e94 100644 --- a/Resources/Prototypes/SS220/Objectives/spider_queen.yml +++ b/Resources/Prototypes/SS220/Objectives/spider_queen.yml @@ -26,3 +26,14 @@ title: objective-create-cocoons-title description: objective-create-cocoons-description - type: CreateCocoonsCondition + +- type: entity + parent: [BaseSpiderQueenObjective, BaseSurviveObjective] + id: SpiderQueenSurviveObjective + name: Survive + description: You have to stay alive to maintain control. + components: + - type: Objective + icon: + sprite: Mobs/Animals/spider.rsi + state: midwife From 8aa3090b67c8bbe205ec70dad8bb1713cf5855ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 14 Sep 2024 16:57:24 +0300 Subject: [PATCH 14/46] Add mana information into character briefing --- .../SpiderQueen/SpiderQueenRuleSystem.cs | 40 +++++++++++++++++++ .../SS220/SpiderQueen/SpiderQueenSystem.cs | 23 +++++++++++ .../Systems/SharedSpiderQueenSystem.cs | 23 ----------- .../ru-RU/ss220/spider-queen/spider-queen.ftl | 3 ++ 4 files changed, 66 insertions(+), 23 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs index 6f2ef2a5da7144..4f4654736d6f00 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs @@ -1,10 +1,15 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt using Content.Server.Antag; using Content.Server.GameTicking.Rules; +using Content.Server.Mind; using Content.Server.Respawn; +using Content.Server.Roles; using Content.Server.SS220.Markers; +using Content.Server.SS220.Roles; using Content.Server.Station.Components; using Content.Server.Station.Systems; +using Content.Shared.Mind; +using Content.Shared.SS220.SpiderQueen.Components; using Content.Shared.Whitelist; using Robust.Shared.Map; @@ -16,12 +21,17 @@ public sealed class SpiderQueenRuleSystem : GameRuleSystem(OnAntagSelectLocation); + SubscribeLocalEvent(AfterEntitySelected); + + SubscribeLocalEvent(OnGetBriefing); } private void OnAntagSelectLocation(Entity ent, ref AntagSelectLocationEvent args) @@ -67,5 +77,35 @@ private void OnAntagSelectLocation(Entity ent, ref Ant args.Coordinates.Add(_transform.ToMapCoordinates(randomCoords)); } } + + private void AfterEntitySelected(Entity ent, ref AfterAntagEntitySelectedEvent args) + { + var spider = args.EntityUid; + if (!_mind.TryGetMind(spider, out var mindId, out var mind)) + return; + + var briefing = Loc.GetString("spider-queen-role-greeting"); + _antag.SendBriefing(spider, briefing, null, null); + } + + private void OnGetBriefing(Entity ent, ref GetBriefingEvent args) + { + if (!TryComp(ent.Owner, out var mind)) + return; + + var briefing = Loc.GetString("spider-queen-role-greeting"); + + if (mind.OwnedEntity is { } spider && + TryComp(spider, out var spiderQueen)) + { + var current = spiderQueen.CurrentMana; + var max = spiderQueen.MaxMana; + + briefing = string.Format("{0}\n{1}", briefing, + Loc.GetString("spider-queen-mana-information", ("current", current), ("max", max))); + } + + args.Append(briefing); + } } diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs index fd85587b6f63bf..7a5d588b8cdb03 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs @@ -11,6 +11,7 @@ using Robust.Shared.Containers; using Robust.Shared.Map; using Robust.Shared.Random; +using Robust.Shared.Timing; namespace Content.Server.SS220.SpiderQueen; @@ -22,6 +23,7 @@ public sealed partial class SpiderQueenSystem : SharedSpiderQueenSystem [Dependency] private readonly TransformSystem _transform = default!; [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly SharedContainerSystem _container = default!; + [Dependency] private readonly IGameTiming _timing = default!; public override void Initialize() { @@ -33,6 +35,27 @@ public override void Initialize() SubscribeLocalEvent(OnWorldSpawn); } + public override void Update(float frameTime) + { + base.Update(frameTime); + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var comp)) + { + if (_timing.CurTime < comp.NextSecond) + continue; + + comp.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); + + var newValue = comp.CurrentMana + comp.PassiveGeneration + comp.CocoonsManaBonus; + comp.CurrentMana = newValue > comp.MaxMana + ? comp.MaxMana + : newValue; + + Dirty(uid, comp); + } + } + private void OnWorldSpawn(SpiderWorldSpawnEvent args) { if (args.Handled) diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs index 327b4c9888d37e..ba3260f8cfce72 100644 --- a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs +++ b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs @@ -7,14 +7,11 @@ using Content.Shared.Popups; using Content.Shared.SS220.SpiderQueen.Components; using Robust.Shared.Network; -using Robust.Shared.Timing; namespace Content.Shared.SS220.SpiderQueen.Systems; public abstract class SharedSpiderQueenSystem : EntitySystem { - [Dependency] private readonly SharedActionsSystem _actions = default!; - [Dependency] private readonly IGameTiming _timing = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; @@ -29,26 +26,6 @@ public override void Initialize() SubscribeLocalEvent(OnCocooningAction); } - public override void Update(float frameTime) - { - base.Update(frameTime); - - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var comp)) - { - if (_timing.CurTime < comp.NextSecond) - continue; - - comp.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); - - var newValue = comp.CurrentMana + comp.PassiveGeneration + comp.CocoonsManaBonus; - comp.CurrentMana = newValue > comp.MaxMana - ? comp.MaxMana - : newValue; - Dirty(uid, comp); - } - } - private void OnExamine(Entity entity, ref ExaminedEvent args) { if (args.Examined == args.Examiner) diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index cd72d60fe7604e..b639d5a123c9f2 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -1,6 +1,9 @@ spider-queen-mana-amount = У вас [color=yellow]{ $current } маны[/color]. Ваш максимум — [color=yellow]{ $max } маны[/color]. spider-queen-not-enough-mana = Недостаточно маны +spider-queen-role-greeting = Королева пауков... +spider-queen-mana-information = У вас { $current } маны. Ваш максимум — { $max } маны. + cocooning-too-close = Слишком близко к другому кокону cocooning-target-not-dead = Цель должна быть мертва cocooning-target-not-humanoid = Цель должна быть гуманоидом From eaeec645790de6214c8d3f6c48373bb5303673f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 14 Sep 2024 19:41:23 +0300 Subject: [PATCH 15/46] Add station announcement --- .../SpiderQueen/SpiderQueenRuleSystem.cs | 2 +- .../SS220/SpiderQueen/SpiderQueenSystem.cs | 31 +++++++++++++++++++ .../Components/SpiderQueenComponent.cs | 9 ++++++ .../ru-RU/ss220/spider-queen/spider-queen.ftl | 3 +- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 1 + 5 files changed, 44 insertions(+), 2 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs index 4f4654736d6f00..9c4104f44cfb95 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs @@ -102,7 +102,7 @@ private void OnGetBriefing(Entity ent, ref GetBriefing var max = spiderQueen.MaxMana; briefing = string.Format("{0}\n{1}", briefing, - Loc.GetString("spider-queen-mana-information", ("current", current), ("max", max))); + Loc.GetString("spider-queen-role-mana-information", ("current", current), ("max", max))); } args.Append(briefing); diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs index 7a5d588b8cdb03..e0923ff9dcfe4c 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs @@ -1,4 +1,6 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Server.Chat.Systems; +using Content.Server.Pinpointer; using Content.Server.Popups; using Content.Shared.Coordinates.Helpers; using Content.Shared.FixedPoint; @@ -8,10 +10,13 @@ using Content.Shared.SS220.SpiderQueen.Systems; using Content.Shared.Storage; using Robust.Server.GameObjects; +using Robust.Shared.Audio.Systems; using Robust.Shared.Containers; using Robust.Shared.Map; +using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Timing; +using Robust.Shared.Utility; namespace Content.Server.SS220.SpiderQueen; @@ -24,6 +29,9 @@ public sealed partial class SpiderQueenSystem : SharedSpiderQueenSystem [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly SharedContainerSystem _container = default!; [Dependency] private readonly IGameTiming _timing = default!; + [Dependency] private readonly ChatSystem _chat = default!; + [Dependency] private readonly NavMapSystem _navMap = default!; + [Dependency] private readonly SharedAudioSystem _audio = default!; public override void Initialize() { @@ -114,6 +122,12 @@ private void OnAfterCocooning(Entity entity, ref AfterCoco spiderCocoon.CocoonOwner = entity.Owner; Dirty(cocoonUid, spiderCocoon); + if (entity.Comp.CocoonsCountToAnnouncement is { } value && + entity.Comp.CocoonsList.Count >= value) + { + DoStationAnnouncement(entity); + } + UpdateCocoonsBonus(entity.Owner); } @@ -152,4 +166,21 @@ private void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? componen component.CocoonsManaBonus = newBonus; Dirty(spider, component); } + + /// + /// Do a station announcement if all conditions are met + /// + private void DoStationAnnouncement(EntityUid uid, SpiderQueenComponent? component = null) + { + if (!Resolve(uid, ref component) || + component.IsAnnounced || + !TryComp(uid, out var xform)) + return; + + var msg = Loc.GetString("spider-queen-warning", + ("location", FormattedMessage.RemoveMarkupOrThrow(_navMap.GetNearestBeaconString((uid, xform))))); + _chat.DispatchGlobalAnnouncement(msg, playSound: false, colorOverride: Color.Red); + _audio.PlayGlobal("/Audio/Misc/notice1.ogg", Filter.Broadcast(), true); + component.IsAnnounced = true; + } } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index 2e1d7c9e18d7b7..3425bfdb98c925 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -8,6 +8,9 @@ namespace Content.Shared.SS220.SpiderQueen.Components; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class SpiderQueenComponent : Component { + [ViewVariables] + public bool IsAnnounced = false; + /// /// Current amount of mana /// @@ -58,4 +61,10 @@ public sealed partial class SpiderQueenComponent : Component /// [DataField] public float CocoonsMinDistance = 0.5f; + + /// + /// How many cocoons need to station announcement + /// + [DataField] + public int? CocoonsCountToAnnouncement; } diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index b639d5a123c9f2..c6adc84f3e974c 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -1,8 +1,9 @@ spider-queen-mana-amount = У вас [color=yellow]{ $current } маны[/color]. Ваш максимум — [color=yellow]{ $max } маны[/color]. spider-queen-not-enough-mana = Недостаточно маны +spider-queen-warning = Замечена аномальная биологическая активность в { $location }. Служба Безопасности должна ликвидировать угрозу до того как активу будет нанесен непоправимый ущерб! spider-queen-role-greeting = Королева пауков... -spider-queen-mana-information = У вас { $current } маны. Ваш максимум — { $max } маны. +spider-queen-role-mana-information = У вас { $current } маны. Ваш максимум — { $max } маны. cocooning-too-close = Слишком близко к другому кокону cocooning-target-not-dead = Цель должна быть мертва diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 761959a6074bd7..09807798a8afdf 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -163,6 +163,7 @@ maxMana: 200 passiveGeneration: 0.5 cocoonsBonusCoefficient: 0.9 + cocoonsCountToAnnouncement: 2 cocoonPrototypes: - SpiderCocoonHorizontal - SpiderCocoonVertical From 90a228c4dd8879582497989c6c2d2fb3477eff44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 14 Sep 2024 20:00:22 +0300 Subject: [PATCH 16/46] fix greentext --- Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl | 4 +++- Resources/Prototypes/SS220/GameRules/midround_antags.yml | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index c6adc84f3e974c..d0478fcdaa721e 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -9,4 +9,6 @@ cocooning-too-close = Слишком близко к другому кокону cocooning-target-not-dead = Цель должна быть мертва cocooning-target-not-humanoid = Цель должна быть гуманоидом -objective-issuer-spider-queen = [color=#7567b6]Spider Queen[/color] +objective-issuer-spider-queen = [color=yellow]Королева пауков[/color] + +spider-queen-round-end-agent-name = [color=green]королева пауков[/color] diff --git a/Resources/Prototypes/SS220/GameRules/midround_antags.yml b/Resources/Prototypes/SS220/GameRules/midround_antags.yml index c4052278f3eed4..ca0704837324b4 100644 --- a/Resources/Prototypes/SS220/GameRules/midround_antags.yml +++ b/Resources/Prototypes/SS220/GameRules/midround_antags.yml @@ -56,6 +56,7 @@ - CreateCocoonsObjective - SpiderQueenSurviveObjective - type: AntagSelection + agentName: spider-queen-round-end-agent-name definitions: - prefRoles: [ SpiderQueen ] spawnerPrototype: SpawnPointGhostSpaceQueen From 7f013b39d23ccc53ec22c36b8ba8e4e27ff15ed6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 14 Sep 2024 20:46:04 +0300 Subject: [PATCH 17/46] Balance changes and some fixes --- .../Locale/ru-RU/ss220/mobs/spider-queen.ftl | 16 +- .../ru-RU/ss220/spider-queen/spider-queen.ftl | 2 +- .../ss220/strucrure/spider-structures.ftl | 24 +++ .../Prototypes/SS220/Damage/modifier_sets.yml | 55 +++++++ .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 147 +++++++++++------- .../Entities/Objects/Misc/spider_web.yml | 15 +- .../Structures/Specific/spider_structures.yml | 10 +- 7 files changed, 195 insertions(+), 74 deletions(-) diff --git a/Resources/Locale/ru-RU/ss220/mobs/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/mobs/spider-queen.ftl index c5c13bfe8efd74..e983fdf2f8df47 100644 --- a/Resources/Locale/ru-RU/ss220/mobs/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/mobs/spider-queen.ftl @@ -1,7 +1,7 @@ spider-royQueen-name = Королева пауков -spider-royQueen-desc = Ваша задача — построить максимально большой улей. Не позволяйте причинить вред потомству. Экипаж - ваша пища, устройте большой пир. +spider-royQueen-desc = Ваша задача — построить максимально большой улей. Не позволяйте причинить вред потомству. Экипаж - ваша пища, устройте большой пир! -spider-royDrone-name = Рыцарь королевы пауков +spider-royDrone-name = Трутень королевы пауков spider-royDrone-desc = Ваша задача — защищать свою королеву всеми возможными способами. Вы её охрана и щит, не позволяйте причинять вред вашему потомству. Во имя паучей королевы! spider-royHunter-name = Паучий охотник @@ -16,26 +16,26 @@ spider-royShooter-desc = Ваша задача — Защищать свою к spider-royLittle-name = Маленький паучок spider-royLittle-desc = Ваша задача — Защищать свою королеву всеми возможными способами. Ваш размер не должен пугать вас, это ваше преимущество. Не позволяйте причинить вред потомству. Экипаж - ваша пища. -ent-MobSpiderSpaceQueen = королева пауков +ent-MobSpiderQueen = королева пауков .desc = Он так светится, что выглядит опасным. .suffix = Улей пауков -ent-MobSpiderSpaceDrone = рыцарь королевы пауков +ent-MobSpiderDrone = трутень королевы пауков .desc = { ent-MobSpiderSpaceQueen.desc } .suffix = { ent-MobSpiderSpaceQueen.suffix } -ent-MobSpiderSpaceHunter = паучий охотник +ent-MobSpiderHunter = паучий охотник .desc = { ent-MobSpiderSpaceQueen.desc } .suffix = { ent-MobSpiderSpaceQueen.suffix } -ent-MobSpiderSpaceGhost = паучий призрак +ent-MobSpiderGhost = паучий призрак .desc = { ent-MobSpiderSpaceQueen.desc } .suffix = { ent-MobSpiderSpaceQueen.suffix } -ent-MobSpiderSpaceShooter = паучий стрелок +ent-MobSpiderShooter = паучий стрелок .desc = { ent-MobSpiderSpaceQueen.desc } .suffix = { ent-MobSpiderSpaceQueen.suffix } -ent-MobSpiderSpaceLittle = маленький паучок +ent-MobSpiderLittle = маленький паучок .desc = { ent-MobSpiderSpaceQueen.desc } .suffix = { ent-MobSpiderSpaceQueen.suffix } diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index d0478fcdaa721e..0bf93e3ac291b7 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -2,7 +2,7 @@ spider-queen-mana-amount = У вас [color=yellow]{ $current } маны[/color] spider-queen-not-enough-mana = Недостаточно маны spider-queen-warning = Замечена аномальная биологическая активность в { $location }. Служба Безопасности должна ликвидировать угрозу до того как активу будет нанесен непоправимый ущерб! -spider-queen-role-greeting = Королева пауков... +spider-queen-role-greeting = Ваша задача — построить максимально большой улей. Не позволяйте причинить вред потомству. Экипаж - ваша пища, устройте большой пир! spider-queen-role-mana-information = У вас { $current } маны. Ваш максимум — { $max } маны. cocooning-too-close = Слишком близко к другому кокону diff --git a/Resources/Locale/ru-RU/ss220/strucrure/spider-structures.ftl b/Resources/Locale/ru-RU/ss220/strucrure/spider-structures.ftl index 0439b9e7682d49..c0344213dc4a23 100644 --- a/Resources/Locale/ru-RU/ss220/strucrure/spider-structures.ftl +++ b/Resources/Locale/ru-RU/ss220/strucrure/spider-structures.ftl @@ -17,3 +17,27 @@ ent-TableWebSpidersDurable = каркас стены из паутины ent-WallWebDurable = прочная паутинная стена .desc = Удерживает паучат внутри, а ассистентов снаружи. .suffix = { ent-TableWebSpiders.suffix } + +ent-BaseSpiderCocoon = кокон из паутины + .desc = описание + .suffix = Улей пауков + +ent-SpiderCocoonHorizontal = { ent-BaseSpiderCocoon } + .desc = { ent-BaseSpiderCocoon.desc } + .suffix = { ent-BaseSpiderCocoon.suffix } + +ent-SpiderCocoonVertical = { ent-BaseSpiderCocoon } + .desc = { ent-BaseSpiderCocoon.desc } + .suffix = { ent-BaseSpiderCocoon.suffix } + +ent-BaseSpiderCocoonDestroyed = разрушенный кокон + .desc = разрушенное описание + .suffix = Улей пауков + +ent-SpiderCocoonHorizontalDestroyed = { ent-BaseSpiderCocoonDestroyed } + .desc = { ent-BaseSpiderCocoonDestroyed.desc } + .suffix = { ent-BaseSpiderCocoonDestroyed.suffix } + +ent-SpiderCocoonVerticalDestroyed = { ent-BaseSpiderCocoonDestroyed } + .desc = { ent-BaseSpiderCocoonDestroyed.desc } + .suffix = { ent-BaseSpiderCocoonDestroyed.suffix } diff --git a/Resources/Prototypes/SS220/Damage/modifier_sets.yml b/Resources/Prototypes/SS220/Damage/modifier_sets.yml index 5d4b09f72ea59f..f466481eb290c5 100644 --- a/Resources/Prototypes/SS220/Damage/modifier_sets.yml +++ b/Resources/Prototypes/SS220/Damage/modifier_sets.yml @@ -18,3 +18,58 @@ Poison: 0.6 Cellular: 1 Radiation: 0.5 + +# Spider queen antag +- type: damageModifierSet + id: SpiderQueen + coefficients: + Piercing: 0.6 + Blunt: 0.5 + Slash: 0.6 + Heat: 0.6 + Poison: 0.2 + +- type: damageModifierSet + id: SpiderDrone + coefficients: + Piercing: 0.6 + Blunt: 0.7 + Slash: 0.7 + Heat: 0.6 + Poison: 0.2 + +- type: damageModifierSet + id: SpiderHunter + coefficients: + Piercing: 0.6 + Blunt: 0.4 + Slash: 0.4 + Heat: 0.6 + Poison: 0.2 + +- type: damageModifierSet + id: SpiderGhost + coefficients: + Piercing: 0.7 + Blunt: 0.5 + Slash: 0.6 + Heat: 0.7 + Poison: 0.2 + +- type: damageModifierSet + id: SpiderShooter + coefficients: + Piercing: 0.5 + Blunt: 0.7 + Slash: 0.7 + Heat: 0.5 + Poison: 0.2 + +- type: damageModifierSet + id: SpiderLittle + coefficients: + Piercing: 0.8 + Blunt: 0.8 + Slash: 0.8 + Heat: 0.8 + Poison: 0.2 diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 09807798a8afdf..3f258d3ec83565 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -59,17 +59,6 @@ - MobMask layer: - MobLayer - - type: MeleeWeapon - hidden: true - soundHit: - path: /Audio/Effects/bite.ogg - angle: 0. - animation: WeaponArcBite - damage: - types: - Piercing: 12 #Damage - Poison: 4 - Structural: 15 - type: MeleeChemicalInjector solution: melee transferAmount: 3 @@ -79,18 +68,6 @@ interactFailureString: petting-failure-generic - type: NoSlip - type: IgnoreSpiderWeb - - type: PassiveDamage # Slight passive regen. Assuming one damage type, comes out to about 4 damage a minute.Самолечение - allowedStates: - - Alive - damageCap: 300 - damage: - types: - Heat: -2.5 - groups: - Brute: -3 - Toxin: -5 - Airloss: -2.5 - Burn: -2.5 - type: Tag tags: - CannotSuicide @@ -146,12 +123,23 @@ channels: - HiveRadio +- type: entity + parent: BaseMobSpiderQueen + id: BaseMobSpiderServant + abstract: true + components: + - type: Tag + tags: + - CannotSuicide + - DoorBumpOpener + - SpiderServant + #Spider queen - type: entity parent: - BaseMobSpiderQueen - MobSpiderQueenGhostRole - id: MobSpiderSpaceQueen + id: MobSpiderQueen name: Spider queen description: spider dance components: @@ -192,6 +180,17 @@ proto: PoisonousAcid capacity: 2 count: 2 + - type: MeleeWeapon + hidden: true + soundHit: + path: /Audio/Effects/bite.ogg + angle: 0. + animation: WeaponArcBite + damage: + types: + Piercing: 25 #Damage + Poison: 5 + Structural: 25 - type: Gun fireRate: 1 useKey: false @@ -199,6 +198,9 @@ availableModes: - FullAuto soundGunshot: /Audio/Weapons/Xeno/alien_spitacid.ogg + - type: Damageable + damageContainer: Biological + damageModifierSet: SpiderQueen - type: SolutionContainerManager solutions: melee: @@ -209,14 +211,26 @@ baseWalkSpeed : 3.5 baseSprintSpeed : 4 - type: LizardAccent + - type: PassiveDamage # Slight passive regen. Assuming one damage type, comes out to about 4 damage a minute.Самолечение + allowedStates: + - Alive + damageCap: 300 + damage: + types: + Bloodloss: -1 + groups: + Brute: -2 + Toxin: -5 + Airloss: -2.5 + Burn: -2.5 #Spiders-servants - type: entity parent: - MobSpiderDroneGhostRole - - BaseMobSpiderQueen - id: MobSpiderSpaceDrone - name: spider guard + - BaseMobSpiderServant + id: MobSpiderDrone + name: spider drone description: spider dance components: - type: Sprite #Спрайт @@ -229,7 +243,7 @@ - type: MobThresholds thresholds: 0: Alive - 85: Dead #HP + 60: Dead #HP - type: DamageStateVisuals states: Alive: @@ -239,13 +253,12 @@ - type: PassiveDamage # Slight passive regen. Assuming one damage type, comes out to about 4 damage a minute. Самолечение allowedStates: - Alive - damageCap: 85 + damageCap: 60 damage: types: - Heat: -3 + Bloodloss: -3 groups: Brute: -2 - Toxin: -5 Airloss: -2 Burn: -2 - type: MeleeWeapon #Damage @@ -257,7 +270,10 @@ damage: types: Piercing: 5 #Damage - Structural: 10 + Structural: 20 + - type: Damageable + damageContainer: Biological + damageModifierSet: SpiderDrone - type: ActionGrant actions: - ActionSpawnSpiderWallWebDurable @@ -272,8 +288,8 @@ - type: entity parent: - MobSpiderHunterGhostRole - - BaseMobSpiderQueen - id: MobSpiderSpaceHunter + - BaseMobSpiderServant + id: MobSpiderHunter name: spider hunt description: spider dance components: @@ -300,9 +316,9 @@ damageCap: 110 damage: types: - Heat: -2.5 + Bloodloss: -1.5 groups: - Brute: -3 + Brute: -1.5 Toxin: -5 Airloss: -2 Burn: -1 @@ -314,8 +330,12 @@ animation: WeaponArcBite damage: types: - Piercing: 15 - Structural: 15 + Piercing: 20 + Poison: 5 + Structural: 10 + - type: Damageable + damageContainer: Biological + damageModifierSet: SpiderHunter - type: Spider webPrototype: SpiderWebDespawned - type: MovementSpeedModifier @@ -328,8 +348,8 @@ - type: entity parent: - MobSpiderGhostGhostRole - - BaseMobSpiderQueen - id: MobSpiderSpaceGhost + - BaseMobSpiderServant + id: MobSpiderGhost name: spider ghost description: spider dance components: @@ -343,7 +363,7 @@ - type: MobThresholds thresholds: 0: Alive - 100: Dead + 90: Dead - type: DamageStateVisuals states: Alive: @@ -353,12 +373,12 @@ - type: PassiveDamage allowedStates: - Alive - damageCap: 100 + damageCap: 90 damage: types: - Heat: -2 + Bloodloss: -1 groups: - Brute: -3 + Brute: -1.5 Toxin: -5 Airloss: -2 Burn: -1 @@ -370,9 +390,12 @@ animation: WeaponArcBite damage: types: - Piercing: 3 - Poison: 4 - Structural: 10 + Piercing: 5 + Poison: 10 + Structural: 5 + - type: Damageable + damageContainer: Biological + damageModifierSet: SpiderGhost - type: SolutionContainerManager solutions: melee: @@ -406,8 +429,8 @@ - type: entity parent: - MobSpiderShooterGhostRole - - BaseMobSpiderQueen - id: MobSpiderSpaceShooter + - BaseMobSpiderServant + id: MobSpiderShooter name: spider shooter description: spider dance components: @@ -421,7 +444,7 @@ - type: MobThresholds thresholds: 0: Alive - 80: Dead + 70: Dead - type: DamageStateVisuals states: Alive: @@ -431,10 +454,10 @@ - type: PassiveDamage allowedStates: - Alive - damageCap: 80 + damageCap: 70 damage: types: - Heat: -3 + Bloodloss: -0.5 groups: Brute: -1 Toxin: -5 @@ -449,8 +472,11 @@ damage: types: Poison: 5 - Piercing: 2 + Piercing: 5 Structural: 5 + - type: Damageable + damageContainer: Biological + damageModifierSet: SpiderShooter - type: SolutionContainerManager solutions: melee: @@ -476,11 +502,12 @@ - type: MovementSpeedModifier baseWalkSpeed : 3 baseSprintSpeed : 3.7 + - type: entity parent: - - BaseMobSpiderQueen + - BaseMobSpiderServant - MobSpiderLittleGhostRole - id: MobSpiderSpaceLittle + id: MobSpiderLittle name: small spider description: spider dance components: @@ -494,7 +521,7 @@ - type: MobThresholds thresholds: 0: Alive - 15: Dead + 30: Dead - type: DamageStateVisuals states: Alive: @@ -504,10 +531,8 @@ - type: PassiveDamage allowedStates: - Alive - damageCap: 15 + damageCap: 30 damage: - types: - Heat: -0.5 groups: Brute: -0.5 Toxin: -0.5 @@ -522,6 +547,10 @@ damage: types: Piercing: 5 + Structural: 10 + - type: Damageable + damageContainer: Biological + damageModifierSet: SpiderLittle - type: TimedDespawn lifetime: 20 - type: MovementSpeedModifier diff --git a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml index 2a99170ea46aab..0c355fba669337 100644 --- a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml +++ b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml @@ -93,8 +93,11 @@ standStillTime: 3 damage: types: - Slash: -10 - Piercing: -40 + Bloodloss: -1 + groups: + Brute: -0.5 + Toxin: -0.5 + Burn: -0.5 ignoreBlacklist: tags: - SpiderQueen @@ -125,8 +128,12 @@ standStillTime: 3 damage: types: - Slash: -10 - Piercing: -40 + Bloodloss: -1.5 + groups: + Brute: -1 + Toxin: -0.5 + Airloss: -1 + Burn: -1 ignoreBlacklist: tags: - SpiderQueen diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index 8bab8acde820d4..4775598b9ad394 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -52,7 +52,8 @@ - type: entity id: BaseSpiderCocoon name: spider cocoon - description: описание + description: description + suffix: Spider hive abstract: true components: - type: Icon @@ -87,7 +88,8 @@ - type: entity id: BaseSpiderCocoonDestroyed name: spider cocoon destroyed - description: описание + description: description + suffix: Spider hive abstract: true components: - type: Icon @@ -254,6 +256,7 @@ - type: entity parent: BaseSpiderCocoon id: SpiderCocoonHorizontal + suffix: Spider hive components: - type: Icon sprite: SS220/Structures/Specific/cocoon.rsi @@ -285,6 +288,7 @@ - type: entity parent: BaseSpiderCocoon id: SpiderCocoonVertical + suffix: Spider hive components: - type: Icon state: cocoon2 @@ -315,6 +319,7 @@ - type: entity parent: BaseSpiderCocoonDestroyed id: SpiderCocoonHorizontalDestroyed + suffix: Spider hive components: - type: Icon state: destroyed_cocoon1 @@ -328,6 +333,7 @@ - type: entity parent: BaseSpiderCocoonDestroyed id: SpiderCocoonVerticalDestroyed + suffix: Spider hive components: - type: Icon state: destroyed_cocoon2 From 8a022788404844245110dda8c26d94a5596236fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 14 Sep 2024 20:57:31 +0300 Subject: [PATCH 18/46] Create cocoons conditoin fixes --- .../Systems/CreateCocoonsConditionSystem.cs | 15 ++++++++------- .../SS220/Roles/SpiderQueenRoleComponent.cs | 2 ++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs b/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs index 316f08a32d9292..44ab368866c13a 100644 --- a/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs +++ b/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs @@ -1,6 +1,7 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt using Content.Server.Objectives.Systems; using Content.Server.SS220.Objectives.Components; +using Content.Server.SS220.Roles; using Content.Shared.Mind; using Content.Shared.Objectives.Components; using Content.Shared.SS220.SpiderQueen.Components; @@ -11,8 +12,6 @@ public sealed partial class CreateCocoonsConditionSystem : EntitySystem { [Dependency] private readonly NumberObjectiveSystem _number = default!; - private Dictionary IsCompletedOnce = new(); - public override void Initialize() { base.Initialize(); @@ -22,13 +21,15 @@ public override void Initialize() private void OnGetProgress(Entity ent, ref ObjectiveGetProgressEvent args) { - args.Progress = GetProgress(args.Mind, _number.GetTarget(ent.Owner)); + args.Progress = GetProgress(args.MindId, args.Mind, _number.GetTarget(ent.Owner)); } - private float GetProgress(MindComponent mind, int target) + private float GetProgress(EntityUid mindId, MindComponent mind, int target) { - if (IsCompletedOnce.TryGetValue(mind, out var comleted) && - comleted) + if (!TryComp(mindId, out var spiderQueenRole)) + return 0f; + + if (spiderQueenRole.IsCreateCocoonsCompletedOnce) return 1f; var mobUid = mind.CurrentEntity; @@ -38,7 +39,7 @@ private float GetProgress(MindComponent mind, int target) if (spiderQueen.CocoonsList.Count >= target) { - IsCompletedOnce.Add(mind, true); + spiderQueenRole.IsCreateCocoonsCompletedOnce = true; return 1f; } else diff --git a/Content.Server/SS220/Roles/SpiderQueenRoleComponent.cs b/Content.Server/SS220/Roles/SpiderQueenRoleComponent.cs index ab5d1a7622d081..d133981679a767 100644 --- a/Content.Server/SS220/Roles/SpiderQueenRoleComponent.cs +++ b/Content.Server/SS220/Roles/SpiderQueenRoleComponent.cs @@ -6,4 +6,6 @@ namespace Content.Server.SS220.Roles; [RegisterComponent, ExclusiveAntagonist] public sealed partial class SpiderQueenRoleComponent : AntagonistRoleComponent { + [ViewVariables] + public bool IsCreateCocoonsCompletedOnce = false; } From 231f2ff3f2db7bacc538563c0eb508560d8427ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 14 Sep 2024 21:08:16 +0300 Subject: [PATCH 19/46] yaml fixes --- Resources/Prototypes/SS220/Actions/Spider_actions.yml | 2 +- .../Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml | 2 +- .../SS220/Entities/Objects/Misc/spider_eggs.yml | 8 ++++---- Resources/Prototypes/SS220/GameRules/midround_antags.yml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Resources/Prototypes/SS220/Actions/Spider_actions.yml b/Resources/Prototypes/SS220/Actions/Spider_actions.yml index 01a8e22c0b2478..5a559cb9ab5df1 100644 --- a/Resources/Prototypes/SS220/Actions/Spider_actions.yml +++ b/Resources/Prototypes/SS220/Actions/Spider_actions.yml @@ -120,7 +120,7 @@ state: little_spider_spawn event: !type:WorldSpawnSpellEvent prototypes: - - id: MobSpiderSpaceLittle + - id: MobSpiderLittle amount: 3 offset: 0, 1 speech: action-speech-spell-spider diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 3f258d3ec83565..c5b2c666ce30ff 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -170,7 +170,7 @@ spawned: - id: FoodMeatSpider amount: 3 - - id: MobSpiderSpaceLittle + - id: MobSpiderLittle amount: 7 - type: Spider webPrototype: SpiderWebDespawned diff --git a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_eggs.yml b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_eggs.yml index 5335c331d321c6..5ab59b4ea246c0 100644 --- a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_eggs.yml +++ b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_eggs.yml @@ -119,7 +119,7 @@ - type: TimedDespawn lifetime: 55 - type: SpawnOnDespawn - prototype: MobSpiderSpaceDrone + prototype: MobSpiderDrone - type: entity parent: BaseSpiderEgg @@ -131,7 +131,7 @@ - type: TimedDespawn #Система цикла lifetime: 80 - type: SpawnOnDespawn - prototype: MobSpiderSpaceHunter #Система цикла + prototype: MobSpiderHunter #Система цикла - type: entity parent: BaseSpiderEgg @@ -143,7 +143,7 @@ - type: TimedDespawn lifetime: 80 - type: SpawnOnDespawn - prototype: MobSpiderSpaceGhost + prototype: MobSpiderGhost - type: entity parent: BaseSpiderEgg @@ -155,4 +155,4 @@ - type: TimedDespawn lifetime: 80 - type: SpawnOnDespawn - prototype: MobSpiderSpaceShooter + prototype: MobSpiderShooter diff --git a/Resources/Prototypes/SS220/GameRules/midround_antags.yml b/Resources/Prototypes/SS220/GameRules/midround_antags.yml index ca0704837324b4..ff5ca6e7967c0e 100644 --- a/Resources/Prototypes/SS220/GameRules/midround_antags.yml +++ b/Resources/Prototypes/SS220/GameRules/midround_antags.yml @@ -50,7 +50,7 @@ earliestStart: 45 minimumPlayers: 30 - type: AntagSpawner - prototype: MobSpiderSpaceQueen + prototype: MobSpiderQueen - type: AntagObjectives objectives: - CreateCocoonsObjective From fdbc0ffc4e8b32b2d211fa964d52a2c860df6264 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sun, 15 Sep 2024 17:20:02 +0300 Subject: [PATCH 20/46] Add bonus to MaxMana from cocoons --- .../SS220/SpiderQueen/SpiderQueenSystem.cs | 12 ++++++++---- .../SpiderQueen/Components/SpiderCocoonComponent.cs | 6 ++++++ .../SpiderQueen/Components/SpiderQueenComponent.cs | 10 ++++++++-- .../Structures/Specific/spider_structures.yml | 1 + 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs index e0923ff9dcfe4c..21f8bc799cc213 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs @@ -54,8 +54,9 @@ public override void Update(float frameTime) continue; comp.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); + comp.MaxMana += comp.CocoonsMaxManaBonus; - var newValue = comp.CurrentMana + comp.PassiveGeneration + comp.CocoonsManaBonus; + var newValue = comp.CurrentMana + comp.PassiveGeneration + comp.CocoonsManaGenerationBonus; comp.CurrentMana = newValue > comp.MaxMana ? comp.MaxMana : newValue; @@ -150,7 +151,8 @@ private void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? componen if (!Resolve(spider, ref component)) return; - var newBonus = FixedPoint2.Zero; + var generationBonus = FixedPoint2.Zero; + var maxManaBonus = FixedPoint2.Zero; var i = 0; foreach (var cocoon in component.CocoonsList) { @@ -159,11 +161,13 @@ private void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? componen container.Count <= 0) continue; - newBonus += spiderCocoon.ManaGenerationBonus * Math.Pow(component.CocoonsBonusCoefficient.Double(), i); + generationBonus += spiderCocoon.ManaGenerationBonus * Math.Pow(component.CocoonsBonusCoefficient.Double(), i); + maxManaBonus += spiderCocoon.MaxManaBonus; i++; } - component.CocoonsManaBonus = newBonus; + component.CocoonsManaGenerationBonus = generationBonus; + component.CocoonsMaxManaBonus = maxManaBonus; Dirty(spider, component); } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs index bf3b45362b5640..02398ee72cbbb6 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs @@ -25,4 +25,10 @@ public sealed partial class SpiderCocoonComponent : Component /// [DataField] public FixedPoint2 ManaGenerationBonus = FixedPoint2.Zero; + + /// + /// Bonus to max mana from this cocoon + /// + [DataField] + public FixedPoint2 MaxManaBonus = FixedPoint2.Zero; } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index 3425bfdb98c925..5d36d6b474bad6 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -45,10 +45,16 @@ public sealed partial class SpiderQueenComponent : Component public List CocoonsList = new(); /// - /// The bonus to passive mana generation that give by cocoons + /// Bonus to maximum mana count that give by cocoons /// [ViewVariables, AutoNetworkedField] - public FixedPoint2 CocoonsManaBonus = FixedPoint2.Zero; + public FixedPoint2 CocoonsMaxManaBonus = FixedPoint2.Zero; + + /// + /// Bonus to passive mana generation that give by cocoons + /// + [ViewVariables, AutoNetworkedField] + public FixedPoint2 CocoonsManaGenerationBonus = FixedPoint2.Zero; /// /// Coefficient that indicating how much the bonus from each subsequent cocoon will decrease diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index 4775598b9ad394..3f9b2854c19d2a 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -84,6 +84,7 @@ - type: SpiderCocoon container: cocoon manaGenerationBonus: 1 + maxManaBonus: 20 - type: entity id: BaseSpiderCocoonDestroyed From fc37ff58d661f83204abc9d498072b1307d7a45e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sun, 15 Sep 2024 18:51:28 +0300 Subject: [PATCH 21/46] Review fixes --- Content.Shared/Damage/Components/DamagedByContactComponent.cs | 3 ++- .../Recipes/Construction/Graphs/structures/steelstairs.yml | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Content.Shared/Damage/Components/DamagedByContactComponent.cs b/Content.Shared/Damage/Components/DamagedByContactComponent.cs index 59cceb713bccdb..937101f0a30fb3 100644 --- a/Content.Shared/Damage/Components/DamagedByContactComponent.cs +++ b/Content.Shared/Damage/Components/DamagedByContactComponent.cs @@ -3,7 +3,8 @@ namespace Content.Shared.Damage.Components; -[NetworkedComponent, RegisterComponent, AutoGenerateComponentState] +[NetworkedComponent, RegisterComponent] +[AutoGenerateComponentState] //SS220 Add stand still time public sealed partial class DamagedByContactComponent : Component { [DataField("nextSecond", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)] diff --git a/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/steelstairs.yml b/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/steelstairs.yml index 5b74ac44a8f5f7..96557293e4148b 100644 --- a/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/steelstairs.yml +++ b/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/steelstairs.yml @@ -1,4 +1,4 @@ -- type: constructionGraph +- type: constructionGraph id: SteelStairs start: start graph: @@ -84,4 +84,4 @@ - !type:DeleteEntity {} steps: - tool: Anchoring - doAfter: 1 + doAfter: 1 \ No newline at end of file From 38c3b0da0171b27253bd7cbfc5c43621c47cdc7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Mon, 16 Sep 2024 20:17:38 +0300 Subject: [PATCH 22/46] Add doAfter to SpiderWorldSpawnEvent, add wallspawn animation and some fixes --- .../SS220/SpiderQueen/SpiderQueenSystem.cs | 70 ++++++--- .../SpiderQueen/SharedSpiderQueenEvents.cs | 32 ++++ .../Systems/SharedSpiderQueenSystem.cs | 24 ++- .../ss220/strucrure/spider-structures.ftl | 7 +- Resources/Prototypes/Actions/spider.yml | 4 +- .../SS220/Actions/Spider_actions.yml | 15 +- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 6 +- .../Structures/Specific/spider_structures.yml | 144 ++++-------------- .../SS220/Effects/wallwebspawn.rsi/meta.json | 31 ++++ .../Effects/wallwebspawn.rsi/webwall.png | Bin 0 -> 10176 bytes .../Actions/action_spider.rsi/meta.json | 3 + .../Actions/action_spider.rsi/wall_spawn.png | Bin 0 -> 1299 bytes .../Actions/action_spider.rsi/web.png | Bin 0 -> 755 bytes .../SS220/Interface/Actions/meta.json | 14 ++ .../Textures/SS220/Interface/Actions/web.png | Bin 0 -> 755 bytes 15 files changed, 203 insertions(+), 147 deletions(-) create mode 100644 Resources/Textures/SS220/Effects/wallwebspawn.rsi/meta.json create mode 100644 Resources/Textures/SS220/Effects/wallwebspawn.rsi/webwall.png create mode 100644 Resources/Textures/SS220/Interface/Actions/action_spider.rsi/wall_spawn.png create mode 100644 Resources/Textures/SS220/Interface/Actions/action_spider.rsi/web.png create mode 100644 Resources/Textures/SS220/Interface/Actions/meta.json create mode 100644 Resources/Textures/SS220/Interface/Actions/web.png diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs index 21f8bc799cc213..06056564f296e4 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs @@ -3,6 +3,7 @@ using Content.Server.Pinpointer; using Content.Server.Popups; using Content.Shared.Coordinates.Helpers; +using Content.Shared.DoAfter; using Content.Shared.FixedPoint; using Content.Shared.Mobs.Systems; using Content.Shared.SS220.SpiderQueen; @@ -32,6 +33,7 @@ public sealed partial class SpiderQueenSystem : SharedSpiderQueenSystem [Dependency] private readonly ChatSystem _chat = default!; [Dependency] private readonly NavMapSystem _navMap = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; + [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; public override void Initialize() { @@ -39,8 +41,8 @@ public override void Initialize() SubscribeLocalEvent(OnAfterCocooning); SubscribeLocalEvent(OnShutdown); - - SubscribeLocalEvent(OnWorldSpawn); + SubscribeLocalEvent(OnWorldSpawn); + SubscribeLocalEvent(OnWorldSpawnDoAfter); } public override void Update(float frameTime) @@ -65,36 +67,70 @@ public override void Update(float frameTime) } } - private void OnWorldSpawn(SpiderWorldSpawnEvent args) + private void OnWorldSpawn(Entity entity, ref SpiderWorldSpawnEvent args) { - if (args.Handled) + if (args.Handled || + entity.Owner != args.Performer) return; - var performer = args.Performer; - if (args.Cost > FixedPoint2.Zero) - { - if (!TryComp(args.Performer, out var component) || - component is null) - return; + var performer = entity.Owner; - if (component.CurrentMana < args.Cost) + if (args.Cost > FixedPoint2.Zero && + !CheckEnoughMana(performer, args.Cost, entity.Comp)) + return; + + var netCoordinates = GetNetCoordinates(args.Target); + var doAfterArgs = new DoAfterArgs( + EntityManager, + performer, + args.DoAfter, + new SpiderWorldSpawnDoAfterEvent() { - _popup.PopupEntity(Loc.GetString("spider-queen-not-enough-mana"), performer, performer); + TargetCoordinates = netCoordinates, + Prototypes = args.Prototypes, + Offset = args.Offset, + Cost = args.Cost, + }, + performer + ) + { + Broadcast = false, + BreakOnDamage = false, + BreakOnMove = true, + NeedHand = false, + BlockDuplicate = true, + CancelDuplicate = true, + DuplicateCondition = DuplicateConditions.SameEvent + }; + + var started = _doAfter.TryStartDoAfter(doAfterArgs); + if (started) + args.Handled = true; + else + Log.Error($"Failed to start DoAfter by {performer}"); + } + + private void OnWorldSpawnDoAfter(Entity entity, ref SpiderWorldSpawnDoAfterEvent args) + { + if (args.Cancelled) + return; + + var performer = entity.Owner; + if (args.Cost > FixedPoint2.Zero) + { + if (!CheckEnoughMana(performer, args.Cost, entity.Comp)) return; - } - component.CurrentMana -= args.Cost; - Dirty(performer, component); + entity.Comp.CurrentMana -= args.Cost; } var getProtos = EntitySpawnCollection.GetSpawns(args.Prototypes, _random); - var targetMapCords = args.Target; + var targetMapCords = GetCoordinates(args.TargetCoordinates); foreach (var proto in getProtos) { Spawn(proto, targetMapCords.SnapToGrid(EntityManager, _mapManager)); targetMapCords = targetMapCords.Offset(args.Offset); } - args.Handled = true; } private void OnAfterCocooning(Entity entity, ref AfterCocooningEvent args) diff --git a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs index 342e98a2f45551..dd74537cfeb656 100644 --- a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs +++ b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs @@ -3,6 +3,7 @@ using Content.Shared.DoAfter; using Content.Shared.FixedPoint; using Content.Shared.Storage; +using Robust.Shared.Map; using Robust.Shared.Serialization; using System.Numerics; @@ -28,6 +29,12 @@ public sealed partial class SpiderWorldSpawnEvent : WorldTargetActionEvent /// [DataField] public FixedPoint2 Cost = FixedPoint2.Zero; + + /// + /// The time it takes before spawn entities + /// + [DataField] + public TimeSpan DoAfter = TimeSpan.Zero; } public sealed partial class SpiderCocooningActionEvent : EntityTargetActionEvent @@ -43,3 +50,28 @@ public sealed partial class SpiderCocooningActionEvent : EntityTargetActionEvent public sealed partial class AfterCocooningEvent : SimpleDoAfterEvent { } + +[Serializable, NetSerializable] +public sealed partial class SpiderWorldSpawnDoAfterEvent : SimpleDoAfterEvent +{ + /// + /// The coordinates of the location that the user targeted. + /// + public NetCoordinates TargetCoordinates; + + /// + /// List of prototypes to spawn + /// + public List Prototypes = new(); + + /// + /// The offset the prototypes will spawn in on relative to the one prior. + /// Set to 0,0 to have them spawn on the same tile. + /// + public Vector2 Offset; + + /// + /// The cost of mana to use this action + /// + public FixedPoint2 Cost = FixedPoint2.Zero; +} diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs index ba3260f8cfce72..ae4c1cc790b741 100644 --- a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs +++ b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs @@ -1,7 +1,7 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt -using Content.Shared.Actions; using Content.Shared.DoAfter; using Content.Shared.Examine; +using Content.Shared.FixedPoint; using Content.Shared.Humanoid; using Content.Shared.Mobs.Systems; using Content.Shared.Popups; @@ -95,4 +95,26 @@ private void OnCocooningAction(Entity entity, ref SpiderCo return; } } + + /// + /// Checks if the spider has enough mana for any action + /// + public bool CheckEnoughMana(EntityUid uid, FixedPoint2 cost, SpiderQueenComponent? component = null) + { + if (!Resolve(uid, ref component)) + { + if (_net.IsServer) + Log.Error($"{uid} doesn't have SpiderQueenComponent to CheckEnoughMana"); + + return false; + } + + if (component.CurrentMana < cost) + { + _popup.PopupEntity(Loc.GetString("spider-queen-not-enough-mana"), uid, uid); + return false; + } + else + return true; + } } diff --git a/Resources/Locale/ru-RU/ss220/strucrure/spider-structures.ftl b/Resources/Locale/ru-RU/ss220/strucrure/spider-structures.ftl index c0344213dc4a23..9749606c672523 100644 --- a/Resources/Locale/ru-RU/ss220/strucrure/spider-structures.ftl +++ b/Resources/Locale/ru-RU/ss220/strucrure/spider-structures.ftl @@ -19,7 +19,8 @@ ent-WallWebDurable = прочная паутинная стена .suffix = { ent-TableWebSpiders.suffix } ent-BaseSpiderCocoon = кокон из паутины - .desc = описание + .desc = Большая куча паучьего шёлка оплетающее... + Что-то массивное. Кажется, или это похоже на туловище? .suffix = Улей пауков ent-SpiderCocoonHorizontal = { ent-BaseSpiderCocoon } @@ -31,8 +32,8 @@ ent-SpiderCocoonVertical = { ent-BaseSpiderCocoon } .suffix = { ent-BaseSpiderCocoon.suffix } ent-BaseSpiderCocoonDestroyed = разрушенный кокон - .desc = разрушенное описание - .suffix = Улей пауков + .desc = { ent-BaseSpiderCocoon.desc } + .suffix = { ent-BaseSpiderCocoon.suffix } ent-SpiderCocoonHorizontalDestroyed = { ent-BaseSpiderCocoonDestroyed } .desc = { ent-BaseSpiderCocoonDestroyed.desc } diff --git a/Resources/Prototypes/Actions/spider.yml b/Resources/Prototypes/Actions/spider.yml index fe37085ecabc54..1907a6c97ef6db 100644 --- a/Resources/Prototypes/Actions/spider.yml +++ b/Resources/Prototypes/Actions/spider.yml @@ -4,7 +4,7 @@ description: Spawns a web that slows your prey down. components: - type: InstantAction - icon: Interface/Actions/web.png + icon: SS220/Interface/Actions/web.png #SS220 new web action sprite event: !type:SpiderWebActionEvent useDelay: 25 @@ -14,6 +14,6 @@ description: Weave a bit of silk for use in arts and crafts. components: - type: InstantAction - icon: Interface/Actions/web.png + icon: SS220/Interface/Actions/web.png #SS220 new web action sprite event: !type:SericultureActionEvent useDelay: 1 diff --git a/Resources/Prototypes/SS220/Actions/Spider_actions.yml b/Resources/Prototypes/SS220/Actions/Spider_actions.yml index 5a559cb9ab5df1..22da2f94b1765a 100644 --- a/Resources/Prototypes/SS220/Actions/Spider_actions.yml +++ b/Resources/Prototypes/SS220/Actions/Spider_actions.yml @@ -16,6 +16,7 @@ amount: 1 offset: 0, 1 cost: 10 + doAfter: 5 - type: entity id: BaseActionSpawnSingleSpiderWeb @@ -52,6 +53,7 @@ amount: 1 offset: 0, 1 cost: 10 + doAfter: 5 - type: entity parent: BaseActionSpawnSpiderEgg @@ -69,6 +71,7 @@ amount: 1 offset: 0, 1 cost: 30 + doAfter: 5 - type: entity parent: BaseActionSpawnSpiderEgg @@ -86,6 +89,7 @@ amount: 1 offset: 0, 1 cost: 40 + doAfter: 5 - type: entity parent: BaseActionSpawnSpiderEgg @@ -103,6 +107,7 @@ amount: 1 offset: 0, 1 cost: 20 + doAfter: 5 #Spider - type: entity @@ -157,11 +162,11 @@ range: 1.5 itemIconStyle: BigAction icon: - sprite: SS220/Structures/Walls/web.rsi #SS220-Walss-Sprite-Update-V4 - state: full + sprite: SS220/Interface/Actions/action_spider.rsi #SS220-Walss-Sprite-Update-V4 + state: wall_spawn event: !type:WorldSpawnSpellEvent prototypes: - - id: TableWebSpiders + - id: WallWebSpawn amount: 1 offset: 0, 1 speech: action-speech-spell-spider @@ -176,8 +181,10 @@ useDelay: 16 event: !type:WorldSpawnSpellEvent prototypes: - - id: TableWebSpidersDurable + - id: WallWebDurableSpawn amount: 1 + offset: 0, 1 + speech: action-speech-spell-spider #Web - type: entity diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index c5b2c666ce30ff..de6554c8dac698 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -9,6 +9,9 @@ name: Probca description: spider dance components: + - type: AutoImplant + implants: + - ThermalVisionImplant - type: NpcFactionMember factions: - SpiderQueen @@ -143,9 +146,6 @@ name: Spider queen description: spider dance components: - - type: AutoImplant - implants: - - ThermalVisionImplant - type: SpiderQueen currentMana: 50 maxMana: 200 diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index 3f9b2854c19d2a..86b091ef892951 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -1,54 +1,6 @@ # AT THE BOTTOM IS A TILE MADE OF COBWEBS. -#TODO: Сделать нормальную анимацию спавна стены без использования костыля в виде спавна тайлов и столов #Base -- type: entity - parent: BaseItemSpider - id: BaseFloorTileItemSpiders - description: These could work as a pretty decent throwing weapon. - abstract: true - components: - - type: Sprite - sprite: Objects/Tiles/web.rsi - state: icon - - type: FloorTile - outputs: - - FloorWebTile - - type: DamageOtherOnHit - damage: - types: - Blunt: 5 - - type: Damageable - damageContainer: Inorganic - - type: Construction - graph: WebObjects - node: tile - - type: TimedDespawn - - type: SpawnOnDespawn - - type: Destructible - thresholds: - - trigger: - !type:DamageTrigger - damage: 1 - behaviors: - - !type:DoActsBehavior - acts: [ "Destruction" ] - - trigger: - !type:DamageTrigger - damage: 20 - behaviors: - - !type:PlaySoundBehavior - sound: - collection: MetalBreak - params: - volume: -8 - - !type:DoActsBehavior - acts: [ "Destruction" ] - - type: DamageOnLand - damage: - types: - Blunt: 5 - - type: entity id: BaseSpiderCocoon name: spider cocoon @@ -123,88 +75,46 @@ - !type:DoActsBehavior acts: [ "Destruction" ] - -#Tile (used to spawn walls) -# - type: entity -# parent: BaseFloorTileItemSpiders -# id: FloorTileItemWebSpiders -# name: web construction -# description: Very smooth and surprisingly durable. -# noSpawn: true -# components: -# - type: TimedDespawn -# lifetime: 5 -# - type: SpawnOnDespawn -# prototype: TableWebSpiders - -# - type: entity -# name: web -# description: Web -# parent: BaseFloorTileItemSpiders -# id: FloorTileItemWebSpidersDurable -# noSpawn: true -# components: -# - type: TimedDespawn -# lifetime: 6 -# - type: SpawnOnDespawn -# prototype: TableWebSpidersDurable -# - type: Sprite -# shader: unshaded -# color: gray - -#Table (заглушка типо как анимация) +#WallSpawnWeb - type: entity - parent: TableBase - id: TableWebSpiders - name: web - description: web + id: WallWebSpawn noSpawn: true components: - - type: Damageable - damageModifierSet: Web + - type: Transform + anchored: True + - type: InteractionOutline + - type: Physics + bodyType: Static - type: Sprite - sprite: Structures/Furniture/Tables/web.rsi - - type: Icon - sprite: Structures/Furniture/Tables/web.rsi - - type: Destructible - thresholds: - - trigger: - !type:DamageTrigger - damage: 10 - behaviors: - - !type:DoActsBehavior - acts: [ "Destruction" ] - - type: MeleeSound - soundGroups: - Brute: - path: - "/Audio/Weapons/slash.ogg" - - type: Construction - graph: WebStructures - node: table - - type: FootstepModifier - footstepSoundCollection: - collection: FootstepCarpet + sprite: SS220/Effects/wallwebspawn.rsi + state: webwall + - type: Fixtures + fixtures: + portalFixture: + shape: + !type:PhysShapeAabb + bounds: "-0.25,-0.48,0.25,0.48" + mask: + - FullTileMask + layer: + - WallLayer + hard: false - type: TimedDespawn - lifetime: 5 + lifetime: 2.4 - type: SpawnOnDespawn prototype: WallWeb - type: entity - parent: TableWebSpiders - id: TableWebSpidersDurable - name: web - description: web + parent: WallWebSpawn + id: WallWebDurableSpawn noSpawn: true components: - - type: TimedDespawn - lifetime: 8 - - type: SpawnOnDespawn - prototype: WallWebDurable - type: Sprite - sprite: Structures/Furniture/Tables/web.rsi - shader: unshaded + sprite: SS220/Effects/wallwebspawn.rsi + state: webwall color: gray + - type: SpawnOnDespawn + prototype: WallWebDurable #Wall - type: entity diff --git a/Resources/Textures/SS220/Effects/wallwebspawn.rsi/meta.json b/Resources/Textures/SS220/Effects/wallwebspawn.rsi/meta.json new file mode 100644 index 00000000000000..81e18e99f4cf14 --- /dev/null +++ b/Resources/Textures/SS220/Effects/wallwebspawn.rsi/meta.json @@ -0,0 +1,31 @@ +{ + "version": 1, + "license": "EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt", + "copyright": "Made by Estkemran (Github) for SS220", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "webwall", + "directions": 1, + "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 + ] + ] + } + ] +} diff --git a/Resources/Textures/SS220/Effects/wallwebspawn.rsi/webwall.png b/Resources/Textures/SS220/Effects/wallwebspawn.rsi/webwall.png new file mode 100644 index 0000000000000000000000000000000000000000..8ee906eab3e28b49631de1493a0e93435443cd55 GIT binary patch literal 10176 zcmYjXbySpJv>m#82$2S9q#FjL;fFNRA>AQ0zz~Ac-61WYARrx*(kJFb-=g53fY8Q3mURMxsB+T1 zp(+qMw{!JmvTG*nP*J}=E|6$^d-%Th$)jpcdJkpPG7;&=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|g^7IDS^aQBcLv!b%>&-h&IoJsL6TCSHRs72x z1X*dA=MrLe^B9>FXe1i;gERxHhkgay1IYG|t*)`;{ZKhVW!SiripZvof~TN8Lg9Jg zIv|w*GD`}qyBscRnOK-Onwy(5JTez#197p?Yhh)vY*u_wh^xQmvT8W6W=mnAh literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/meta.json b/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/meta.json index e062f97dfaff72..00cc38b18ea15c 100644 --- a/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/meta.json +++ b/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/meta.json @@ -28,6 +28,9 @@ { "name": "clown_web_spawn" }, + { + "name": "wall_spawn" + }, { "name": "cocoon" }, diff --git a/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/wall_spawn.png b/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/wall_spawn.png new file mode 100644 index 0000000000000000000000000000000000000000..688e4054ddef427aae8911d324c07ccbf13e208a GIT binary patch literal 1299 zcmV+u1?>8XP)Px(vq?ljR9J<@m%(ovMHI$=-a4+cSqEne-Z*va%4$O(Y7i<1P}HCTDkm-#QvU!h z{0ktV(kl|GXvL*cBqRI=5>Z!JU_M$B#dpW6+ABX&QOEKxluMJGU=WEEF*ZqC9%^nBo(=gVadh z3FetqwY4V#GuM6sAa56V^NmqV(*!`2%k+l#^Vi=G&;lB|Zt(3lU(jeaX*Qe0UW;+} zyLg)|O|pU)uWrk-aLa3?QYqHNGk(8wht<`8SrdY4t%l<)Gq6btAYvHky}f*V@}mx0 zds4tK3;-O*!8A>d96mxKaS(t;qrv#mqg=f=^(&FaF|RcLns*J>GHC&A&Klrpyuh0q0J7KK6IFf9#QkI za1oUzu+l;d4*oaD*(e&7JoqI_{^ay&`Kvc?V zJ{as_`o;`#D@HWh-*M8~2rR8XB%~)0l`@tY$1>w&^O>#={a7hEZDT!bFgQ2}Ku=E( zu~>{>e!b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-m-+wHb$ zMRf1~5i(nVa6X@_!{Jap9*^$t&1UmwA+rQ1dPu?Z`TV>i1PlpM8an~J+-|qDGnNY? z7vXxnE{bqOK}s8ti=6;oT1!7dB55Sz*%EX=m&;{Ph|=Yx8Y8S$t3|C}ePg2r9HDb* zV(kJ&q<;JTzWaud5^?6aqtju2_aZ5k)#bMNPQ#luSM8@{Bl4-j>qE{ zp@=jIL{6ao8VgY=Ex#P_Xne3HJDpCQ2qN@07YKO?2q*efKn7VU5kiST?P`-Sh{mE% z1$Y{SI043hPr#R_soS~4v^=#ucHX1 z!^?BbwJ%ydnX~ACqSqv2k5_12Adu zkR22Vdc9sv)<#qg-=a?L^D8K>eRURfCPIUPr=i#Vsg7ZD>2MQfUr5Hty&q{A8Z%44RPxZj8S3)`A2e014-P|e0000E lWmrjOO-%qQ00008000000002eQ Date: Mon, 16 Sep 2024 20:21:17 +0300 Subject: [PATCH 23/46] ops... --- .../Interface/Actions/action_spider.rsi/web.png | Bin 755 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 Resources/Textures/SS220/Interface/Actions/action_spider.rsi/web.png diff --git a/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/web.png b/Resources/Textures/SS220/Interface/Actions/action_spider.rsi/web.png deleted file mode 100644 index 3cb5b2ad62872cc6d4ff3bd23d825ab407649bd9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 755 zcmV*=AvwQXRdadSSx7#)M`@MR<-;3&>sOJt?E|-m-+wHb$ zMRf1~5i(nVa6X@_!{Jap9*^$t&1UmwA+rQ1dPu?Z`TV>i1PlpM8an~J+-|qDGnNY? z7vXxnE{bqOK}s8ti=6;oT1!7dB55Sz*%EX=m&;{Ph|=Yx8Y8S$t3|C}ePg2r9HDb* zV(kJ&q<;JTzWaud5^?6aqtju2_aZ5k)#bMNPQ#luSM8@{Bl4-j>qE{ zp@=jIL{6ao8VgY=Ex#P_Xne3HJDpCQ2qN@07YKO?2q*efKn7VU5kiST?P`-Sh{mE% z1$Y{SI043hPr#R_soS~4v^=#ucHX1 z!^?BbwJ%ydnX~ACqSqv2k5_12Adu zkR22Vdc9sv)<#qg-=a?L^D8K>eRURfCPIUPr=i#Vsg7ZD>2MQfUr5Hty&q{A8Z%44RPxZj8S3)`A2e014-P|e0000E lWmrjOO-%qQ00008000000002eQ Date: Wed, 18 Sep 2024 21:17:57 +0300 Subject: [PATCH 24/46] Cocoons bonus change --- .../SpiderQueenRuleComponent.cs | 2 +- .../SpiderQueen/Systems/SpiderCocoonSystem.cs | 149 ++++++++++++++++++ .../{ => Systems}/SpiderQueenRuleSystem.cs | 3 +- .../{ => Systems}/SpiderQueenSystem.cs | 52 ++---- .../Components/SpiderCocoonComponent.cs | 32 +++- .../Components/SpiderQueenComponent.cs | 10 +- .../SpiderQueen/SharedSpiderQueenEvents.cs | 5 + .../ru-RU/ss220/spider-queen/spider-queen.ftl | 3 + .../Structures/Specific/spider_structures.yml | 8 +- 9 files changed, 211 insertions(+), 53 deletions(-) rename Content.Server/SS220/SpiderQueen/{ => Components}/SpiderQueenRuleComponent.cs (89%) create mode 100644 Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs rename Content.Server/SS220/SpiderQueen/{ => Systems}/SpiderQueenRuleSystem.cs (97%) rename Content.Server/SS220/SpiderQueen/{ => Systems}/SpiderQueenSystem.cs (87%) diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs b/Content.Server/SS220/SpiderQueen/Components/SpiderQueenRuleComponent.cs similarity index 89% rename from Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs rename to Content.Server/SS220/SpiderQueen/Components/SpiderQueenRuleComponent.cs index 574461ae7adb4c..80a87e122735be 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleComponent.cs +++ b/Content.Server/SS220/SpiderQueen/Components/SpiderQueenRuleComponent.cs @@ -1,7 +1,7 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt using Content.Shared.Whitelist; -namespace Content.Server.SS220.SpiderQueen; +namespace Content.Server.SS220.SpiderQueen.Components; [RegisterComponent] public sealed partial class SpiderQueenRuleComponent : Component diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs new file mode 100644 index 00000000000000..07b7f0e13c911a --- /dev/null +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs @@ -0,0 +1,149 @@ +// © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Server.DoAfter; +using Content.Shared.Damage; +using Content.Shared.DoAfter; +using Content.Shared.Examine; +using Content.Shared.SS220.SpiderQueen; +using Content.Shared.SS220.SpiderQueen.Components; +using Content.Shared.Verbs; +using Robust.Shared.Containers; +using Robust.Shared.Timing; + +namespace Content.Server.SS220.SpiderQueen.Systems; + +public sealed partial class SpiderCocoonSystem : EntitySystem +{ + [Dependency] private readonly SharedContainerSystem _container = default!; + [Dependency] private readonly DamageableSystem _damageable = default!; + [Dependency] private readonly IGameTiming _gameTiming = default!; + [Dependency] private readonly DoAfterSystem _doAfter = default!; + [Dependency] private readonly SpiderQueenSystem _spiderQueen = default!; + + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(OnShutdown); + SubscribeLocalEvent(OnExamine); + SubscribeLocalEvent>(OnAlternativeVerb); + SubscribeLocalEvent(OnExtractMana); + } + + public override void Update(float frameTime) + { + base.Update(frameTime); + + var query = EntityQueryEnumerator(); + while (query.MoveNext(out var uid, out var component)) + { + if (_gameTiming.CurTime < component.NextSecond) + return; + + component.NextSecond = _gameTiming.CurTime + TimeSpan.FromSeconds(1); + UpdateManaAmount(uid, component); + } + } + + private void OnShutdown(Entity entity, ref ComponentShutdown args) + { + var (uid, comp) = entity; + if (comp.CocoonOwner is null || + !TryComp(comp.CocoonOwner, out var queenComponent)) + return; + + queenComponent.CocoonsList.Remove(uid); + _spiderQueen.UpdateCocoonsBonus(uid); + } + + private void OnExamine(Entity entity, ref ExaminedEvent args) + { + if (HasComp(args.Examiner)) + { + args.PushMarkup(Loc.GetString("spider-cocoon-mana-amount", ("amount", entity.Comp.ManaAmount))); + } + } + + private void OnAlternativeVerb(EntityUid uid, SpiderCocoonComponent component, GetVerbsEvent args) + { + if (!args.CanAccess || + !TryComp(args.User, out var spiderQueen)) + return; + + var extractVerb = new AlternativeVerb + { + Text = Loc.GetString("spider-cocoon-extract-mana-verb"), + Act = () => + { + var doAfterEventArgs = new DoAfterArgs(EntityManager, + args.User, + spiderQueen.ExtractManaTime, + new CocoonExtractManaEvent(), + uid, + uid) + { + Broadcast = false, + BreakOnDamage = false, + BreakOnMove = true, + NeedHand = false, + BlockDuplicate = true, + CancelDuplicate = true, + DuplicateCondition = DuplicateConditions.SameEvent + }; + + _doAfter.TryStartDoAfter(doAfterEventArgs); + } + }; + + args.Verbs.Add(extractVerb); + } + + private void OnExtractMana(Entity entity, ref CocoonExtractManaEvent args) + { + if (args.Cancelled || + !TryComp(args.User, out var spiderQueen)) + return; + + var amountToMax = spiderQueen.MaxMana - spiderQueen.CurrentMana; + spiderQueen.CurrentMana += MathF.Min((float)amountToMax, (float)entity.Comp.ManaAmount); + entity.Comp.ManaAmount -= MathF.Min((float)amountToMax, (float)entity.Comp.ManaAmount); + + Dirty(args.User, spiderQueen); + Dirty(entity.Owner, entity.Comp); + } + + private void UpdateManaAmount(EntityUid uid, SpiderCocoonComponent component) + { + if (!_container.TryGetContainer(uid, component.CocoonContainerId, out var container) || + container.ContainedEntities is not { } entities || + entities.Count <= 0) + return; + + foreach (var entity in entities) + { + if (!TryComp(entity, out var damageable)) + continue; + + var canDamage = true; + foreach (var damageType in component.DamageCap) + { + var (type, value) = damageType; + if (damageable.Damage.DamageDict.TryGetValue(type, out var total) && + total >= value) + { + canDamage = false; + break; + } + } + + if (!canDamage) + continue; + + if (component.DamagePerSecond is { } damagePerSecond) + _damageable.TryChangeDamage(entity, damagePerSecond); + + component.ManaAmount += component.ManaByEntity; + } + + Dirty(uid, component); + } +} diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs similarity index 97% rename from Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs rename to Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs index 9c4104f44cfb95..49f21fca6fdc85 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenRuleSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs @@ -6,6 +6,7 @@ using Content.Server.Roles; using Content.Server.SS220.Markers; using Content.Server.SS220.Roles; +using Content.Server.SS220.SpiderQueen.Components; using Content.Server.Station.Components; using Content.Server.Station.Systems; using Content.Shared.Mind; @@ -13,7 +14,7 @@ using Content.Shared.Whitelist; using Robust.Shared.Map; -namespace Content.Server.SS220.SpiderQueen; +namespace Content.Server.SS220.SpiderQueen.Systems; public sealed class SpiderQueenRuleSystem : GameRuleSystem { diff --git a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs similarity index 87% rename from Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs rename to Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 06056564f296e4..4f6507173793c3 100644 --- a/Content.Server/SS220/SpiderQueen/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -19,7 +19,7 @@ using Robust.Shared.Timing; using Robust.Shared.Utility; -namespace Content.Server.SS220.SpiderQueen; +namespace Content.Server.SS220.SpiderQueen.Systems; public sealed partial class SpiderQueenSystem : SharedSpiderQueenSystem { @@ -40,7 +40,6 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnAfterCocooning); - SubscribeLocalEvent(OnShutdown); SubscribeLocalEvent(OnWorldSpawn); SubscribeLocalEvent(OnWorldSpawnDoAfter); } @@ -58,10 +57,8 @@ public override void Update(float frameTime) comp.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); comp.MaxMana += comp.CocoonsMaxManaBonus; - var newValue = comp.CurrentMana + comp.PassiveGeneration + comp.CocoonsManaGenerationBonus; - comp.CurrentMana = newValue > comp.MaxMana - ? comp.MaxMana - : newValue; + var newValue = comp.CurrentMana + comp.PassiveGeneration; + comp.CurrentMana = MathF.Min((float)newValue, (float)comp.MaxMana); Dirty(uid, comp); } @@ -168,26 +165,28 @@ private void OnAfterCocooning(Entity entity, ref AfterCoco UpdateCocoonsBonus(entity.Owner); } - private void OnShutdown(Entity entity, ref ComponentShutdown args) + /// + /// Do a station announcement if all conditions are met + /// + private void DoStationAnnouncement(EntityUid uid, SpiderQueenComponent? component = null) { - var (uid, comp) = entity; - if (comp.CocoonOwner is null || - !TryComp(comp.CocoonOwner, out var queenComponent)) + if (!Resolve(uid, ref component) || + component.IsAnnounced || + !TryComp(uid, out var xform)) return; - queenComponent.CocoonsList.Remove(uid); - UpdateCocoonsBonus(comp.CocoonOwner.Value); + var msg = Loc.GetString("spider-queen-warning", + ("location", FormattedMessage.RemoveMarkupOrThrow(_navMap.GetNearestBeaconString((uid, xform))))); + _chat.DispatchGlobalAnnouncement(msg, playSound: false, colorOverride: Color.Red); + _audio.PlayGlobal("/Audio/Misc/notice1.ogg", Filter.Broadcast(), true); + component.IsAnnounced = true; } - /// - /// Updates the bonus that cocoons give - /// - private void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? component = null) + public void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? component = null) { if (!Resolve(spider, ref component)) return; - var generationBonus = FixedPoint2.Zero; var maxManaBonus = FixedPoint2.Zero; var i = 0; foreach (var cocoon in component.CocoonsList) @@ -197,30 +196,11 @@ private void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? componen container.Count <= 0) continue; - generationBonus += spiderCocoon.ManaGenerationBonus * Math.Pow(component.CocoonsBonusCoefficient.Double(), i); maxManaBonus += spiderCocoon.MaxManaBonus; i++; } - component.CocoonsManaGenerationBonus = generationBonus; component.CocoonsMaxManaBonus = maxManaBonus; Dirty(spider, component); } - - /// - /// Do a station announcement if all conditions are met - /// - private void DoStationAnnouncement(EntityUid uid, SpiderQueenComponent? component = null) - { - if (!Resolve(uid, ref component) || - component.IsAnnounced || - !TryComp(uid, out var xform)) - return; - - var msg = Loc.GetString("spider-queen-warning", - ("location", FormattedMessage.RemoveMarkupOrThrow(_navMap.GetNearestBeaconString((uid, xform))))); - _chat.DispatchGlobalAnnouncement(msg, playSound: false, colorOverride: Color.Red); - _audio.PlayGlobal("/Audio/Misc/notice1.ogg", Filter.Broadcast(), true); - component.IsAnnounced = true; - } } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs index 02398ee72cbbb6..697397c2b314d8 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs @@ -1,4 +1,5 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Shared.Damage; using Content.Shared.FixedPoint; using Robust.Shared.GameStates; @@ -7,6 +8,9 @@ namespace Content.Shared.SS220.SpiderQueen.Components; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class SpiderCocoonComponent : Component { + [ViewVariables] + public TimeSpan NextSecond = TimeSpan.Zero; + /// /// The entity that created this cocoon /// @@ -20,15 +24,33 @@ public sealed partial class SpiderCocoonComponent : Component public string CocoonContainerId = "cocoon"; /// - /// Bonus to passive mana generation from this cocoon. - /// This value may vary depending on the number of cocoons. + /// Bonus to max mana from this cocoon /// [DataField] - public FixedPoint2 ManaGenerationBonus = FixedPoint2.Zero; + public FixedPoint2 MaxManaBonus = FixedPoint2.Zero; /// - /// Bonus to max mana from this cocoon + /// The amount of mana that can be extracted from the cocoon + /// + [DataField, AutoNetworkedField] + public FixedPoint2 ManaAmount = FixedPoint2.Zero; + + /// + /// How much mana is given by entity per second + /// + [DataField, AutoNetworkedField] + public FixedPoint2 ManaByEntity = FixedPoint2.New(1); + + /// + /// How much damage does the entity receive inside the cocoon /// [DataField] - public FixedPoint2 MaxManaBonus = FixedPoint2.Zero; + public DamageSpecifier? DamagePerSecond; + + /// + /// The cap of the damage of the entity, above which the cocoon cannot cause damage. + /// Also, when this damage cap is reached, the cocoon stops accumulating mana + /// + [DataField] + public Dictionary DamageCap = new(); } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index 5d36d6b474bad6..d352b5c4b7f1b8 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -51,16 +51,10 @@ public sealed partial class SpiderQueenComponent : Component public FixedPoint2 CocoonsMaxManaBonus = FixedPoint2.Zero; /// - /// Bonus to passive mana generation that give by cocoons - /// - [ViewVariables, AutoNetworkedField] - public FixedPoint2 CocoonsManaGenerationBonus = FixedPoint2.Zero; - - /// - /// Coefficient that indicating how much the bonus from each subsequent cocoon will decrease + /// The time it takes to extract mana from the cocoon /// [DataField] - public FixedPoint2 CocoonsBonusCoefficient = FixedPoint2.New(1); + public TimeSpan ExtractManaTime = TimeSpan.FromSeconds(3); /// /// The minimum distance between cocoons for their spawn diff --git a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs index dd74537cfeb656..ee05d0bd90aa15 100644 --- a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs +++ b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs @@ -75,3 +75,8 @@ public sealed partial class SpiderWorldSpawnDoAfterEvent : SimpleDoAfterEvent /// public FixedPoint2 Cost = FixedPoint2.Zero; } + +[Serializable, NetSerializable] +public sealed partial class CocoonExtractManaEvent : SimpleDoAfterEvent +{ +} diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index 0bf93e3ac291b7..fde38099d8eb97 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -5,6 +5,9 @@ spider-queen-warning = Замечена аномальная биологиче spider-queen-role-greeting = Ваша задача — построить максимально большой улей. Не позволяйте причинить вред потомству. Экипаж - ваша пища, устройте большой пир! spider-queen-role-mana-information = У вас { $current } маны. Ваш максимум — { $max } маны. +spider-cocoon-mana-amount = В коконе содержится [color=skyblue]{ $amount }[/color] маны. +spider-cocoon-extract-mana-verb = Извлечь ману + cocooning-too-close = Слишком близко к другому кокону cocooning-target-not-dead = Цель должна быть мертва cocooning-target-not-humanoid = Цель должна быть гуманоидом diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index 86b091ef892951..ae1c1aa6a1a350 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -35,8 +35,12 @@ - SpiderCocoon - type: SpiderCocoon container: cocoon - manaGenerationBonus: 1 - maxManaBonus: 20 + manaByCorpse: 1 + damagePerSecond: + types: + Poison: 1 + damageCap: + Poison: 150 - type: entity id: BaseSpiderCocoonDestroyed From a751879d534ed693a34f81d65400f3f14245074e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Wed, 18 Sep 2024 21:23:21 +0300 Subject: [PATCH 25/46] Some fixes --- Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl | 4 ++-- .../SS220/Entities/Structures/Specific/spider_structures.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index fde38099d8eb97..8f580a437b3cee 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -12,6 +12,6 @@ cocooning-too-close = Слишком близко к другому кокону cocooning-target-not-dead = Цель должна быть мертва cocooning-target-not-humanoid = Цель должна быть гуманоидом -objective-issuer-spider-queen = [color=yellow]Королева пауков[/color] +objective-issuer-spider-queen = [color=#c8a2c8]Королева пауков[/color] -spider-queen-round-end-agent-name = [color=green]королева пауков[/color] +spider-queen-round-end-agent-name = [color=#c8a2c8]королева пауков[/color] diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index ae1c1aa6a1a350..dfa98d4c7a6c24 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -35,7 +35,7 @@ - SpiderCocoon - type: SpiderCocoon container: cocoon - manaByCorpse: 1 + manaByEntity: 1 damagePerSecond: types: Poison: 1 From b5b405d89d749f0b539800ef9c5da7a4744ddcba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Wed, 18 Sep 2024 21:24:30 +0300 Subject: [PATCH 26/46] Some fixes 2 --- Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index de6554c8dac698..8fda061391192a 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -150,8 +150,7 @@ currentMana: 50 maxMana: 200 passiveGeneration: 0.5 - cocoonsBonusCoefficient: 0.9 - cocoonsCountToAnnouncement: 2 + cocoonsCountToAnnouncement: 10 cocoonPrototypes: - SpiderCocoonHorizontal - SpiderCocoonVertical From c26efadaa1305c4e673cd32ef2122839465a9fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Thu, 19 Sep 2024 22:49:12 +0300 Subject: [PATCH 27/46] Rename mana and some changes --- .../SpiderQueen/Systems/SpiderCocoonSystem.cs | 92 +++++++++++-------- .../Systems/SpiderQueenRuleSystem.cs | 6 +- .../SpiderQueen/Systems/SpiderQueenSystem.cs | 18 ++-- .../Components/SpiderCocoonComponent.cs | 21 +++-- .../Components/SpiderQueenComponent.cs | 20 ++-- .../SpiderQueen/SharedSpiderQueenEvents.cs | 6 +- .../Systems/SharedSpiderQueenSystem.cs | 14 +-- .../ru-RU/ss220/spider-queen/spider-queen.ftl | 10 +- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 6 +- .../Structures/Specific/spider_structures.yml | 4 +- .../SS220/Objectives/spider_queen.yml | 4 +- 11 files changed, 113 insertions(+), 88 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs index 07b7f0e13c911a..b49c097952c774 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs @@ -1,8 +1,12 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Server.Body.Components; +using Content.Server.Body.Systems; using Content.Server.DoAfter; +using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Damage; using Content.Shared.DoAfter; using Content.Shared.Examine; +using Content.Shared.FixedPoint; using Content.Shared.SS220.SpiderQueen; using Content.Shared.SS220.SpiderQueen.Components; using Content.Shared.Verbs; @@ -18,6 +22,8 @@ public sealed partial class SpiderCocoonSystem : EntitySystem [Dependency] private readonly IGameTiming _gameTiming = default!; [Dependency] private readonly DoAfterSystem _doAfter = default!; [Dependency] private readonly SpiderQueenSystem _spiderQueen = default!; + [Dependency] private readonly BloodstreamSystem _bloodstream = default!; + [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; public override void Initialize() { @@ -26,7 +32,7 @@ public override void Initialize() SubscribeLocalEvent(OnShutdown); SubscribeLocalEvent(OnExamine); SubscribeLocalEvent>(OnAlternativeVerb); - SubscribeLocalEvent(OnExtractMana); + SubscribeLocalEvent(OnExtractMana); } public override void Update(float frameTime) @@ -37,10 +43,19 @@ public override void Update(float frameTime) while (query.MoveNext(out var uid, out var component)) { if (_gameTiming.CurTime < component.NextSecond) - return; + continue; component.NextSecond = _gameTiming.CurTime + TimeSpan.FromSeconds(1); - UpdateManaAmount(uid, component); + if (!_container.TryGetContainer(uid, component.CocoonContainerId, out var container) || + container.ContainedEntities is not { } entities || + entities.Count <= 0) + continue; + + foreach (var entity in entities) + { + ConvertBloodIntoBloodPoints(uid, component, entity, component.BloodConversionPerSecond); + CauseCocoonDamage(uid, component, entity); + } } } @@ -59,7 +74,7 @@ private void OnExamine(Entity entity, ref ExaminedEvent a { if (HasComp(args.Examiner)) { - args.PushMarkup(Loc.GetString("spider-cocoon-mana-amount", ("amount", entity.Comp.ManaAmount))); + args.PushMarkup(Loc.GetString("spider-cocoon-blood-points-amount", ("amount", entity.Comp.BloodPointsAmount))); } } @@ -71,13 +86,13 @@ private void OnAlternativeVerb(EntityUid uid, SpiderCocoonComponent component, G var extractVerb = new AlternativeVerb { - Text = Loc.GetString("spider-cocoon-extract-mana-verb"), + Text = Loc.GetString("spider-cocoon-extract-blood-points-verb"), Act = () => { var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, - spiderQueen.ExtractManaTime, - new CocoonExtractManaEvent(), + spiderQueen.CocoonExtractTime, + new CocoonExtractBloodPintsEvent(), uid, uid) { @@ -97,53 +112,58 @@ private void OnAlternativeVerb(EntityUid uid, SpiderCocoonComponent component, G args.Verbs.Add(extractVerb); } - private void OnExtractMana(Entity entity, ref CocoonExtractManaEvent args) + private void OnExtractMana(Entity entity, ref CocoonExtractBloodPintsEvent args) { if (args.Cancelled || !TryComp(args.User, out var spiderQueen)) return; - var amountToMax = spiderQueen.MaxMana - spiderQueen.CurrentMana; - spiderQueen.CurrentMana += MathF.Min((float)amountToMax, (float)entity.Comp.ManaAmount); - entity.Comp.ManaAmount -= MathF.Min((float)amountToMax, (float)entity.Comp.ManaAmount); + var amountToMax = spiderQueen.MaxBloodPoints - spiderQueen.CurrentBloodPoints; + spiderQueen.CurrentBloodPoints += MathF.Min((float)amountToMax, (float)entity.Comp.BloodPointsAmount); + entity.Comp.BloodPointsAmount -= MathF.Min((float)amountToMax, (float)entity.Comp.BloodPointsAmount); Dirty(args.User, spiderQueen); Dirty(entity.Owner, entity.Comp); } - private void UpdateManaAmount(EntityUid uid, SpiderCocoonComponent component) + private void ConvertBloodIntoBloodPoints(EntityUid uid, SpiderCocoonComponent component, EntityUid target, FixedPoint2 amount) { - if (!_container.TryGetContainer(uid, component.CocoonContainerId, out var container) || - container.ContainedEntities is not { } entities || - entities.Count <= 0) + if (!TryComp(target, out var bloodstream) || + !_solutionContainer.ResolveSolution(target, bloodstream.BloodSolutionName, ref bloodstream.BloodSolution)) return; - foreach (var entity in entities) - { - if (!TryComp(entity, out var damageable)) - continue; - - var canDamage = true; - foreach (var damageType in component.DamageCap) - { - var (type, value) = damageType; - if (damageable.Damage.DamageDict.TryGetValue(type, out var total) && - total >= value) - { - canDamage = false; - break; - } - } + var solutionEnt = bloodstream.BloodSolution.Value; + if (solutionEnt.Comp.Solution.Volume <= FixedPoint2.Zero) + return; - if (!canDamage) - continue; + _bloodstream.TryModifyBleedAmount(target, -2f, bloodstream); + _solutionContainer.SplitSolution(solutionEnt, amount); + component.BloodPointsAmount += amount * component.BloodPointsCoefficient; + Dirty(uid, component); + } - if (component.DamagePerSecond is { } damagePerSecond) - _damageable.TryChangeDamage(entity, damagePerSecond); + private void CauseCocoonDamage(EntityUid uid, SpiderCocoonComponent component, EntityUid target) + { + if (!TryComp(target, out var damageable) || + component.DamagePerSecond is not { } damagePerSecond) + return; - component.ManaAmount += component.ManaByEntity; + var canDamage = true; + foreach (var damageType in component.DamageCap) + { + var (type, value) = damageType; + if (damageable.Damage.DamageDict.TryGetValue(type, out var total) && + total >= value) + { + canDamage = false; + break; + } } + if (!canDamage) + return; + + _damageable.TryChangeDamage(target, damagePerSecond); Dirty(uid, component); } } diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs index 49f21fca6fdc85..8280dd8188a434 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs @@ -99,11 +99,11 @@ private void OnGetBriefing(Entity ent, ref GetBriefing if (mind.OwnedEntity is { } spider && TryComp(spider, out var spiderQueen)) { - var current = spiderQueen.CurrentMana; - var max = spiderQueen.MaxMana; + var current = spiderQueen.CurrentBloodPoints; + var max = spiderQueen.MaxBloodPoints; briefing = string.Format("{0}\n{1}", briefing, - Loc.GetString("spider-queen-role-mana-information", ("current", current), ("max", max))); + Loc.GetString("spider-queen-role-blood-points-information", ("current", current), ("max", max))); } args.Append(briefing); diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 4f6507173793c3..395f090141f7c9 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -55,10 +55,10 @@ public override void Update(float frameTime) continue; comp.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); - comp.MaxMana += comp.CocoonsMaxManaBonus; + comp.MaxBloodPoints += comp.CocoonsMaxBloodPointsBonus; - var newValue = comp.CurrentMana + comp.PassiveGeneration; - comp.CurrentMana = MathF.Min((float)newValue, (float)comp.MaxMana); + var newValue = comp.CurrentBloodPoints + comp.BloodPointsPerSecond; + comp.CurrentBloodPoints = MathF.Min((float)newValue, (float)comp.MaxBloodPoints); Dirty(uid, comp); } @@ -73,7 +73,7 @@ private void OnWorldSpawn(Entity entity, ref SpiderWorldSp var performer = entity.Owner; if (args.Cost > FixedPoint2.Zero && - !CheckEnoughMana(performer, args.Cost, entity.Comp)) + !CheckEnoughBloodPoints(performer, args.Cost, entity.Comp)) return; var netCoordinates = GetNetCoordinates(args.Target); @@ -115,10 +115,10 @@ private void OnWorldSpawnDoAfter(Entity entity, ref Spider var performer = entity.Owner; if (args.Cost > FixedPoint2.Zero) { - if (!CheckEnoughMana(performer, args.Cost, entity.Comp)) + if (!CheckEnoughBloodPoints(performer, args.Cost, entity.Comp)) return; - entity.Comp.CurrentMana -= args.Cost; + entity.Comp.CurrentBloodPoints -= args.Cost; } var getProtos = EntitySpawnCollection.GetSpawns(args.Prototypes, _random); @@ -187,7 +187,7 @@ public void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? component if (!Resolve(spider, ref component)) return; - var maxManaBonus = FixedPoint2.Zero; + var maxBloodPointsBonus = FixedPoint2.Zero; var i = 0; foreach (var cocoon in component.CocoonsList) { @@ -196,11 +196,11 @@ public void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? component container.Count <= 0) continue; - maxManaBonus += spiderCocoon.MaxManaBonus; + maxBloodPointsBonus += spiderCocoon.BloodPointsBonus; i++; } - component.CocoonsMaxManaBonus = maxManaBonus; + component.CocoonsMaxBloodPointsBonus = maxBloodPointsBonus; Dirty(spider, component); } } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs index 697397c2b314d8..f6fc24f1517d15 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs @@ -24,32 +24,37 @@ public sealed partial class SpiderCocoonComponent : Component public string CocoonContainerId = "cocoon"; /// - /// Bonus to max mana from this cocoon + /// Bonus to max blood points from this cocoon /// [DataField] - public FixedPoint2 MaxManaBonus = FixedPoint2.Zero; + public FixedPoint2 BloodPointsBonus = FixedPoint2.Zero; /// - /// The amount of mana that can be extracted from the cocoon + /// The amount of blood points that can be extracted from the cocoon /// [DataField, AutoNetworkedField] - public FixedPoint2 ManaAmount = FixedPoint2.Zero; + public FixedPoint2 BloodPointsAmount = FixedPoint2.Zero; /// - /// How much mana is given by entity per second + /// How much blood points is given by entity per second /// [DataField, AutoNetworkedField] - public FixedPoint2 ManaByEntity = FixedPoint2.New(1); + public FixedPoint2 BloodPointsCoefficient = FixedPoint2.New(0.5); + + /// + /// How much blood is converted into blood points per second + /// + [DataField("bloodConversion"), AutoNetworkedField] + public FixedPoint2 BloodConversionPerSecond = FixedPoint2.New(2); /// /// How much damage does the entity receive inside the cocoon /// - [DataField] + [DataField("damage")] public DamageSpecifier? DamagePerSecond; /// /// The cap of the damage of the entity, above which the cocoon cannot cause damage. - /// Also, when this damage cap is reached, the cocoon stops accumulating mana /// [DataField] public Dictionary DamageCap = new(); diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index d352b5c4b7f1b8..d5644159082cd9 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -12,22 +12,22 @@ public sealed partial class SpiderQueenComponent : Component public bool IsAnnounced = false; /// - /// Current amount of mana + /// Current amount of blood points /// [DataField, AutoNetworkedField] - public FixedPoint2 CurrentMana = FixedPoint2.Zero; + public FixedPoint2 CurrentBloodPoints = FixedPoint2.Zero; /// - /// Maximum amount of mana + /// Maximum amount of blood points /// [DataField] - public FixedPoint2 MaxMana = FixedPoint2.Zero; + public FixedPoint2 MaxBloodPoints = FixedPoint2.Zero; /// - /// How much mana will be generated in a second + /// How much blood points will be generated in a second /// [DataField] - public FixedPoint2 PassiveGeneration = FixedPoint2.New(0.5); + public FixedPoint2 BloodPointsPerSecond = FixedPoint2.New(0.5); [ViewVariables] public TimeSpan NextSecond = TimeSpan.Zero; @@ -45,16 +45,16 @@ public sealed partial class SpiderQueenComponent : Component public List CocoonsList = new(); /// - /// Bonus to maximum mana count that give by cocoons + /// Bonus to maximum blood points that give by cocoons /// [ViewVariables, AutoNetworkedField] - public FixedPoint2 CocoonsMaxManaBonus = FixedPoint2.Zero; + public FixedPoint2 CocoonsMaxBloodPointsBonus = FixedPoint2.Zero; /// - /// The time it takes to extract mana from the cocoon + /// The time it takes to extract blood points from the cocoon /// [DataField] - public TimeSpan ExtractManaTime = TimeSpan.FromSeconds(3); + public TimeSpan CocoonExtractTime = TimeSpan.FromSeconds(3); /// /// The minimum distance between cocoons for their spawn diff --git a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs index ee05d0bd90aa15..be9b086eeea2d5 100644 --- a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs +++ b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs @@ -25,7 +25,7 @@ public sealed partial class SpiderWorldSpawnEvent : WorldTargetActionEvent public Vector2 Offset; /// - /// The cost of mana to use this action + /// The cost of blood points to use this action /// [DataField] public FixedPoint2 Cost = FixedPoint2.Zero; @@ -71,12 +71,12 @@ public sealed partial class SpiderWorldSpawnDoAfterEvent : SimpleDoAfterEvent public Vector2 Offset; /// - /// The cost of mana to use this action + /// The cost of blood points to use this action /// public FixedPoint2 Cost = FixedPoint2.Zero; } [Serializable, NetSerializable] -public sealed partial class CocoonExtractManaEvent : SimpleDoAfterEvent +public sealed partial class CocoonExtractBloodPintsEvent : SimpleDoAfterEvent { } diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs index ae4c1cc790b741..fc385ec85a976e 100644 --- a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs +++ b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs @@ -30,8 +30,8 @@ private void OnExamine(Entity entity, ref ExaminedEvent ar { if (args.Examined == args.Examiner) { - args.PushMarkup(Loc.GetString("spider-queen-mana-amount", - ("current", entity.Comp.CurrentMana.Int()), ("max", entity.Comp.MaxMana.Int()))); + args.PushMarkup(Loc.GetString("spider-queen-blood-points-amount", + ("current", entity.Comp.CurrentBloodPoints.Int()), ("max", entity.Comp.MaxBloodPoints.Int()))); } } @@ -97,21 +97,21 @@ private void OnCocooningAction(Entity entity, ref SpiderCo } /// - /// Checks if the spider has enough mana for any action + /// Checks if the spider has enough blood points for any action /// - public bool CheckEnoughMana(EntityUid uid, FixedPoint2 cost, SpiderQueenComponent? component = null) + public bool CheckEnoughBloodPoints(EntityUid uid, FixedPoint2 cost, SpiderQueenComponent? component = null) { if (!Resolve(uid, ref component)) { if (_net.IsServer) - Log.Error($"{uid} doesn't have SpiderQueenComponent to CheckEnoughMana"); + Log.Error($"{uid} doesn't have SpiderQueenComponent to CheckEnoughBloodPoints"); return false; } - if (component.CurrentMana < cost) + if (component.CurrentBloodPoints < cost) { - _popup.PopupEntity(Loc.GetString("spider-queen-not-enough-mana"), uid, uid); + _popup.PopupEntity(Loc.GetString("spider-queen-not-enough-blood-points"), uid, uid); return false; } else diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index 8f580a437b3cee..844d68be6d7dfd 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -1,12 +1,12 @@ -spider-queen-mana-amount = У вас [color=yellow]{ $current } маны[/color]. Ваш максимум — [color=yellow]{ $max } маны[/color]. -spider-queen-not-enough-mana = Недостаточно маны +spider-queen-blood-points-amount = У вас [color=#800000]{ $current } крови[/color]. Ваш максимум — [color=#800000]{ $max } крови[/color]. +spider-queen-not-enough-blood-points = Недостаточно [color=#800000]крови[/color] spider-queen-warning = Замечена аномальная биологическая активность в { $location }. Служба Безопасности должна ликвидировать угрозу до того как активу будет нанесен непоправимый ущерб! spider-queen-role-greeting = Ваша задача — построить максимально большой улей. Не позволяйте причинить вред потомству. Экипаж - ваша пища, устройте большой пир! -spider-queen-role-mana-information = У вас { $current } маны. Ваш максимум — { $max } маны. +spider-queen-role-blood-points-information = У вас { $current } крови. Ваш максимум — { $max } крови. -spider-cocoon-mana-amount = В коконе содержится [color=skyblue]{ $amount }[/color] маны. -spider-cocoon-extract-mana-verb = Извлечь ману +spider-cocoon-blood-points-amount = В коконе содержится [color=#800000]{ $amount } крови[/color]. +spider-cocoon-extract-blood-points-verb = Извлечь ману cocooning-too-close = Слишком близко к другому кокону cocooning-target-not-dead = Цель должна быть мертва diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 8fda061391192a..d64b3552061bcf 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -147,9 +147,9 @@ description: spider dance components: - type: SpiderQueen - currentMana: 50 - maxMana: 200 - passiveGeneration: 0.5 + currentBloodPoints: 50 + maxBloodPoints: 200 + bloodPointsPerSecond: 0.5 cocoonsCountToAnnouncement: 10 cocoonPrototypes: - SpiderCocoonHorizontal diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index dfa98d4c7a6c24..50fe0b4daf9878 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -35,8 +35,8 @@ - SpiderCocoon - type: SpiderCocoon container: cocoon - manaByEntity: 1 - damagePerSecond: + bloodPointsBonus: 20 + damage: types: Poison: 1 damageCap: diff --git a/Resources/Prototypes/SS220/Objectives/spider_queen.yml b/Resources/Prototypes/SS220/Objectives/spider_queen.yml index 6cfaf81fb67e94..34204fffe5059b 100644 --- a/Resources/Prototypes/SS220/Objectives/spider_queen.yml +++ b/Resources/Prototypes/SS220/Objectives/spider_queen.yml @@ -21,8 +21,8 @@ state: cocoon2 - type: NumberObjective # dragon can only spawn 3 rifts so keep objective the same - min: 2 - max: 2 + min: 10 + max: 10 title: objective-create-cocoons-title description: objective-create-cocoons-description - type: CreateCocoonsCondition From f9a994d2bfc0dad0f14e19fb482b2d21429bce8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Thu, 19 Sep 2024 23:19:34 +0300 Subject: [PATCH 28/46] Some fixes --- .../SpiderQueen/Systems/SpiderCocoonSystem.cs | 6 ++-- .../SpiderQueen/Systems/SpiderQueenSystem.cs | 28 +------------------ .../Components/SpiderCocoonComponent.cs | 4 +-- .../Components/SpiderQueenComponent.cs | 8 +----- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 11 +++++++- .../Entities/Objects/Misc/spider_web.yml | 2 ++ Resources/Prototypes/SS220/tags.yml | 3 ++ 7 files changed, 22 insertions(+), 40 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs index b49c097952c774..46f7513ddc3c83 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs @@ -67,7 +67,7 @@ private void OnShutdown(Entity entity, ref ComponentShutd return; queenComponent.CocoonsList.Remove(uid); - _spiderQueen.UpdateCocoonsBonus(uid); + queenComponent.MaxBloodPoints -= entity.Comp.BloodPointsBonus; } private void OnExamine(Entity entity, ref ExaminedEvent args) @@ -136,9 +136,9 @@ private void ConvertBloodIntoBloodPoints(EntityUid uid, SpiderCocoonComponent co if (solutionEnt.Comp.Solution.Volume <= FixedPoint2.Zero) return; - _bloodstream.TryModifyBleedAmount(target, -2f, bloodstream); + _bloodstream.TryModifyBleedAmount(target, -1f, bloodstream); _solutionContainer.SplitSolution(solutionEnt, amount); - component.BloodPointsAmount += amount * component.BloodPointsCoefficient; + component.BloodPointsAmount += amount * component.BloodConversionCoefficient; Dirty(uid, component); } diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 395f090141f7c9..74419adac45560 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -55,7 +55,6 @@ public override void Update(float frameTime) continue; comp.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); - comp.MaxBloodPoints += comp.CocoonsMaxBloodPointsBonus; var newValue = comp.CurrentBloodPoints + comp.BloodPointsPerSecond; comp.CurrentBloodPoints = MathF.Min((float)newValue, (float)comp.MaxBloodPoints); @@ -151,6 +150,7 @@ private void OnAfterCocooning(Entity entity, ref AfterCoco _container.Insert(target, container); entity.Comp.CocoonsList.Add(cocoonUid); + entity.Comp.MaxBloodPoints += spiderCocoon.BloodPointsBonus; Dirty(entity.Owner, entity.Comp); spiderCocoon.CocoonOwner = entity.Owner; @@ -158,11 +158,7 @@ private void OnAfterCocooning(Entity entity, ref AfterCoco if (entity.Comp.CocoonsCountToAnnouncement is { } value && entity.Comp.CocoonsList.Count >= value) - { DoStationAnnouncement(entity); - } - - UpdateCocoonsBonus(entity.Owner); } /// @@ -181,26 +177,4 @@ private void DoStationAnnouncement(EntityUid uid, SpiderQueenComponent? componen _audio.PlayGlobal("/Audio/Misc/notice1.ogg", Filter.Broadcast(), true); component.IsAnnounced = true; } - - public void UpdateCocoonsBonus(EntityUid spider, SpiderQueenComponent? component = null) - { - if (!Resolve(spider, ref component)) - return; - - var maxBloodPointsBonus = FixedPoint2.Zero; - var i = 0; - foreach (var cocoon in component.CocoonsList) - { - if (!TryComp(cocoon, out var spiderCocoon) || - !_container.TryGetContainer(cocoon, spiderCocoon.CocoonContainerId, out var container) || - container.Count <= 0) - continue; - - maxBloodPointsBonus += spiderCocoon.BloodPointsBonus; - i++; - } - - component.CocoonsMaxBloodPointsBonus = maxBloodPointsBonus; - Dirty(spider, component); - } } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs index f6fc24f1517d15..9753b4ea0dbf70 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs @@ -36,10 +36,10 @@ public sealed partial class SpiderCocoonComponent : Component public FixedPoint2 BloodPointsAmount = FixedPoint2.Zero; /// - /// How much blood points is given by entity per second + /// How much blood points is given for each unit of blood /// [DataField, AutoNetworkedField] - public FixedPoint2 BloodPointsCoefficient = FixedPoint2.New(0.5); + public FixedPoint2 BloodConversionCoefficient = FixedPoint2.New(0.5); /// /// How much blood is converted into blood points per second diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index d5644159082cd9..288caef71cb0d3 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -20,7 +20,7 @@ public sealed partial class SpiderQueenComponent : Component /// /// Maximum amount of blood points /// - [DataField] + [DataField, AutoNetworkedField] public FixedPoint2 MaxBloodPoints = FixedPoint2.Zero; /// @@ -44,12 +44,6 @@ public sealed partial class SpiderQueenComponent : Component [ViewVariables, AutoNetworkedField] public List CocoonsList = new(); - /// - /// Bonus to maximum blood points that give by cocoons - /// - [ViewVariables, AutoNetworkedField] - public FixedPoint2 CocoonsMaxBloodPointsBonus = FixedPoint2.Zero; - /// /// The time it takes to extract blood points from the cocoon /// diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index d64b3552061bcf..4614e0135efee4 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -136,6 +136,8 @@ - CannotSuicide - DoorBumpOpener - SpiderServant + - type: Puller + needsHands: false #Spider queen - type: entity @@ -210,6 +212,8 @@ baseWalkSpeed : 3.5 baseSprintSpeed : 4 - type: LizardAccent + - type: Puller + needsHands: false - type: PassiveDamage # Slight passive regen. Assuming one damage type, comes out to about 4 damage a minute.Самолечение allowedStates: - Alive @@ -504,7 +508,7 @@ - type: entity parent: - - BaseMobSpiderServant + - BaseMobSpiderQueen - MobSpiderLittleGhostRole id: MobSpiderLittle name: small spider @@ -555,6 +559,11 @@ - type: MovementSpeedModifier baseWalkSpeed : 3.5 baseSprintSpeed : 4.5 + - type: Tag + tags: + - CannotSuicide + - DoorBumpOpener + - SpiderLittle # GHOST ROLES diff --git a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml index 0c355fba669337..f15d80f419c672 100644 --- a/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml +++ b/Resources/Prototypes/SS220/Entities/Objects/Misc/spider_web.yml @@ -102,6 +102,7 @@ tags: - SpiderQueen - SpiderServant + - SpiderLittle - type: entity parent: BaseSpiderWeb @@ -138,6 +139,7 @@ tags: - SpiderQueen - SpiderServant + - SpiderLittle - type: entity parent: BaseSpiderWeb diff --git a/Resources/Prototypes/SS220/tags.yml b/Resources/Prototypes/SS220/tags.yml index 8d9e165a5a08de..1795668639e7c9 100644 --- a/Resources/Prototypes/SS220/tags.yml +++ b/Resources/Prototypes/SS220/tags.yml @@ -120,3 +120,6 @@ - type: Tag id: SpiderQueenSpawnMarker + +- type: + id: SpiderLittle From 5b5ea91997afbb81a982bc7ce61dfa0e0236eb54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 20 Sep 2024 20:12:02 +0300 Subject: [PATCH 29/46] Tag fix --- Resources/Prototypes/SS220/tags.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/Prototypes/SS220/tags.yml b/Resources/Prototypes/SS220/tags.yml index 61f0046358bcd3..8cc367926e5b7d 100644 --- a/Resources/Prototypes/SS220/tags.yml +++ b/Resources/Prototypes/SS220/tags.yml @@ -124,5 +124,5 @@ - type: Tag id: SpiderQueenSpawnMarker -- type: +- type: Tag id: SpiderLittle From 08267547eb22fda6dc62da802a375f84de05e3e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 20 Sep 2024 21:06:49 +0300 Subject: [PATCH 30/46] Add hunger conversion --- .../SpiderQueen/Systems/SpiderCocoonSystem.cs | 3 +++ .../SpiderQueen/Systems/SpiderQueenSystem.cs | 24 ++++++++++++++----- .../Components/SpiderCocoonComponent.cs | 2 +- .../Components/SpiderQueenComponent.cs | 12 +++++++--- 4 files changed, 31 insertions(+), 10 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs index 46f7513ddc3c83..d1882ca8bb5e23 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs @@ -126,6 +126,9 @@ private void OnExtractMana(Entity entity, ref CocoonExtra Dirty(entity.Owner, entity.Comp); } + /// + /// Converts entity blood into blood points based on the + /// private void ConvertBloodIntoBloodPoints(EntityUid uid, SpiderCocoonComponent component, EntityUid target, FixedPoint2 amount) { if (!TryComp(target, out var bloodstream) || diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 74419adac45560..f7232bf1077e2f 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -1,11 +1,12 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt using Content.Server.Chat.Systems; using Content.Server.Pinpointer; -using Content.Server.Popups; using Content.Shared.Coordinates.Helpers; using Content.Shared.DoAfter; using Content.Shared.FixedPoint; using Content.Shared.Mobs.Systems; +using Content.Shared.Nutrition.Components; +using Content.Shared.Nutrition.EntitySystems; using Content.Shared.SS220.SpiderQueen; using Content.Shared.SS220.SpiderQueen.Components; using Content.Shared.SS220.SpiderQueen.Systems; @@ -23,7 +24,6 @@ namespace Content.Server.SS220.SpiderQueen.Systems; public sealed partial class SpiderQueenSystem : SharedSpiderQueenSystem { - [Dependency] private readonly PopupSystem _popup = default!; [Dependency] private readonly IRobustRandom _random = default!; [Dependency] private readonly IMapManager _mapManager = default!; [Dependency] private readonly TransformSystem _transform = default!; @@ -34,6 +34,7 @@ public sealed partial class SpiderQueenSystem : SharedSpiderQueenSystem [Dependency] private readonly NavMapSystem _navMap = default!; [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; + [Dependency] private readonly HungerSystem _hunger = default!; public override void Initialize() { @@ -56,10 +57,8 @@ public override void Update(float frameTime) comp.NextSecond = _timing.CurTime + TimeSpan.FromSeconds(1); - var newValue = comp.CurrentBloodPoints + comp.BloodPointsPerSecond; - comp.CurrentBloodPoints = MathF.Min((float)newValue, (float)comp.MaxBloodPoints); - - Dirty(uid, comp); + if (!_hunger.IsHungerBelowState(uid, HungerThreshold.Okay)) + ConvertHungerIntoBloodPoints(uid, comp, comp.HungerConversionPerSecond); } } @@ -177,4 +176,17 @@ private void DoStationAnnouncement(EntityUid uid, SpiderQueenComponent? componen _audio.PlayGlobal("/Audio/Misc/notice1.ogg", Filter.Broadcast(), true); component.IsAnnounced = true; } + + /// + /// Converts hunger into blood points based on the + /// + private void ConvertHungerIntoBloodPoints(EntityUid uid, SpiderQueenComponent component, float amount, HungerComponent? hunger = null) + { + if (!Resolve(uid, ref hunger)) + return; + + _hunger.ModifyHunger(uid, -amount, hunger); + component.CurrentBloodPoints += amount * component.HungerConvertCoefficient; + Dirty(uid, component); + } } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs index 9753b4ea0dbf70..cfcc5ace347a4c 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs @@ -39,7 +39,7 @@ public sealed partial class SpiderCocoonComponent : Component /// How much blood points is given for each unit of blood /// [DataField, AutoNetworkedField] - public FixedPoint2 BloodConversionCoefficient = FixedPoint2.New(0.5); + public float BloodConversionCoefficient = 0.5f; /// /// How much blood is converted into blood points per second diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index 288caef71cb0d3..e323fd2b398c9d 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -24,10 +24,16 @@ public sealed partial class SpiderQueenComponent : Component public FixedPoint2 MaxBloodPoints = FixedPoint2.Zero; /// - /// How much blood points will be generated in a second + /// How much hunger converts into blood points per second /// - [DataField] - public FixedPoint2 BloodPointsPerSecond = FixedPoint2.New(0.5); + [DataField("hungerConversion")] + public float HungerConversionPerSecond = 0.25f; + + /// + /// How much blood points is given for each unit of hunger + /// + [DataField("convertCoefficient")] + public float HungerConvertCoefficient = 2f; [ViewVariables] public TimeSpan NextSecond = TimeSpan.Zero; From a7e7229ed96a33449e70f67d6f151602827ad613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 20 Sep 2024 21:32:02 +0300 Subject: [PATCH 31/46] Mother of balance --- .../SpiderQueen/Systems/SpiderQueenSystem.cs | 12 ++- .../Components/SpiderCocoonComponent.cs | 4 +- .../Components/SpiderQueenComponent.cs | 2 +- .../SS220/Actions/Spider_actions.yml | 83 +++++++++++++++---- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 18 ++-- .../Structures/Specific/spider_structures.yml | 14 ++-- .../Graphs/structures/spider_structures.yml | 8 +- 7 files changed, 100 insertions(+), 41 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index f7232bf1077e2f..3b6796f206734e 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -185,8 +185,16 @@ private void ConvertHungerIntoBloodPoints(EntityUid uid, SpiderQueenComponent co if (!Resolve(uid, ref hunger)) return; - _hunger.ModifyHunger(uid, -amount, hunger); - component.CurrentBloodPoints += amount * component.HungerConvertCoefficient; + var amountToMax = component.MaxBloodPoints - component.CurrentBloodPoints; + if (amountToMax <= FixedPoint2.Zero) + return; + + var value = amount * component.HungerConvertCoefficient; + value = MathF.Min(value, (float)amountToMax); + + var hungerDecreaseValue = -(value / component.HungerConvertCoefficient); + _hunger.ModifyHunger(uid, hungerDecreaseValue, hunger); + component.CurrentBloodPoints += value; Dirty(uid, component); } } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs index cfcc5ace347a4c..a1cffd58844a70 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs @@ -39,13 +39,13 @@ public sealed partial class SpiderCocoonComponent : Component /// How much blood points is given for each unit of blood /// [DataField, AutoNetworkedField] - public float BloodConversionCoefficient = 0.5f; + public float BloodConversionCoefficient = 1f; /// /// How much blood is converted into blood points per second /// [DataField("bloodConversion"), AutoNetworkedField] - public FixedPoint2 BloodConversionPerSecond = FixedPoint2.New(2); + public FixedPoint2 BloodConversionPerSecond = FixedPoint2.New(0.5); /// /// How much damage does the entity receive inside the cocoon diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index e323fd2b398c9d..830f3168f15ebc 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -54,7 +54,7 @@ public sealed partial class SpiderQueenComponent : Component /// The time it takes to extract blood points from the cocoon /// [DataField] - public TimeSpan CocoonExtractTime = TimeSpan.FromSeconds(3); + public TimeSpan CocoonExtractTime = TimeSpan.FromSeconds(5); /// /// The minimum distance between cocoons for their spawn diff --git a/Resources/Prototypes/SS220/Actions/Spider_actions.yml b/Resources/Prototypes/SS220/Actions/Spider_actions.yml index 0a1c18f59376f3..6367584ac5b2b1 100644 --- a/Resources/Prototypes/SS220/Actions/Spider_actions.yml +++ b/Resources/Prototypes/SS220/Actions/Spider_actions.yml @@ -1,6 +1,6 @@ #Base - type: entity - id: BaseActionSpawnSpiderEgg + id: BaseActionSpawnSpiderEggBloodPoints abstract: true components: - type: WorldTargetAction @@ -10,13 +10,12 @@ icon: sprite: SS220/Interface/Actions/action_spider.rsi state: guard_spawn - event: !type:SpiderWorldSpawnEvent + event: !type:WorldSpawnSpellEvent prototypes: - id: SpiderEggDrone amount: 1 offset: 0, 1 - cost: 10 - doAfter: 5 + speech: action-speech-spell-spider - type: entity id: BaseActionSpawnSingleSpiderWeb @@ -40,8 +39,8 @@ #Egg - type: entity - parent: BaseActionSpawnSpiderEgg - id: ActionSpawnSpiderEggDrone + parent: BaseActionSpawnSpiderEggBloodPoints + id: ActionSpawnSpiderEggDroneBloodPoints name: guard spider egg description: He is also a drone and can build crystals and walls. categories: [ HideSpawnMenu ] @@ -52,12 +51,12 @@ - id: SpiderEggDrone amount: 1 offset: 0, 1 - cost: 10 + cost: 40 doAfter: 5 - type: entity parent: BaseActionSpawnSpiderEgg - id: ActionSpawnSpiderEggHunter + id: ActionSpawnSpiderEggHunterBloodPoints name: hunter spider egg categories: [ HideSpawnMenu ] components: @@ -70,12 +69,12 @@ - id: SpiderEggHunter amount: 1 offset: 0, 1 - cost: 30 + cost: 60 doAfter: 5 - type: entity parent: BaseActionSpawnSpiderEgg - id: ActionSpawnSpiderEggGhost + id: ActionSpawnSpiderEggGhostBloodPoints name: ghost spider egg categories: [ HideSpawnMenu ] components: @@ -88,12 +87,12 @@ - id: SpiderEggGhost amount: 1 offset: 0, 1 - cost: 40 + cost: 60 doAfter: 5 - type: entity parent: BaseActionSpawnSpiderEgg - id: ActionSpawnSpiderEggShooter + id: ActionSpawnSpiderEggShooterBloodPoints name: shooter spider egg categories: [ HideSpawnMenu ] components: @@ -106,12 +105,12 @@ - id: SpiderEggShooter amount: 1 offset: 0, 1 - cost: 20 + cost: 50 doAfter: 5 #Spider - type: entity - id: ActionSpawnSpiderLittle + id: ActionSpawnSpiderLittleBloodPoints name: release the spiderlings description: Releases three small spiders that attack your prey. The spiders disappear after 20 seconds. categories: [ HideSpawnMenu ] @@ -123,14 +122,34 @@ icon: sprite: SS220/Interface/Actions/action_spider.rsi state: little_spider_spawn - event: !type:WorldSpawnSpellEvent + event: !type:SpiderWorldSpawnEvent prototypes: - id: MobSpiderLittle amount: 3 offset: 0, 1 - speech: action-speech-spell-spider + cost: 20 #Cryctal +- type: entity + id: ActionSpawnSpiderCrystalBloodPoints + name: create a crystal shard + description: A shard that serves as a backlight for spiders. + categories: [ HideSpawnMenu ] + components: + - type: WorldTargetAction + useDelay: 5 + range: 1 + itemIconStyle: BigAction + icon: + sprite: SS220/Interface/Actions/action_spider.rsi + state: crystal_spawn + event: !type:SpiderWorldSpawnEvent + prototypes: + - id: ShardCrystalBlueXeno + amount: 1 + offset: 0, 1 + cost: 5 + - type: entity id: ActionSpawnSpiderCrystal name: create a crystal shard @@ -152,6 +171,21 @@ speech: action-speech-spell-spider #Wall +- type: entity + parent: ActionSpawnSpiderWallWeb + id: ActionSpawnSpiderWallWebDurableBloodPoints + name: create a durable wall + categories: [ HideSpawnMenu ] + components: + - type: WorldTargetAction + useDelay: 6 + event: !type:SpiderWorldSpawnEvent + prototypes: + - id: WallWebDurableSpawn + amount: 1 + offset: 0, 1 + cost: 10 + - type: entity id: ActionSpawnSpiderWallWeb name: create a wall @@ -187,6 +221,21 @@ speech: action-speech-spell-spider #Web +- type: entity + parent: BaseActionSpawnSingleSpiderWeb + id: ActionSpawnSingleSpiderWebDurable + name: spin a durable web + categories: [ HideSpawnMenu ] + components: + - type: WorldTargetAction + useDelay: 2 + event: !type:SpiderWorldSpawnEvent + prototypes: + - id: SpiderWebDurable + amount: 1 + offset: 0, 1 + cost: 10 + - type: entity parent: BaseActionSpawnSingleSpiderWeb id: ActionSpawnSingleSpiderWebShortDelay @@ -248,7 +297,7 @@ components: - type: EntityTargetAction event: !type:SpiderCocooningActionEvent - cocooningTime: 5 + cocooningTime: 15 itemIconStyle: NoItem icon: { sprite: SS220/Interface/Actions/action_spider.rsi, state: cocoon } useDelay: 10 diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 557e3f3371676d..109255b319fcda 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -149,8 +149,8 @@ description: spider dance components: - type: SpiderQueen - currentBloodPoints: 50 - maxBloodPoints: 200 + currentBloodPoints: 100 + maxBloodPoints: 100 bloodPointsPerSecond: 0.5 cocoonsCountToAnnouncement: 10 cocoonPrototypes: @@ -158,14 +158,14 @@ - SpiderCocoonVertical - type: ActionGrant actions: - - ActionSpawnSpiderEggDrone - - ActionSpawnSpiderEggHunter - - ActionSpawnSpiderEggGhost - - ActionSpawnSpiderEggShooter - - ActionSpawnSpiderLittle - - ActionSpawnSpiderCrystal + - ActionSpawnSpiderEggDroneBloodPoints + - ActionSpawnSpiderEggHunterBloodPoints + - ActionSpawnSpiderEggGhostBloodPoints + - ActionSpawnSpiderEggShooterBloodPoints + - ActionSpawnSpiderLittleBloodPoints + - ActionSpawnSpiderCrystalBloodPoints - ActionSpawnSingleSpiderWebDurable - - ActionSpawnSpiderWallWebDurable + - ActionSpawnSpiderWallWebDurableBloodPoints - ActionSpiderCoconning - type: Butcherable spawned: diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index 0154fbaf0d81a1..61b3713ccb24d0 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -35,12 +35,14 @@ - SpiderCocoon - type: SpiderCocoon container: cocoon - bloodPointsBonus: 20 + bloodPointsBonus: 10 damage: types: - Poison: 1 + Caustic: 0.5 + Blunt: 1 damageCap: - Poison: 150 + Caustic: 40 + Blunt: 80 - type: entity id: BaseSpiderCocoonDestroyed @@ -71,7 +73,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 20 + damage: 75 behaviors: - !type:PlaySoundBehavior sound: @@ -184,7 +186,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 20 + damage: 150 behaviors: - !type:EmptyContainersBehaviour containers: @@ -214,7 +216,7 @@ thresholds: - trigger: !type:DamageTrigger - damage: 20 + damage: 150 behaviors: - !type:EmptyContainersBehaviour containers: diff --git a/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml b/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml index 73f2b9676fda56..6472cf35c9bcf5 100644 --- a/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml +++ b/Resources/Prototypes/SS220/Recipes/Construction/Graphs/structures/spider_structures.yml @@ -21,7 +21,7 @@ amount: 2 steps: - tool: Slicing - doAfter: 3 + doAfter: 10 - node: cocoonVertical entity: SpiderCocoonVertical @@ -35,7 +35,7 @@ amount: 2 steps: - tool: Slicing - doAfter: 3 + doAfter: 10 - node: cocoonHorizontalDestroyed entity: SpiderCocoonHorizontalDestroyed @@ -43,7 +43,7 @@ - to: start steps: - tool: Slicing - doAfter: 3 + doAfter: 4 - node: cocoonVerticalDestroyed entity: SpiderCocoonVerticalDestroyed @@ -51,4 +51,4 @@ - to: start steps: - tool: Slicing - doAfter: 3 + doAfter: 4 From 82ef5d90b0f0c872d89ccd6a3ba765e5458138c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 20 Sep 2024 21:33:43 +0300 Subject: [PATCH 32/46] some fixes --- Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 109255b319fcda..488b738cd235a2 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -151,7 +151,6 @@ - type: SpiderQueen currentBloodPoints: 100 maxBloodPoints: 100 - bloodPointsPerSecond: 0.5 cocoonsCountToAnnouncement: 10 cocoonPrototypes: - SpiderCocoonHorizontal From cd1a7ddf98140ffe47663a9f366d9210ca1517b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 20 Sep 2024 21:47:07 +0300 Subject: [PATCH 33/46] change actions description and some changes --- .../ru-RU/ss220/actions/spider-actions.ftl | 27 +++++--- .../SS220/Actions/Spider_actions.yml | 62 +++++++++---------- .../SS220/Entities/Mobs/NPCs/spider_queen.yml | 2 +- 3 files changed, 49 insertions(+), 42 deletions(-) diff --git a/Resources/Locale/ru-RU/ss220/actions/spider-actions.ftl b/Resources/Locale/ru-RU/ss220/actions/spider-actions.ftl index 57540b7e401e83..0ece10081cfc66 100644 --- a/Resources/Locale/ru-RU/ss220/actions/spider-actions.ftl +++ b/Resources/Locale/ru-RU/ss220/actions/spider-actions.ftl @@ -1,26 +1,28 @@ action-speech-spell-spider = Кссс...!?? -ent-ActionSpawnSpiderEggDrone = Яйцо паука рыцаря - .desc = Он же трутень, может строить кристаллы и стены. +ent-ActionSpawnSpiderEggDroneBloodPoints = Яйцо паука рыцаря + .desc = Он же трутень, может строить кристаллы и стены. Стоимость [color=#800000]40 крови[/color]. -ent-ActionSpawnSpiderEggHunter = Яйцо паучьего охотника - .desc = Создает яйцо паучьего охотника. Главный добытчик пищи. Во имя королевы! +ent-ActionSpawnSpiderEggHunterBloodPoints = Яйцо паучьего охотника + .desc = Создает яйцо паучьего охотника. Главный добытчик пищи. Во имя королевы! Стоимость [color=#800000]60 крови[/color]. -ent-ActionSpawnSpiderEggGhost = Яйцо паучьего призрака - .desc = Создает яйцо паучьего призрака. Ваш невидимый слуга. Уничтожит всех ваших врагов скрытым способом. +ent-ActionSpawnSpiderEggGhostBloodPoints = Яйцо паучьего призрака + .desc = Создает яйцо паучьего призрака. Ваш невидимый слуга. Уничтожит всех ваших врагов скрытым способом. Стоимость [color=#800000]60 крови[/color]. -ent-ActionSpawnSpiderEggShooter = Яйцо паучьего стрелка - .desc = Создает яйцо паучьего стрелка Дальнобойные враги не проблема. Стрелок сможет защитить вас от них. +ent-ActionSpawnSpiderEggShooterBloodPoints = Яйцо паучьего стрелка + .desc = Создает яйцо паучьего стрелка Дальнобойные враги не проблема. Стрелок сможет защитить вас от них. Стоимость [color=#800000]50 крови[/color]. -ent-ActionSpawnSpiderLittle = Выпустить паучат - .desc = Выпускает трёх маленьких паучков, которые атакуют вашу добычу. Пауки исчезают через 20 секунд. +ent-ActionSpawnSpiderLittleBloodPoints = Выпустить паучат + .desc = Выпускает трёх маленьких паучков, которые атакуют вашу добычу. Пауки исчезают через 20 секунд. Стоимость [color=#800000]20 крови[/color]. ent-ActionSpawnSpiderCrystal = Создать осколок кристалла .desc = Осколок, который служит подсветкой для пауков. +ent-ActionSpawnSpiderCrystalBloodPoints = { ent-ActionSpawnSpiderCrystal } + .desc = Осколок, который служит подсветкой для пауков. Стоимость [color=#800000]5 крови[/color]. ent-ActionSpawnSpiderWallWeb = Создать стену .desc = Наматывает огромную стену из паутины. @@ -28,6 +30,8 @@ ent-ActionSpawnSpiderWallWeb = Создать стену ent-ActionSpawnSpiderWallWebDurable = Создать прочную стену .desc = Создаёт прочную стену из... Паутины?!?!? +ent-ActionSpawnSpiderWallWebDurableBloodPoints = { ent-ActionSpawnSpiderWallWebDurable } + .desc = Создаёт прочную стену из... Паутины?!?!? Стоимость [color=#800000]10 крови[/color]. ent-ActionSpawnSingleSpiderWebShortDelay = Пустить паутину .desc = Создаёт паутину, которая замедляет вашу добычу. @@ -38,5 +42,8 @@ ent-ActionSpawnSingleSpiderWebLongDelay = { ent-ActionSpawnSingleSpiderWebShortD ent-ActionSpawnSingleSpiderWebDurable = Пустить прочную паутину .desc = { ent-ActionSpawnSingleSpiderWebShortDelay.desc } +ent-ActionSpawnSingleSpiderWebDurableBloodPoints = { ent-ActionSpawnSingleSpiderWebDurable } + .desc = Создаёт паутину, которая замедляет вашу добычу. Стоимость [color=#800000]2 крови[/color]. + ent-ActionSpawnSingleSpiderWebClown = Пустить клоунскую паутину .desc = { ent-ActionSpawnSingleSpiderWebShortDelay.desc } diff --git a/Resources/Prototypes/SS220/Actions/Spider_actions.yml b/Resources/Prototypes/SS220/Actions/Spider_actions.yml index 6367584ac5b2b1..8b3f12234f1524 100644 --- a/Resources/Prototypes/SS220/Actions/Spider_actions.yml +++ b/Resources/Prototypes/SS220/Actions/Spider_actions.yml @@ -1,6 +1,6 @@ #Base - type: entity - id: BaseActionSpawnSpiderEggBloodPoints + id: BaseActionSpawnSpiderEgg abstract: true components: - type: WorldTargetAction @@ -39,7 +39,7 @@ #Egg - type: entity - parent: BaseActionSpawnSpiderEggBloodPoints + parent: BaseActionSpawnSpiderEgg id: ActionSpawnSpiderEggDroneBloodPoints name: guard spider egg description: He is also a drone and can build crystals and walls. @@ -131,61 +131,46 @@ #Cryctal - type: entity - id: ActionSpawnSpiderCrystalBloodPoints + id: ActionSpawnSpiderCrystal name: create a crystal shard description: A shard that serves as a backlight for spiders. categories: [ HideSpawnMenu ] components: - type: WorldTargetAction - useDelay: 5 + useDelay: 30 range: 1 itemIconStyle: BigAction icon: sprite: SS220/Interface/Actions/action_spider.rsi state: crystal_spawn - event: !type:SpiderWorldSpawnEvent + event: !type:WorldSpawnSpellEvent prototypes: - id: ShardCrystalBlueXeno amount: 1 offset: 0, 1 - cost: 5 + speech: action-speech-spell-spider - type: entity - id: ActionSpawnSpiderCrystal + id: ActionSpawnSpiderCrystalBloodPoints name: create a crystal shard description: A shard that serves as a backlight for spiders. categories: [ HideSpawnMenu ] components: - type: WorldTargetAction - useDelay: 30 + useDelay: 5 range: 1 itemIconStyle: BigAction icon: sprite: SS220/Interface/Actions/action_spider.rsi state: crystal_spawn - event: !type:WorldSpawnSpellEvent + event: !type:SpiderWorldSpawnEvent prototypes: - id: ShardCrystalBlueXeno amount: 1 offset: 0, 1 - speech: action-speech-spell-spider + cost: 5 #Wall -- type: entity - parent: ActionSpawnSpiderWallWeb - id: ActionSpawnSpiderWallWebDurableBloodPoints - name: create a durable wall - categories: [ HideSpawnMenu ] - components: - - type: WorldTargetAction - useDelay: 6 - event: !type:SpiderWorldSpawnEvent - prototypes: - - id: WallWebDurableSpawn - amount: 1 - offset: 0, 1 - cost: 10 - - type: entity id: ActionSpawnSpiderWallWeb name: create a wall @@ -220,22 +205,22 @@ offset: 0, 1 speech: action-speech-spell-spider -#Web - type: entity - parent: BaseActionSpawnSingleSpiderWeb - id: ActionSpawnSingleSpiderWebDurable - name: spin a durable web + parent: ActionSpawnSpiderWallWeb + id: ActionSpawnSpiderWallWebDurableBloodPoints + name: create a durable wall categories: [ HideSpawnMenu ] components: - type: WorldTargetAction - useDelay: 2 + useDelay: 6 event: !type:SpiderWorldSpawnEvent prototypes: - - id: SpiderWebDurable + - id: WallWebDurableSpawn amount: 1 offset: 0, 1 cost: 10 +#Web - type: entity parent: BaseActionSpawnSingleSpiderWeb id: ActionSpawnSingleSpiderWebShortDelay @@ -267,6 +252,21 @@ offset: 0, 1 speech: action-speech-spell-spider +- type: entity + parent: BaseActionSpawnSingleSpiderWeb + id: ActionSpawnSingleSpiderWebDurableBloodPoints + name: spin a durable web + categories: [ HideSpawnMenu ] + components: + - type: WorldTargetAction + useDelay: 2 + event: !type:SpiderWorldSpawnEvent + prototypes: + - id: SpiderWebDurable + amount: 1 + offset: 0, 1 + cost: 2 + #Clown web - type: entity id: ActionSpawnSingleSpiderWebClown diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index 488b738cd235a2..d3bcbc3dd91712 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -163,7 +163,7 @@ - ActionSpawnSpiderEggShooterBloodPoints - ActionSpawnSpiderLittleBloodPoints - ActionSpawnSpiderCrystalBloodPoints - - ActionSpawnSingleSpiderWebDurable + - ActionSpawnSingleSpiderWebDurableBloodPoints - ActionSpawnSpiderWallWebDurableBloodPoints - ActionSpiderCoconning - type: Butcherable From b79beffa42eed5213ec7dcc3ad68ee72b3d6a620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Mon, 23 Sep 2024 21:02:07 +0300 Subject: [PATCH 34/46] some changes --- .../SpiderQueen/Systems/SpiderCocoonSystem.cs | 26 ++--- .../SpiderQueen/Systems/SpiderQueenSystem.cs | 101 +++++++++++------- .../Components/SpiderQueenComponent.cs | 6 ++ .../SpiderQueen/SharedSpiderQueenEvents.cs | 34 +++++- .../ru-RU/ss220/actions/spider-actions.ftl | 3 + .../ru-RU/ss220/spider-queen/spider-queen.ftl | 2 +- .../SS220/Actions/Spider_actions.yml | 37 ++++--- .../SS220/GameRules/midround_antags.yml | 6 +- 8 files changed, 141 insertions(+), 74 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs index d1882ca8bb5e23..8d2616b8b28093 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs @@ -7,9 +7,11 @@ using Content.Shared.DoAfter; using Content.Shared.Examine; using Content.Shared.FixedPoint; +using Content.Shared.Nutrition.EntitySystems; using Content.Shared.SS220.SpiderQueen; using Content.Shared.SS220.SpiderQueen.Components; using Content.Shared.Verbs; +using FastAccessors; using Robust.Shared.Containers; using Robust.Shared.Timing; @@ -24,6 +26,7 @@ public sealed partial class SpiderCocoonSystem : EntitySystem [Dependency] private readonly SpiderQueenSystem _spiderQueen = default!; [Dependency] private readonly BloodstreamSystem _bloodstream = default!; [Dependency] private readonly SharedSolutionContainerSystem _solutionContainer = default!; + [Dependency] private readonly HungerSystem _hunger = default!; public override void Initialize() { @@ -32,7 +35,7 @@ public override void Initialize() SubscribeLocalEvent(OnShutdown); SubscribeLocalEvent(OnExamine); SubscribeLocalEvent>(OnAlternativeVerb); - SubscribeLocalEvent(OnExtractMana); + SubscribeLocalEvent(OnExtractBloodPoints); } public override void Update(float frameTime) @@ -92,7 +95,7 @@ private void OnAlternativeVerb(EntityUid uid, SpiderCocoonComponent component, G var doAfterEventArgs = new DoAfterArgs(EntityManager, args.User, spiderQueen.CocoonExtractTime, - new CocoonExtractBloodPintsEvent(), + new CocoonExtractBloodPointsEvent(), uid, uid) { @@ -112,15 +115,18 @@ private void OnAlternativeVerb(EntityUid uid, SpiderCocoonComponent component, G args.Verbs.Add(extractVerb); } - private void OnExtractMana(Entity entity, ref CocoonExtractBloodPintsEvent args) + private void OnExtractBloodPoints(Entity entity, ref CocoonExtractBloodPointsEvent args) { if (args.Cancelled || !TryComp(args.User, out var spiderQueen)) return; var amountToMax = spiderQueen.MaxBloodPoints - spiderQueen.CurrentBloodPoints; - spiderQueen.CurrentBloodPoints += MathF.Min((float)amountToMax, (float)entity.Comp.BloodPointsAmount); - entity.Comp.BloodPointsAmount -= MathF.Min((float)amountToMax, (float)entity.Comp.BloodPointsAmount); + var extractedValue = MathF.Min((float)amountToMax, (float)entity.Comp.BloodPointsAmount); + entity.Comp.BloodPointsAmount -= extractedValue; + spiderQueen.CurrentBloodPoints += extractedValue; + + _hunger.ModifyHunger(args.User, extractedValue * spiderQueen.HungerExtractCoefficient); Dirty(args.User, spiderQueen); Dirty(entity.Owner, entity.Comp); @@ -151,22 +157,18 @@ private void CauseCocoonDamage(EntityUid uid, SpiderCocoonComponent component, E component.DamagePerSecond is not { } damagePerSecond) return; - var canDamage = true; + var damage = damagePerSecond; foreach (var damageType in component.DamageCap) { var (type, value) = damageType; if (damageable.Damage.DamageDict.TryGetValue(type, out var total) && total >= value) { - canDamage = false; - break; + damage.DamageDict.Remove(type); } } - if (!canDamage) - return; - - _damageable.TryChangeDamage(target, damagePerSecond); + _damageable.TryChangeDamage(target, damage); Dirty(uid, component); } } diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 3b6796f206734e..8b79f9719e0e66 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -15,10 +15,12 @@ using Robust.Shared.Audio.Systems; using Robust.Shared.Containers; using Robust.Shared.Map; +using Robust.Shared.Physics; using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Timing; using Robust.Shared.Utility; +using System.Numerics; namespace Content.Server.SS220.SpiderQueen.Systems; @@ -41,8 +43,9 @@ public override void Initialize() base.Initialize(); SubscribeLocalEvent(OnAfterCocooning); - SubscribeLocalEvent(OnWorldSpawn); - SubscribeLocalEvent(OnWorldSpawnDoAfter); + SubscribeLocalEvent(OnTargetSpawn); + SubscribeLocalEvent(OnSpawnDoAfter); + SubscribeLocalEvent(OnNearbySpawn); } public override void Update(float frameTime) @@ -62,50 +65,38 @@ public override void Update(float frameTime) } } - private void OnWorldSpawn(Entity entity, ref SpiderWorldSpawnEvent args) + private void OnTargetSpawn(Entity entity, ref SpiderTargetSpawnEvent args) { + var spider = entity.Owner; if (args.Handled || - entity.Owner != args.Performer) + spider != args.Performer || + (args.Cost > FixedPoint2.Zero && !CheckEnoughBloodPoints(spider, args.Cost, entity.Comp))) return; - var performer = entity.Owner; + if (!TryStartSpiderSpawnDoAfter(spider, args.DoAfter, args.Target, args.Prototypes, args.Offset, args.Cost)) + { + Log.Error($"Failed to start DoAfter by {spider}"); + return; + } + } - if (args.Cost > FixedPoint2.Zero && - !CheckEnoughBloodPoints(performer, args.Cost, entity.Comp)) + private void OnNearbySpawn(Entity entity, ref SpiderNearbySpawnEvent args) + { + var spider = entity.Owner; + if (args.Handled || + spider != args.Performer || + !TryComp(entity.Owner, out var transform) || + (args.Cost > FixedPoint2.Zero && !CheckEnoughBloodPoints(spider, args.Cost, entity.Comp))) return; - var netCoordinates = GetNetCoordinates(args.Target); - var doAfterArgs = new DoAfterArgs( - EntityManager, - performer, - args.DoAfter, - new SpiderWorldSpawnDoAfterEvent() - { - TargetCoordinates = netCoordinates, - Prototypes = args.Prototypes, - Offset = args.Offset, - Cost = args.Cost, - }, - performer - ) + if (!TryStartSpiderSpawnDoAfter(spider, args.DoAfter, transform.Coordinates, args.Prototypes, args.Offset, args.Cost)) { - Broadcast = false, - BreakOnDamage = false, - BreakOnMove = true, - NeedHand = false, - BlockDuplicate = true, - CancelDuplicate = true, - DuplicateCondition = DuplicateConditions.SameEvent - }; - - var started = _doAfter.TryStartDoAfter(doAfterArgs); - if (started) - args.Handled = true; - else - Log.Error($"Failed to start DoAfter by {performer}"); + Log.Error($"Failed to start DoAfter by {spider}"); + return; + } } - private void OnWorldSpawnDoAfter(Entity entity, ref SpiderWorldSpawnDoAfterEvent args) + private void OnSpawnDoAfter(Entity entity, ref SpiderSpawnDoAfterEvent args) { if (args.Cancelled) return; @@ -197,4 +188,42 @@ private void ConvertHungerIntoBloodPoints(EntityUid uid, SpiderQueenComponent co component.CurrentBloodPoints += value; Dirty(uid, component); } + + private bool TryStartSpiderSpawnDoAfter(EntityUid spider, + TimeSpan doAfter, + EntityCoordinates coordinates, + List prototypes, + Vector2 offset, + FixedPoint2 cost) + { + var netCoordinates = GetNetCoordinates(coordinates); + var doAfterArgs = new DoAfterArgs( + EntityManager, + spider, + doAfter, + new SpiderSpawnDoAfterEvent() + { + TargetCoordinates = netCoordinates, + Prototypes = prototypes, + Offset = offset, + Cost = cost, + }, + spider + ) + { + Broadcast = false, + BreakOnDamage = false, + BreakOnMove = true, + NeedHand = false, + BlockDuplicate = true, + CancelDuplicate = true, + DuplicateCondition = DuplicateConditions.SameEvent + }; + + var started = _doAfter.TryStartDoAfter(doAfterArgs); + if (started) + return true; + else + return false; + } } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index 830f3168f15ebc..c37934f2dc5980 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -35,6 +35,12 @@ public sealed partial class SpiderQueenComponent : Component [DataField("convertCoefficient")] public float HungerConvertCoefficient = 2f; + /// + /// How much hunger is given for each unit of extracted blood points + /// + [DataField] + public float HungerExtractCoefficient = 0.2f; + [ViewVariables] public TimeSpan NextSecond = TimeSpan.Zero; diff --git a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs index be9b086eeea2d5..8ed870b62f991a 100644 --- a/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs +++ b/Content.Shared/SS220/SpiderQueen/SharedSpiderQueenEvents.cs @@ -9,7 +9,7 @@ namespace Content.Shared.SS220.SpiderQueen; -public sealed partial class SpiderWorldSpawnEvent : WorldTargetActionEvent +public sealed partial class SpiderTargetSpawnEvent : WorldTargetActionEvent { /// /// The list of prototypes will spawn @@ -46,13 +46,41 @@ public sealed partial class SpiderCocooningActionEvent : EntityTargetActionEvent public TimeSpan CocooningTime = TimeSpan.Zero; } +public sealed partial class SpiderNearbySpawnEvent : InstantActionEvent +{ + /// + /// The list of prototypes will spawn + /// + [DataField] + public List Prototypes = new(); + + /// + /// The offset the prototypes will spawn in on relative to the one prior. + /// Set to 0,0 to have them spawn on the same tile. + /// + [DataField] + public Vector2 Offset; + + /// + /// The cost of blood points to use this action + /// + [DataField] + public FixedPoint2 Cost = FixedPoint2.Zero; + + /// + /// The time it takes before spawn entities + /// + [DataField] + public TimeSpan DoAfter = TimeSpan.Zero; +} + [Serializable, NetSerializable] public sealed partial class AfterCocooningEvent : SimpleDoAfterEvent { } [Serializable, NetSerializable] -public sealed partial class SpiderWorldSpawnDoAfterEvent : SimpleDoAfterEvent +public sealed partial class SpiderSpawnDoAfterEvent : SimpleDoAfterEvent { /// /// The coordinates of the location that the user targeted. @@ -77,6 +105,6 @@ public sealed partial class SpiderWorldSpawnDoAfterEvent : SimpleDoAfterEvent } [Serializable, NetSerializable] -public sealed partial class CocoonExtractBloodPintsEvent : SimpleDoAfterEvent +public sealed partial class CocoonExtractBloodPointsEvent : SimpleDoAfterEvent { } diff --git a/Resources/Locale/ru-RU/ss220/actions/spider-actions.ftl b/Resources/Locale/ru-RU/ss220/actions/spider-actions.ftl index 0ece10081cfc66..c83a865d21cc44 100644 --- a/Resources/Locale/ru-RU/ss220/actions/spider-actions.ftl +++ b/Resources/Locale/ru-RU/ss220/actions/spider-actions.ftl @@ -47,3 +47,6 @@ ent-ActionSpawnSingleSpiderWebDurableBloodPoints = { ent-ActionSpawnSingleSpide ent-ActionSpawnSingleSpiderWebClown = Пустить клоунскую паутину .desc = { ent-ActionSpawnSingleSpiderWebShortDelay.desc } + +ent-ActionSpiderCoconning = Сплести кокон + .desc = Заматывает жертву в паутину! После полного облачения в шёлк из неё можно пить кровь. diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index 844d68be6d7dfd..23540edfb0d83c 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -1,5 +1,5 @@ spider-queen-blood-points-amount = У вас [color=#800000]{ $current } крови[/color]. Ваш максимум — [color=#800000]{ $max } крови[/color]. -spider-queen-not-enough-blood-points = Недостаточно [color=#800000]крови[/color] +spider-queen-not-enough-blood-points = Недостаточно крови spider-queen-warning = Замечена аномальная биологическая активность в { $location }. Служба Безопасности должна ликвидировать угрозу до того как активу будет нанесен непоправимый ущерб! spider-queen-role-greeting = Ваша задача — построить максимально большой улей. Не позволяйте причинить вред потомству. Экипаж - ваша пища, устройте большой пир! diff --git a/Resources/Prototypes/SS220/Actions/Spider_actions.yml b/Resources/Prototypes/SS220/Actions/Spider_actions.yml index 8b3f12234f1524..9a4b1fd2af377a 100644 --- a/Resources/Prototypes/SS220/Actions/Spider_actions.yml +++ b/Resources/Prototypes/SS220/Actions/Spider_actions.yml @@ -3,14 +3,13 @@ id: BaseActionSpawnSpiderEgg abstract: true components: - - type: WorldTargetAction + - type: InstantAction useDelay: 2 - range: 2 itemIconStyle: BigAction icon: sprite: SS220/Interface/Actions/action_spider.rsi state: guard_spawn - event: !type:WorldSpawnSpellEvent + event: !type:SpiderNearbySpawnEvent prototypes: - id: SpiderEggDrone amount: 1 @@ -45,8 +44,8 @@ description: He is also a drone and can build crystals and walls. categories: [ HideSpawnMenu ] components: - - type: WorldTargetAction - event: !type:SpiderWorldSpawnEvent + - type: InstantAction + event: !type:SpiderNearbySpawnEvent prototypes: - id: SpiderEggDrone amount: 1 @@ -60,11 +59,11 @@ name: hunter spider egg categories: [ HideSpawnMenu ] components: - - type: WorldTargetAction + - type: InstantAction icon: sprite: SS220/Interface/Actions/action_spider.rsi state: hunter_spawn - event: !type:SpiderWorldSpawnEvent + event: !type:SpiderNearbySpawnEvent prototypes: - id: SpiderEggHunter amount: 1 @@ -78,11 +77,11 @@ name: ghost spider egg categories: [ HideSpawnMenu ] components: - - type: WorldTargetAction + - type: InstantAction icon: sprite: SS220/Interface/Actions/action_spider.rsi state: nurse_spawn - event: !type:SpiderWorldSpawnEvent + event: !type:SpiderNearbySpawnEvent prototypes: - id: SpiderEggGhost amount: 1 @@ -96,11 +95,11 @@ name: shooter spider egg categories: [ HideSpawnMenu ] components: - - type: WorldTargetAction + - type: InstantAction icon: sprite: SS220/Interface/Actions/action_spider.rsi state: viper_spawn - event: !type:SpiderWorldSpawnEvent + event: !type:SpiderNearbySpawnEvent prototypes: - id: SpiderEggShooter amount: 1 @@ -115,18 +114,18 @@ description: Releases three small spiders that attack your prey. The spiders disappear after 20 seconds. categories: [ HideSpawnMenu ] components: - - type: WorldTargetAction + - type: InstantAction useDelay: 40 range: 2 itemIconStyle: BigAction icon: sprite: SS220/Interface/Actions/action_spider.rsi state: little_spider_spawn - event: !type:SpiderWorldSpawnEvent + event: !type:SpiderNearbySpawnEvent prototypes: - id: MobSpiderLittle amount: 3 - offset: 0, 1 + offset: 0, 0.5 cost: 20 #Cryctal @@ -163,7 +162,7 @@ icon: sprite: SS220/Interface/Actions/action_spider.rsi state: crystal_spawn - event: !type:SpiderWorldSpawnEvent + event: !type:SpiderTargetSpawnEvent prototypes: - id: ShardCrystalBlueXeno amount: 1 @@ -213,7 +212,7 @@ components: - type: WorldTargetAction useDelay: 6 - event: !type:SpiderWorldSpawnEvent + event: !type:SpiderTargetSpawnEvent prototypes: - id: WallWebDurableSpawn amount: 1 @@ -260,7 +259,7 @@ components: - type: WorldTargetAction useDelay: 2 - event: !type:SpiderWorldSpawnEvent + event: !type:SpiderTargetSpawnEvent prototypes: - id: SpiderWebDurable amount: 1 @@ -291,8 +290,8 @@ #Cocooning - type: entity id: ActionSpiderCoconning - name: окукливание - description: Покрывает цель паутиной + name: weave a cocoon + description: Wraps the victim in a web! After fully clothed in silk, you can drink blood from it. categories: [ HideSpawnMenu ] components: - type: EntityTargetAction diff --git a/Resources/Prototypes/SS220/GameRules/midround_antags.yml b/Resources/Prototypes/SS220/GameRules/midround_antags.yml index ff5ca6e7967c0e..0e5ee1a7b06ea8 100644 --- a/Resources/Prototypes/SS220/GameRules/midround_antags.yml +++ b/Resources/Prototypes/SS220/GameRules/midround_antags.yml @@ -45,10 +45,10 @@ categories: [ GameRules ] components: - type: StationEvent - weight: 7.5 + weight: 5.5 duration: 1 - earliestStart: 45 - minimumPlayers: 30 + earliestStart: 30 + minimumPlayers: 40 - type: AntagSpawner prototype: MobSpiderQueen - type: AntagObjectives From 73b02d7060370714745f38696ad6e861ed15deca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Mon, 23 Sep 2024 21:29:34 +0300 Subject: [PATCH 35/46] yaml fixes --- Resources/Prototypes/SS220/Actions/Spider_actions.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/Resources/Prototypes/SS220/Actions/Spider_actions.yml b/Resources/Prototypes/SS220/Actions/Spider_actions.yml index 9a4b1fd2af377a..f3a9868c90b070 100644 --- a/Resources/Prototypes/SS220/Actions/Spider_actions.yml +++ b/Resources/Prototypes/SS220/Actions/Spider_actions.yml @@ -116,7 +116,6 @@ components: - type: InstantAction useDelay: 40 - range: 2 itemIconStyle: BigAction icon: sprite: SS220/Interface/Actions/action_spider.rsi From 4b8e114c2041b201c6366788f946a4258001de21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Mon, 23 Sep 2024 22:07:47 +0300 Subject: [PATCH 36/46] fix cocoons damage per second --- .../SpiderQueen/Systems/SpiderCocoonSystem.cs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs index 8d2616b8b28093..ddcf2c85abf7ee 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs @@ -157,18 +157,19 @@ private void CauseCocoonDamage(EntityUid uid, SpiderCocoonComponent component, E component.DamagePerSecond is not { } damagePerSecond) return; - var damage = damagePerSecond; - foreach (var damageType in component.DamageCap) + DamageSpecifier causedDamage = new(); + foreach (var damage in damagePerSecond.DamageDict) { - var (type, value) = damageType; - if (damageable.Damage.DamageDict.TryGetValue(type, out var total) && - total >= value) - { - damage.DamageDict.Remove(type); - } + var (type, value) = damage; + if (component.DamageCap.TryGetValue(type, out var cap) && + damageable.Damage.DamageDict.TryGetValue(type, out var total) && + total >= cap) + continue; + + causedDamage.DamageDict.Add(type, value); } - _damageable.TryChangeDamage(target, damage); + _damageable.TryChangeDamage(target, causedDamage, true); Dirty(uid, component); } } From dafda3bd866784c076d624a27784ddf11d710dee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Wed, 2 Oct 2024 18:50:57 +0300 Subject: [PATCH 37/46] balance changes --- .../SS220/SpiderQueen/Components/SpiderQueenComponent.cs | 2 +- .../Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml | 8 +++++++- .../Entities/Structures/Specific/spider_structures.yml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index c37934f2dc5980..38ac06548454cd 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -21,7 +21,7 @@ public sealed partial class SpiderQueenComponent : Component /// Maximum amount of blood points /// [DataField, AutoNetworkedField] - public FixedPoint2 MaxBloodPoints = FixedPoint2.Zero; + public FixedPoint2 MaxBloodPoints = FixedPoint2.New(200); /// /// How much hunger converts into blood points per second diff --git a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml index d3bcbc3dd91712..b8bbcf6fe8cf72 100644 --- a/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml +++ b/Resources/Prototypes/SS220/Entities/Mobs/NPCs/spider_queen.yml @@ -150,7 +150,6 @@ components: - type: SpiderQueen currentBloodPoints: 100 - maxBloodPoints: 100 cocoonsCountToAnnouncement: 10 cocoonPrototypes: - SpiderCocoonHorizontal @@ -166,6 +165,13 @@ - ActionSpawnSingleSpiderWebDurableBloodPoints - ActionSpawnSpiderWallWebDurableBloodPoints - ActionSpiderCoconning + - type: Hunger + thresholds: # only animals and rats are derived from this prototype so let's override it here and in rats' proto + Overfed: 150 + Okay: 75 + Peckish: 35 + Starving: 15 + Dead: 0 - type: Butcherable spawned: - id: FoodMeatSpider diff --git a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml index 61b3713ccb24d0..f9c7c9184a23cc 100644 --- a/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml +++ b/Resources/Prototypes/SS220/Entities/Structures/Specific/spider_structures.yml @@ -35,7 +35,7 @@ - SpiderCocoon - type: SpiderCocoon container: cocoon - bloodPointsBonus: 10 + bloodPointsBonus: 20 damage: types: Caustic: 0.5 From ff72d0bd81f0b39b231bd47c93f3c3f38ff4020a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Wed, 2 Oct 2024 22:03:08 +0300 Subject: [PATCH 38/46] add alert for blood points and some fixes --- .../SpiderQueen/Systems/SpiderCocoonSystem.cs | 4 +- .../Systems/SpiderQueenRuleSystem.cs | 17 ---- .../SpiderQueen/Systems/SpiderQueenSystem.cs | 19 +++- .../Components/SpiderQueenComponent.cs | 7 ++ .../Systems/SharedSpiderQueenSystem.cs | 31 ++++++- .../ru-RU/ss220/spider-queen/spider-queen.ftl | 1 - Resources/Prototypes/Alerts/alerts.yml | 1 + .../Prototypes/SS220/Alerts/spider_queen.yml | 55 ++++++++++++ .../Alerts/blood_counter.rsi/blood0.png | Bin 0 -> 1206 bytes .../Alerts/blood_counter.rsi/blood1.png | Bin 0 -> 1402 bytes .../Alerts/blood_counter.rsi/blood10.png | Bin 0 -> 1347 bytes .../Alerts/blood_counter.rsi/blood11.png | Bin 0 -> 1351 bytes .../Alerts/blood_counter.rsi/blood12.png | Bin 0 -> 1314 bytes .../Alerts/blood_counter.rsi/blood13.png | Bin 0 -> 1317 bytes .../Alerts/blood_counter.rsi/blood14.png | Bin 0 -> 1281 bytes .../Alerts/blood_counter.rsi/blood15.png | Bin 0 -> 1299 bytes .../Alerts/blood_counter.rsi/blood16.png | Bin 0 -> 1263 bytes .../Alerts/blood_counter.rsi/blood17.png | Bin 0 -> 1243 bytes .../Alerts/blood_counter.rsi/blood18.png | Bin 0 -> 1232 bytes .../Alerts/blood_counter.rsi/blood19.png | Bin 0 -> 1224 bytes .../Alerts/blood_counter.rsi/blood2.png | Bin 0 -> 1352 bytes .../Alerts/blood_counter.rsi/blood20.png | Bin 0 -> 1199 bytes .../Alerts/blood_counter.rsi/blood21.png | Bin 0 -> 1196 bytes .../Alerts/blood_counter.rsi/blood22.png | Bin 0 -> 1187 bytes .../Alerts/blood_counter.rsi/blood23.png | Bin 0 -> 1177 bytes .../Alerts/blood_counter.rsi/blood3.png | Bin 0 -> 1423 bytes .../Alerts/blood_counter.rsi/blood4.png | Bin 0 -> 1428 bytes .../Alerts/blood_counter.rsi/blood5.png | Bin 0 -> 1440 bytes .../Alerts/blood_counter.rsi/blood6.png | Bin 0 -> 1403 bytes .../Alerts/blood_counter.rsi/blood7.png | Bin 0 -> 1381 bytes .../Alerts/blood_counter.rsi/blood8.png | Bin 0 -> 1370 bytes .../Alerts/blood_counter.rsi/blood9.png | Bin 0 -> 1337 bytes .../Alerts/blood_counter.rsi/meta.json | 83 ++++++++++++++++++ 33 files changed, 193 insertions(+), 25 deletions(-) create mode 100644 Resources/Prototypes/SS220/Alerts/spider_queen.yml create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood0.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood1.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood10.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood11.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood12.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood13.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood14.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood15.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood16.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood17.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood18.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood19.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood2.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood20.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood21.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood22.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood23.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood3.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood4.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood5.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood6.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood7.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood8.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood9.png create mode 100644 Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/meta.json diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs index ddcf2c85abf7ee..5efa4db8726882 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs @@ -11,7 +11,6 @@ using Content.Shared.SS220.SpiderQueen; using Content.Shared.SS220.SpiderQueen.Components; using Content.Shared.Verbs; -using FastAccessors; using Robust.Shared.Containers; using Robust.Shared.Timing; @@ -129,7 +128,8 @@ private void OnExtractBloodPoints(Entity entity, ref Coco _hunger.ModifyHunger(args.User, extractedValue * spiderQueen.HungerExtractCoefficient); Dirty(args.User, spiderQueen); - Dirty(entity.Owner, entity.Comp); + Dirty(entity); + _spiderQueen.UpdateAlert((args.User, spiderQueen)); } /// diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs index 8280dd8188a434..ccca05908276ae 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenRuleSystem.cs @@ -9,8 +9,6 @@ using Content.Server.SS220.SpiderQueen.Components; using Content.Server.Station.Components; using Content.Server.Station.Systems; -using Content.Shared.Mind; -using Content.Shared.SS220.SpiderQueen.Components; using Content.Shared.Whitelist; using Robust.Shared.Map; @@ -91,22 +89,7 @@ private void AfterEntitySelected(Entity ent, ref After private void OnGetBriefing(Entity ent, ref GetBriefingEvent args) { - if (!TryComp(ent.Owner, out var mind)) - return; - var briefing = Loc.GetString("spider-queen-role-greeting"); - - if (mind.OwnedEntity is { } spider && - TryComp(spider, out var spiderQueen)) - { - var current = spiderQueen.CurrentBloodPoints; - var max = spiderQueen.MaxBloodPoints; - - briefing = string.Format("{0}\n{1}", briefing, - Loc.GetString("spider-queen-role-blood-points-information", ("current", current), ("max", max))); - } - args.Append(briefing); } } - diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 8b79f9719e0e66..2bcd3e5c30edd4 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -15,7 +15,6 @@ using Robust.Shared.Audio.Systems; using Robust.Shared.Containers; using Robust.Shared.Map; -using Robust.Shared.Physics; using Robust.Shared.Player; using Robust.Shared.Random; using Robust.Shared.Timing; @@ -73,7 +72,11 @@ private void OnTargetSpawn(Entity entity, ref SpiderTarget (args.Cost > FixedPoint2.Zero && !CheckEnoughBloodPoints(spider, args.Cost, entity.Comp))) return; - if (!TryStartSpiderSpawnDoAfter(spider, args.DoAfter, args.Target, args.Prototypes, args.Offset, args.Cost)) + if (TryStartSpiderSpawnDoAfter(spider, args.DoAfter, args.Target, args.Prototypes, args.Offset, args.Cost)) + { + args.Handled = true; + } + else { Log.Error($"Failed to start DoAfter by {spider}"); return; @@ -89,7 +92,11 @@ private void OnNearbySpawn(Entity entity, ref SpiderNearby (args.Cost > FixedPoint2.Zero && !CheckEnoughBloodPoints(spider, args.Cost, entity.Comp))) return; - if (!TryStartSpiderSpawnDoAfter(spider, args.DoAfter, transform.Coordinates, args.Prototypes, args.Offset, args.Cost)) + if (TryStartSpiderSpawnDoAfter(spider, args.DoAfter, transform.Coordinates, args.Prototypes, args.Offset, args.Cost)) + { + args.Handled = true; + } + else { Log.Error($"Failed to start DoAfter by {spider}"); return; @@ -108,6 +115,8 @@ private void OnSpawnDoAfter(Entity entity, ref SpiderSpawn return; entity.Comp.CurrentBloodPoints -= args.Cost; + Dirty(entity); + UpdateAlert(entity); } var getProtos = EntitySpawnCollection.GetSpawns(args.Prototypes, _random); @@ -141,7 +150,8 @@ private void OnAfterCocooning(Entity entity, ref AfterCoco _container.Insert(target, container); entity.Comp.CocoonsList.Add(cocoonUid); entity.Comp.MaxBloodPoints += spiderCocoon.BloodPointsBonus; - Dirty(entity.Owner, entity.Comp); + Dirty(entity); + UpdateAlert(entity); spiderCocoon.CocoonOwner = entity.Owner; Dirty(cocoonUid, spiderCocoon); @@ -187,6 +197,7 @@ private void ConvertHungerIntoBloodPoints(EntityUid uid, SpiderQueenComponent co _hunger.ModifyHunger(uid, hungerDecreaseValue, hunger); component.CurrentBloodPoints += value; Dirty(uid, component); + UpdateAlert((uid, component)); } private bool TryStartSpiderSpawnDoAfter(EntityUid spider, diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index 38ac06548454cd..542fd4b75eadb1 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -1,4 +1,5 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Shared.Alert; using Content.Shared.FixedPoint; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; @@ -73,4 +74,10 @@ public sealed partial class SpiderQueenComponent : Component /// [DataField] public int? CocoonsCountToAnnouncement; + + /// + /// The prototype of alert that displays the current amount of blood points + /// + [DataField] + public ProtoId BloodPointsAlert = "BloodPoints"; } diff --git a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs index fc385ec85a976e..41d4b05bc10414 100644 --- a/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs +++ b/Content.Shared/SS220/SpiderQueen/Systems/SharedSpiderQueenSystem.cs @@ -1,31 +1,42 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt +using Content.Shared.Alert; using Content.Shared.DoAfter; using Content.Shared.Examine; using Content.Shared.FixedPoint; using Content.Shared.Humanoid; using Content.Shared.Mobs.Systems; using Content.Shared.Popups; +using Content.Shared.Rounding; using Content.Shared.SS220.SpiderQueen.Components; using Robust.Shared.Network; +using Robust.Shared.Prototypes; namespace Content.Shared.SS220.SpiderQueen.Systems; public abstract class SharedSpiderQueenSystem : EntitySystem { + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly INetManager _net = default!; [Dependency] private readonly SharedPopupSystem _popup = default!; [Dependency] private readonly MobStateSystem _mobState = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; - [Dependency] private readonly INetManager _net = default!; [Dependency] private readonly EntityLookupSystem _entityLookup = default!; + [Dependency] private readonly AlertsSystem _alerts = default!; public override void Initialize() { base.Initialize(); + SubscribeLocalEvent(OnStartup); SubscribeLocalEvent(OnExamine); SubscribeLocalEvent(OnCocooningAction); } + private void OnStartup(Entity entity, ref ComponentStartup args) + { + UpdateAlert(entity); + } + private void OnExamine(Entity entity, ref ExaminedEvent args) { if (args.Examined == args.Examiner) @@ -117,4 +128,22 @@ public bool CheckEnoughBloodPoints(EntityUid uid, FixedPoint2 cost, SpiderQueenC else return true; } + + /// + /// Updates the alert that displays the current amount of blood points + /// + public void UpdateAlert(Entity entity) + { + var (uid, comp) = entity; + if (comp.Deleted || + comp.MaxBloodPoints <= FixedPoint2.Zero) + { + _alerts.ClearAlert(uid, comp.BloodPointsAlert); + return; + } + + var alertProto = _prototypeManager.Index(comp.BloodPointsAlert); + var severity = ContentHelpers.RoundToLevels(comp.CurrentBloodPoints.Double(), comp.MaxBloodPoints.Double(), alertProto.MaxSeverity); + _alerts.ShowAlert(uid, alertProto, (short)severity); + } } diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index 23540edfb0d83c..76c50cd25191fc 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -3,7 +3,6 @@ spider-queen-not-enough-blood-points = Недостаточно крови spider-queen-warning = Замечена аномальная биологическая активность в { $location }. Служба Безопасности должна ликвидировать угрозу до того как активу будет нанесен непоправимый ущерб! spider-queen-role-greeting = Ваша задача — построить максимально большой улей. Не позволяйте причинить вред потомству. Экипаж - ваша пища, устройте большой пир! -spider-queen-role-blood-points-information = У вас { $current } крови. Ваш максимум — { $max } крови. spider-cocoon-blood-points-amount = В коконе содержится [color=#800000]{ $amount } крови[/color]. spider-cocoon-extract-blood-points-verb = Извлечь ману diff --git a/Resources/Prototypes/Alerts/alerts.yml b/Resources/Prototypes/Alerts/alerts.yml index 80fcc44a559e02..75b3b54fd76d2c 100644 --- a/Resources/Prototypes/Alerts/alerts.yml +++ b/Resources/Prototypes/Alerts/alerts.yml @@ -4,6 +4,7 @@ # If item is not in list it will go at the bottom (ties broken by alert type enum value) id: BaseAlertOrder order: + - alertType: BloodPoints #SS220 Spider queen antag - category: Health - category: Stamina - alertType: SuitPower diff --git a/Resources/Prototypes/SS220/Alerts/spider_queen.yml b/Resources/Prototypes/SS220/Alerts/spider_queen.yml new file mode 100644 index 00000000000000..31037940b74156 --- /dev/null +++ b/Resources/Prototypes/SS220/Alerts/spider_queen.yml @@ -0,0 +1,55 @@ +- type: alert + id: BloodPoints + icons: + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood0 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood1 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood2 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood3 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood4 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood5 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood6 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood7 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood8 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood9 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood10 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood11 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood12 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood13 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood14 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood15 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood16 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood17 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood18 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood19 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood20 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood21 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood22 + - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi + state: blood23 + name: alerts-revenant-essence-name + description: alerts-revenant-essence-desc + minSeverity: 0 + maxSeverity: 24 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood0.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood0.png new file mode 100644 index 0000000000000000000000000000000000000000..fa8fcd3dbfc7e6d78547156f609523c896707040 GIT binary patch literal 1206 zcmV;n1WEgeP)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uOJ~>o& zh3o-u*v7VP;QVZ#R4RaHIWQ|k6N;T++cw^?t>h@@fa|&d?2eigu#`jPQxVM*&jl<> znj-~?`q7YkGHaS4j8C-PQB$%Pc1Eq8d=`1)`E)c^FP5OBIl%dLZgsm7Hy#Dg=W^`n zElQdrCx0GXRk}N>G727zD7c6{y+uBkQ^W$y0jvxP^nxz6dVSmnt#j5-X-+vILa3gl ze3FE1+tliHOy44{o3wa#?m#c-a?`#?G2BwD+8v#5BLNgW=_dO_fUaqlybDU2BkL8z zEpFQPrgwqZmzjlST-U|6ZI0;6BtfEpr6`{KU;OTmI_!>`lr)DU`q;LO>$+qXmWkp? z0+X?nO3}~Gv!+>6#U>8>BXxTguoSyRzKA3G^t1CUrBbtCR08djLupg3UY{bdJ8DXm zr=u~rAQV+z(i}>f!|KV&(R!AqP{ z8yt}jud^Pvc@@5;q&X}y&#UmQEL74QR^nGVqR+nGVLp?R;HGaW^?N~=xh1~yPfos% z6<1e7*L7ug_JS^H-6WOBP>DSOkZTCAGCbo8-{4Eew*HRCABGP=BN3mk literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood10.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood10.png new file mode 100644 index 0000000000000000000000000000000000000000..333d7da22d9eaaed9928435a9416ffc646fc68dc GIT binary patch literal 1347 zcmV-J1-$x+P)Px({YgYYR9J9QZ7i++J@y6eJ)u2R}8Le>tnAz3IOLa~I22Mn=Mc%I;D#x_zW@pLhHPxI_iQm4He zOHcRSbI$$qW}M-Sc4Ojtl+Tq;o%{U`e;oXoIcvUu9dKjfdejX)E}7@lS;Z;>upR6H z@Vxh$f?=PD$Oj#hz!GpRXs~K6uog6w->S8s$ee{p_Cw&#h|fx~tbwPQJg-MVt|z`P}S#Nu-uY zDwp6A;A&XriLslS=xSKzA={XSK`#t}xGmek9^!3&Xgg9X&<#EHS*q-X;ZSgZC&sR- z!V(phsHEmQX&Nh8E;(>(K_gZ9xM_0O>#4sXRTVLHo2fxAuH7b?EAh- zm>jBMYLnlSzLLa4wt4e*a3=F7tB{3wN;^k82qD-G_E@zRG({)-ec0;_?Y~qHXy5=s z2s%eQ+E%C;@cSJc#{mX+`$?q|IIRL{CWlaNg5x;&{f_Q)lHp=^oNMIyl27?!A`2%} zyw5KFa2tSo-~FncKRS4humXh0VsSzHEer8(x@H@I4J!bM!Ovh4{N?w*X|a#+H9yyE zYj;5wplsU_K&@KE&1HFn&*OvRj{*ly#co&uZZ1o$S|y1G?`}f*$n~taPm8TX0Ircg zb0w1CQvHS%5KLc02!S0GwMVtuf-BBV>d`U)_wB>fgdYp;=3)``XqhX{O>GNCVX&8_ zu_>Bj9mjFl=)Z&@u7XUQR*f`*NpJwiaS%fA`PdW+ub&`r(kAnH_NQUv#el>xur%N# zcrbmD$$TCmL~4v8&^g+nG&V&&TBfPqi!(h ziQn&FhebBGwiJo`LNL=mRz!xG1a@;-9LG`Mc2LAOIx2rR^eEeQwCj19QO9u*2$j4W zdK3(s>F6@et#u&op(_M#?l2|-d=^-#z|vm`fe?avw2W_b)ZitzZP)V{oy^B&l_Uy= zO>HuM!{ul>X6$;{6uD3@0Pw2W<#8_d?S>w_9^*p2K<(Xc$3eu5F-tyIqBJ%|X>5wk z{e}iEaYy%kpJuC-sn5+t0>N~2St%>Mo7#M?gx~M5@4w>MjdYU0=6-`$O^@tMhJs-u z|8bG=GKXunaU4hC0c4x4RtDn9mk*2Npp?d@RNo|cK37scoueJ{xe^7#=Gcwsh8}*u zqk(shcGSa8Dwnuw3uGnAwjJ3)oJ1;@b0Pcq^S3`@{W8w2V3pskHG;1X`RdLsV9=J$ z{e~9rS$piZJf&RPsaNIt+*~BDOlh9A$FApPVDRE9D6)eaYFS1bSk002ovPDHLk FV1hSjmTUk3 literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood11.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood11.png new file mode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I)bhTkT;wYYeEai8xF43O6>D^q`6Idmli+&UFWiO4%cd- zOeO@(o3l}Ma)D~4qTMf2PP8-4Z9ERbQ0E_nA(mmVNI9`RtCb4X$%RB0MwNSjj_*_3 z?os0sHzokea2ThYY8DRR;*WQEbN>;~_m236OFYA;xA%%pZXC_)$2!mrJ=*)*NGSoh zG4av!>C||0|50ikDJAXw?ZmFo8GgTw5aP4IFmSKp`QDL!Ubh2;5cvIeB0nKfO35?) z#K2F5r-kb92?1;UR>rkjTIuJ&Rr{5RXZVRc*J>rsf-FGEaUy_frGjf_&)kJ!a24xz zfNN%{Rw~4K@ctxJSFUI8B81>tvj@P}&~PUx z;2UjSzZ-g#94FfGyv(Q&0*TbcyP-$kaF~v+(AZoB26O02iEH)-LVzy=I~A<*rIbi1 zsYOfpMq4ku_-@8R~p_T{WZKKO`bCBB&J$N_9 zg<78K`@bCp5i`atIkQM{Y>ML86dRp-0r9hP8exlbsoiQ5VQszm-`ol(=i3=k?xS z+_lfMTqq^rKw^BgQb~n>G?uPi)2*t_%|-FwpFVsXxvMWD0C)9e^z`B5p}Fzr|25(Q bKBvyV!(g*VQG;GK00000NkvXXu0mjfhc0@# literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood14.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood14.png new file mode 100644 index 0000000000000000000000000000000000000000..80249d7a8e22425d0470c8d32013ebaad12bb6b9 GIT binary patch literal 1281 zcmV+c1^)VpP)Px(yGcYrR9JXuc%?d74H2?IU7BskJUtle0=y|v73);+4jAY*i7gIi~#c~3kCN*BMi>wyQ zh$)||GgrcQHgMit48@dB#V)cIG!kITFxU=uxkd%cF!Y!*vKBO`*hR#Y&v|q4jV4k{ zq%v1<1-LXS^U&y|2D&sV^DEm}hQa=51Vr1i9qb}s<|l4PY6bcuPk&cg?vF+j;Q$Yf zj;_KrDqN$I8t-)_T&Z%Y1Gg45QZqkkS?ula>(97U_5lCBgwH>?pbsX%<6%3&)D<{y zE`|le0Z71Ab_#sbvc^orWf_KEH$8=p2T(Aau`{6!6buK~YA5uil$)a|*AYUn zF?}jhbAV$(!gfs8_t#xYEYQh8@8kq#01mE1+(%ah|>?9489VhGuhkN1=yEvmFn_FAj z#9b*_7#?UNlcd0|nMDYp;Z9J*H@Z50f8avI*lu~X^@0)_>&61we9qf=dOB4);12?2U^6-b<1iU-g(U+adTyb?5 zs7jO_Cv<`+h{{}@3$>5mfAKB$4=1@1+~Q|@jo{NgKKbSbaJVg-y+&faXYbN!c{+2Y zu~+5#(o(1%nM$6$OULu{+miyt0dV-j86}ZiuS)+qZ|u?5Y_&4AYL)ClhR4HpCc6-= zQ5VSLVLP*0EOXO7#gpfMannAr&O1mcsbo_io<_-StNy rfV=)Eym$M~#JTbB?^SUF$BFYFGT@<5Sj55%00000NkvXXu0mjfNmghP literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood15.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood15.png new file mode 100644 index 0000000000000000000000000000000000000000..0e02b06dd275e951ef99b08109a69e6b3a2afd5e GIT binary patch literal 1299 zcmV+u1?>8XP)Px(%}GQ-R9JC**QceZQg8efO=d%m+yN$upf==Aj7 z@ALirdGDPvoYHQLT@MRpd0^b@cld4h_snVi{qF@g#;%9Gz~!_2CwgqkDgm(RcLDhG z;0;B?K9!L7PK<*UaM^Eg*P3V9Z|HeWtCVeRS+W{ zH^#1qXBIGL&V*vbW6CPA>^BnNykW5Ece%+FdBf0SO31R`V9F{XMm*-snRkjvO_7RR z!4=?IP~n-eo$BaXP~lfL$r}a-K>$Q$+4Q@}w}qkQNXss2t{LX}FFYPe;;ksA5Ae4f371N|8{6+OVeZ{h1t=XGNOyy&+ROr3!_b0#br zHb4TdqEp~=`TT&0xaAE)ugi^~{Q(pWd!Q$B>Y-@ZIQcf;@0MBkyUTa?zXjmcy@#>z z7__vpBYV1g2)(~p#iMBXIA)h=W}tsUz??Y~*2d?_RRR_c{uu2 zl5df_RAzd6o?hUFsuWp>q6gUVyfZ^jT3P_gzv5{Dy}+fjzlD@iEB@GU04XJ%{jJ2V z&`s#|I|v~@7_QO}B!XG9e1s5q{Z3+j;vA4tvWj=+EX3hyCZ!x0%R;m_oqSs>{SdfH zzY1cNWM4V?cH%6^0#s}}1gKT3IA-?LSr`Uawr2S_W|msDN}LBrC!xA>U8{=_f~&1P z0KTBW!q_`6%mItTRrG6?k3V@4DJ8aFN?g@?7hDmysE3OHJht~z9iA2Lm{Ab*aFHwG zR$>?A;CNq_M<-~?6@(D1^WkESk%SM{OI2=F-fs~TZM<>v{eoVkg8!r^tnS`~M z$0CNo(!g=JKY5YyLLqerBm{K!wlYhTDD#&**6Xy}+en+u^qBW^zIZ zBvL!?1ujLyW-`1?b7KXFYUoIbW9~&lh%T2ju$nKWL`q3LT*Navy7A(>ZQFIpjTfS{ zDiKA)rZyhE;j+INDRx|JN?fQH0eIc)@zjjw_5v5)jB=q~q;~Y%p&v4B%uq1Plt(8h zk4~_@(@4M-H@D+?G+V7qeRejKNG8L}IsK`}cs5<`i&5u|=pX0WFmtU-9{IB--@`u~N zaaq=P8j1C;)n&Wo>d2K1yeijcXG3*lDs!za+pe2|;}=(z2?c=T7tSb%YK06!6zdw2KD0EhyhXBsX^YF=oM?>evpFgU_1$>B~{{Yp#tqPMG3IhND002ov JPDHLkV1oTYczOT; literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood16.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood16.png new file mode 100644 index 0000000000000000000000000000000000000000..5712ed8c85f275122606ae70a9063cbae05a59d8 GIT binary patch literal 1263 zcmVPx(sYygZR9J<|! zKR}N?^b7RTy9+%9+8jd8F0>^%C?Gu$j@Wy^3Qy@5R!1 z=6!zeznxWv6WXomn_6_soaQQ6%iC(K&WdOGPT>$>x ze?!TzPbB2njd8F7uKF$RTT86^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bVgku&qv+NO1a8C>pU-B|HVD) zJS*jD0uCh3H|q6N_n+BKc3=Hg-)|Ni*F!_ZlK76LeH&%(zK9!}gF|NK!cF5oPF Z{s;4BrV{CpXfpr+002ovPDHLkV1jJcYAyf( literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood17.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood17.png new file mode 100644 index 0000000000000000000000000000000000000000..ba5d664c0a41aa7374d42e0af0aab78a9fcadc1d GIT binary patch literal 1243 zcmV<11SI>3P)Px(l}SWFR9J7yL@1Up^@1T5O2-?7c4O6>rQRMkGupMKxOVcMR*z*UMY!0 zfjcaW^>^G-s#Llj1UYU_kF?D`T<6XAKTmWr$)3ME0^koko|^>#UIm>LQ&X;*OHs+N z0W^H};X1&%;7LEqN``%+C$h6>`;(n}`1Z z=Z_l3XYR6Zk-J=BvAe<`bR$)YETC2OJ@4Gm<2Eh;c)Q$7G;Q&%f zdc(ccuFyT;1wDiipA1j-PBNG+%SQ--7xYr|Q*A1xjJM1=vv6ADN-0l_Wg*_1PQIg+ zehOTrKY0cu&B=FCXF(RAYTFS&y;j39vuDo2B)GCI%f~UZ)N3`8Jos=Dsw>yE_7OsG zy?p?{*A!12CZ|~vuA<+veEj)Yq?FixIdxU*U2sj@r4g+H@YFsS>+rmA$Bct$M5|mA zcT>9{2cvyiDa_H5n+PG;3f_PpXF)k0myK}(lW+hb1X4=AD$JpIK|;WBn<*CQ&%@U1 zk%&pKao{A}pPyx>SRA_pQUZFzJt~Dc8qq4PolWYsT1o_rgiL}?f^YBa=<@c4duahx z+l~hQs3u;}!w$=A@9bz1Po-orIMPBUnF2dz79oU&+kP3(=xP6h(4}hIQP*`dIUxiR zshtl(my%&KA6=ofvkAmCbfm;F4`Lz2m&-V?nlGh9N=YMH#WQ-k@shi(>$>D-ig8+% zh>~GbpNYS48Lq~P9T%H2ml`Di-nIrjH{-d3(1rH}E;UNjKfF8gBNmM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;Fji5H%l?_q!8=2VNy3sSenPZ#k=9Z zCa|8VhL+}G8zwt`BL8!?6YEV! zjFqrUG~ABgNK}3$n`JN@%1zQg; zS=yjdE=%>B*fBek)T%KI0+~My0LI2%vaM19qTG(=t6J3Yd296J6n+r~yr(e!x_hQkZbU#JIS-~f)}&^tYfO@-_M zZ`8xGEMRiCPb(F`Ne(21XhJawmSy3Mda<0?J>WPF0K4N3Rm|9>@~Kes#B&vsx@Jp3 zqP`k(CQF4v2+@tUJMKvK!cNuN>1UBAp3laSdT|7G%?2jp+;v@vn^wUqnKX5s0wW2=gPFO#qGvkB^p*l(VGzrVH zIBc~j_$GP1K$qte2l|1_E$cqDa4Tlj?szgr0!Y2-ru##Hu4$%x7t}Rd)~khE+_LV^ zPJx)q;=(eH<6v19Zy3lVL86KoQ#}2<_rKbyKO@>T2jXj!fzYu1wxfJq3_w2(U7W z0B`z+B%uON=hwn52`cKlMszFgH=C(BaXtSoPOBcb}3+Ty_N^y?S7vZ z8Dv4;FL1qi_s z;=Sd(9mYulhbIl*?z^N{Qqnzjzo^m99!TZ2)zuInz29u6AnJVavQQhPxUeiO6yUi` zQRehckH}?;eAx-*0(VX%2`8eajEbmDBkcx${{BadU#{@L z-{x0i2mjjv-~8|Zm>kRDNn^I@nyyqXr+}$Yn^J`6SeX2Ao$hLw{NWUnrS2EjPvgy8 zMElKVs!}eKUP;woNZzfvwIf`2r& zZr_$x)mB$S_4|`YkHhxUmmxs=>C5oRqsJHKs?Yyxs098?oqqte916rtgJJ{#0000< KMNUMnLSTZ5+K?as literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood20.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood20.png new file mode 100644 index 0000000000000000000000000000000000000000..6844b5065764d92e33727ef94823ff67cbeeb063 GIT binary patch literal 1199 zcmV;g1W@~lP)Px(X-PyuR9J?|wpLtKC98UBJcvAg>;Ima*55}jSSzlo-q7dsnagJEx?KU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@hE5b5_exlsX7Ye}Le4(B_ell@x^7ALPq=1X~`42(Oe2{^w$5sFU N002ovPDHLkV1mdqKGy&M literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood21.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood21.png new file mode 100644 index 0000000000000000000000000000000000000000..50dbc6473408db79c3c0e40eb97eb6d0414fdb48 GIT binary patch literal 1196 zcmV;d1XKHoP)Px(W=TXrR9J4G04{h+p0bz4Z}%gpNU%oA=EHe`3;^ZDE*{q8fX48Wh^F#vzO zc}pp0&m`o71Cw9{d>HO<-&*BixTDA2w^p^7S%kcIz^%fD{HFI0>jgu|pWccb=H5fcTBMm`FEU-V-l zqJUCiLr%-YL;>A_&wAm~82l{YQ4!C3vA=1SQgy>zmH-c;?AW@`3RkA;VcX0DFuEL? za>HDfrJSvmD=^F+`7|r#Y#rp7fKtxJoon+T%BJ8S%SxC2#+_@Uf>f4;IQshhD%t9Q z^*8?l7mIpQ=B|Yn*=rS+j#lXoeBBuapjCB(;M~wrn-qZZpUi>*ag}=gLxd1)_fG#8 zIDilWuYZ{83S9$1mO3dFVK*iG!M3@*J>#dFcdNkIt{*maG;mh z>mQ~CRBc;!!{M3)k%v7fvwv`)MLZRPrRY=(nPv*?ng)*JXt*7g338tH-yQf=ZCf7s zekSWU4g#T_cLzSDoXw)VPV-<3h}X~+0@pl=g%BSulfY`c5CS0t4Y^5>^K{`QyY0yL z$<7z!v?>v$oK1Z`zTwi}j1{{+Hf63fN&viWcG))LvE6|WZ}VJfl&HV^b{a~Sa?2FW z3YGiwb!3%yRa-PG1d&H4c+IIR(;|WW&JM4e zKE_gpQqD&GaZ&S?4|lGO<2afJU^H8;48)bM4vS==RPqaY-4wiNR`eLJe@M}+P|Dey zx{~g|Cy2Zh-0L6e!%ju6xVj5eCaShA?J#ztB3E^x*72urf5iIv6Yhrh`Neuj`1J{2 z{csl;F3WyrCpF)Hyh|+L_zsD)+3*yzKqXJ?k>J%hePdNX@U;Y7^n_ zwav9PovOylicCH~d-O!QTQ4MlyY)god-P=L*yQhzYDobX@$(-SJ%0%>(6cQ70000< KMNUMnLSTYI8blEQ literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood22.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood22.png new file mode 100644 index 0000000000000000000000000000000000000000..2bd5789c826c7f312caec9616df39f9b691b93e1 GIT binary patch literal 1187 zcmV;U1YG-xP)Px(T}ebiR9J>4?Pw7 z2jtj8j=l8KdkZ-Q+8jd8KC~g11Vkv7F!e%dY&IQlP_-+o*{FDW*vx2GKl~%kJ4vfI z@AG|c-kVuvIHTPxtgDh;op>HZ9>4Z~%bYddsTbTVtgGJ8=hL|h=GiC33IKnG2LSx> z<}Kx%b0#4tI%@FUD9c*GI@b4T{|JEZ?Eg+J1YalBcUQgzi{QNTpQE!^8YGhCbQho^QPfbs1xl&kiND(4)d zT!Z24na{Fv&M`?&2q@KI!SF=h_i3ZUn5%^vi9a*;Cxw6 ztK8+VNcM7-<^5~)hQ65$3oxp>LGa$tahsNaj-RZ81#y>pgFU2_<}~}zZ~!SK-e4~^ z6{ZJ*$U_KmZg{eHlF4irLxd0nk(csM9qv-fcx2wQ3MVzLlyc&k1@UaUa~-4fJaAop zox~H;edW$|QfGk$P;(pw(5TmOZR^Zcm<89iT?}z;i$=Xpk_YcjLVe}>#RG&8+-M&H z@HwRuui$Y@!gcoB#gK4m0VyR;SV>*gW(uy0+ceb%0FRu*sR7>??%Ht@O|`*waXU2y zSs2Y_HNQwpZXtwVJ9-6STm>C?S~aE#Ou_+#5J)NcEWe21MF|1pHeV{yU4reGBN4M; z)4)l1xU|50sWf#0QUbie9@YFJO|?O5cZ){7o)Q5gA+w;f;5)m!W_!KCURprSaa1oH z?MV=MIKv7%ySqljBPm&qj*O65ropalA%rk+C#(?UJQKe+^r<m zPdVqXq^{7~-2&o0bfv_#4`U(3m&-J;_Lov3rKG7g2y&ijyyUd)`##zEQe0LoqMUPR z%wLNm4>n@Ou8%{7OU*I>uUkEy+OcnM=)>DQmzrf7?|wT970bC5N_LfMevxW^k)7_d z6kKz&-5{XVZfBaSt4bnSQddl7)puQ6va1AlxQk*m@oft~I%UblR#wGp9$5eY002ovPDHLkV1mVT BKH2~P literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood23.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood23.png new file mode 100644 index 0000000000000000000000000000000000000000..41bf4794de1d6a6cba4ff7f67fa1b9571b816ce8 GIT binary patch literal 1177 zcmV;K1ZMk*P)Px(Q%OWYR9J~8BdCKhbqt={(XOm^tK#WlJ*!>)u&vndB&}xN z=lkBgH*b|UeFvXVx)k<$Oqw^Q7;WSU6sx z-E*VPFn~x^%NxGoKGjAAp#8_QU_e-{vxG_9l zJMm!l^FBfdyueAUPh9R&%CKcVF$-4}u9R}4pwi5gTuo} z#2YDD2+kuR<4l8X(?AFj!7YCVFXKf1+dY@EWvOG=O{IkpNMz)^-E%2sEaue%>W5oE zc!su=*ydR%gmAcw0_*isN~Dz3)COM0i3%^?ZO5)ldb$v%Rf{NQEUMEhq37;KsMvO~ znBiWn2*7E*&5jwaZTDRGH_N?Rk?O^7=e}Ygvq-@#QOeFy%Fc1n+D*VUH{J3)>WxOK zwzQ-ql6mzYimY@|wFR?;7dW)MQ_gLb6bT%(b~&xP7z-(i84LZ#Meo->?5QR~h=>PZ z)EkWygq5#{MZ8c-*}3T4G`wJzqBTzUh=N(7n6Wsw744pj7dQ#H(>;oYosL{{qb|^y zC|j1Y{LqPxT-Sv@$DhCbk^C>8@zno@U-LiVe|^SRKRgBc$8ylxP3(8`Cmc82C~|E> zugbNhC8e)SZEpUAW7kbV|HV~jLIa@x!WjmU+^WxOKTB%?xq}U6ZDPtkr zqX)=d&`dp^DYKcs%lpnBZ07Isc&40y1Bw0BN@XPcQrlQvjZ#%xT2k@vZ(qJv_SQQE rU~j!sZ(qJ1yEgv$RxK{zCVu`0*tmOJ&pxiE00000NkvXXu0mjficvy( literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood3.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood3.png new file mode 100644 index 0000000000000000000000000000000000000000..c0cc200ad4b77da30fc8c09964516e2fd3b6d6f9 GIT binary patch literal 1423 zcmV;A1#tR_P)Px)Nl8ROR9JIwFe)1 z>0im+@W=mgZ+bv7KEqz@UbDlzC9|E^jhmx6zfKM~ApVduDW(G@j zxUq2E|JMbq#S6ZrI%IW|ZMPf&PG}l+x5Wlo5}GFWL?PR5nXGPNsSa!L!h4IDDv@9= zzy-iHFTTU~rm^|}1rYg|!+Hx&e_C4=RaDY9nAywEQ z%Ldu0`Nl0$m5@s`+_qbu%6vYNpxf`u->?bx0B?uz^@VlWm;jFl`w>j3z*@ZEr!)f~ z0xsAI;Q2&iqKL31G)>0MsK|T(Db1MZ30Xi&GpHr@BXb_MX>6zMO|zd~mH8|&OD(aF zAQ>rOEne{Ri|gcbImv#5Y(&m!Y{S;~Jn7%}JQAA52HD7X=5smni|Y{;VuC%uvE#^u z;ifu^ZTLCtD~h;Jowvi$p2#0oAqGL0HhV|dwoTn_v8As^7>%EIx8FbW`~`a;0uEr? zHqG8qWGZA2ID;mZWdWnReVnNPo~FPw6HO>4!LlrzK{MhLxd&|924H7cr+^u`R6b;3 zKd~-gQc|;$kjNi4Ig=T~@FBR-c7}CXy^u33?f6>wiS^rIz+N0dNzDSIac;ER5;qnG z&*yUNX$?whRtA6SU5Ipdm}M9|Y+-O=ds>5hE*BvSFaxmMFVOMY92_17eb5+HeV_V- z62b)QY0Srquq=y%!$S<$B&8WNcra3+bp;g>Sm?{t%$6swv+E zB{eJa75z=FST`r9K+I)&ZVB7Au`G)hbfuFhqJSA;JpRAYW zNVJ+U3}1btp!lbFzK=6#qP|gh-aTR|ou-q}_|t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/Alerts/blood_counter.rsi/blood7.png new file mode 100644 index 0000000000000000000000000000000000000000..40f7abf0e08ed431930c3ba817653a3449f6f2f6 GIT binary patch literal 1381 zcmV-r1)BPaP)Px)A4x<(R9J zdg+JAAzz@E-g}0TJ5Bm|7r+h0^f`SG%#1vaz>^&5U;JRb01y zFItV>d7tNb|IDlsoYAgNTnlpP;)!*4(B-F>KPS!_?;mftK5;GR`3{#d=hRx+ECA5< zb^-XK|BAd}or%b)j!|FpZh z5_Zbv`oy*1UlUkJ&johMrEC^h^XeLK#xQ7myDU*AV;E{p5?S-=l+6Nm%4H!v_f`_I zDU!-1xCFTBm)I~mv4O7oB_7fyV;J;(9|+6R_I446xsm0F%|Oq0)U#CC_x+LJ02@X} zWnqajOO#{d9XE}YOqXo9HLo74d_0q3zu#A%QIqNcULV32=NDCD0z4UPYM3em3+cHa zZ&&~txKt;B$1|A|B%+ov47G18g^CA|H>?vqp$Oy+i&kb+oAao}sf}BUvv2;Yb18F< zR%R0^QX{aCo(rmzi&QHWrGAOBmd-e}QS1A@^6&dT8N*m=qLziER1dJ{ zx+-9_sYa=devkS}5)Wzf`f#`=<43cQgs@Ay2RjHMXnVWdG#52R$Lqb{?~km%R1aw2 z073}52RqtSs2*?!U2NM1hG+Y6r4l$U192vsP)>qv+qi?S=A)ehLI?mJ9JZOGpdBiw zS=3KH&rx6{RaSyz{HUp!ELm0n;feO(u&vn3bVgHq{8{?R=hug!dRc;%R2dkKbH{NM zZZZm9tyI`BI;^D1YV*7Pd9AynDx=_0i-JqrFgjE#6-}(lfV^@YGpy5<<~{%)lT!gc znh2{kb$gZPx9&1^dli7^x9$S)=;aZ|?H9tXe`yENir@1cN|qIL949em+cpBBg7E3m$8i{&%!O%{B=UwubuxUz%8GBgHkU5q4!Z2QFF0xiI!Rz_ug;5xLvl7j-ms8=T;zTkqm|jjwrzz6kZd%Y z2?#r1UKY_tDQ2ft-6VJ}T~t2ZgB^0|B6-8&s1?xj9o#`z1MeQ}sLM_&m$+&QWF|_M z6e_zC+@;fWlyYe&UX^R} z^MO1vr8(xVxgC_>*aQ-2)q#L?DhHWSrKh2(64CxgvIayHx}FOVmL z&BRKf#Hx9LXD@$a)x5w;p`?KW+Wu;#5)1xTTfTBdrK&bRA4I?3zjH5Wtv?O`TI-L4 n`*-e*^o>6MuNEcnU*h}?8K(6@`Zt&400000NkvXXu0mjf(&mx6 literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood8.png b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/blood8.png new file mode 100644 index 0000000000000000000000000000000000000000..50ec9b673ab0f85d39812fa1a40a0f8b91c1d9ca GIT binary patch literal 1370 zcmV-g1*Q6lP)Px)6iGxuR9JqDyh@H z7q4dDd7tNb|IDltoY8Jh-Uza(!l`w4(B-!`zbDQb?_Y1YIe8=K`3@J;=hRxs%mdKz z_5k>+|CXF#or%at9izY!aNVo3W-hYs)s^3xxv0pTg-G&a;P#lyO1`Lp$C+F&nR!<7 zMeH$`o0B(!PbRRCss{F$OUcZ$?$tHmv|-Tk_E@4s+A!3bB(m<+DVcffF_(o@^@Aj0 zQzVs3a0zhLFY?UTjSY0wFY<&AX~UrJ`#@Nhj<<(6%8o2YYzBJ1qn@S8zVD9&2Y6=e zsw^x~Vu@00ypyJ}lIfBSx9-(rl~1J89Q6C@Z`7oEfOkjm&1Z|MF#%o-wlqwYfrV5x z$Qc%Z1}@b};E8nl6p5&%4MXi4A4A0h$QjnDo=^mGhDAHQrOkQN;?%~i#o3R4*SVNJ zM?1ZR6sZwdNL7Q%)FPE~S*c&5q@^=XZPfa{ul)PIPueh8qNI&yrCg>mwWwtwDb)k) zyRHftZK_dfqraoRlEf1_ygM4M$@tMMBq8k5?%@tX2s+*#Yv!V+=w!VQ`u&mhm+Aox z96$&`_i#s>3e^Mdpo?wW!0>E8sZ;{TWgyOE6Us@jZ5wyc)qJ#bKnMZA&-C3@UfsE`-ph9nzWe2r!as1?G(Fm> zq>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7ot7#0(mmpO05;k+%nJc?B!qFGS9JAENkF^w!c=bCW61!RgSxu00000NkvXXu0mjfnsAAs literal 0 HcmV?d00001 diff --git a/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/meta.json b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/meta.json new file mode 100644 index 00000000000000..912c64a3ae7228 --- /dev/null +++ b/Resources/Textures/SS220/Interface/Alerts/blood_counter.rsi/meta.json @@ -0,0 +1,83 @@ +{ + "version": 1, + "license": "EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt", + "copyright": "Made for SS220 by DaGo7393 (Discord)", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "blood0" + }, + { + "name": "blood1" + }, + { + "name": "blood2" + }, + { + "name": "blood3" + }, + { + "name": "blood4" + }, + { + "name": "blood5" + }, + { + "name": "blood6" + }, + { + "name": "blood7" + }, + { + "name": "blood8" + }, + { + "name": "blood9" + }, + { + "name": "blood10" + }, + { + "name": "blood11" + }, + { + "name": "blood12" + }, + { + "name": "blood13" + }, + { + "name": "blood14" + }, + { + "name": "blood15" + }, + { + "name": "blood16" + }, + { + "name": "blood17" + }, + { + "name": "blood18" + }, + { + "name": "blood19" + }, + { + "name": "blood20" + }, + { + "name": "blood21" + }, + { + "name": "blood22" + }, + { + "name": "blood23" + } + ] +} From 2b4f8b579ea9dbe270351a3d90abaedc08191134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Thu, 3 Oct 2024 20:16:29 +0300 Subject: [PATCH 39/46] add alert name and desc --- Resources/Locale/ru-RU/ss220/alerts/alerts.ftl | 2 ++ Resources/Prototypes/SS220/Alerts/spider_queen.yml | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 Resources/Locale/ru-RU/ss220/alerts/alerts.ftl diff --git a/Resources/Locale/ru-RU/ss220/alerts/alerts.ftl b/Resources/Locale/ru-RU/ss220/alerts/alerts.ftl new file mode 100644 index 00000000000000..36319f6f12773a --- /dev/null +++ b/Resources/Locale/ru-RU/ss220/alerts/alerts.ftl @@ -0,0 +1,2 @@ +alerts-spider-blood-points-name = Очки крови +alerts-spider-blood-points-desc = Это ваше брюшко. Брюшко хочет крови! БОЛЬШЕ КРОВИ!!!! diff --git a/Resources/Prototypes/SS220/Alerts/spider_queen.yml b/Resources/Prototypes/SS220/Alerts/spider_queen.yml index 31037940b74156..2e34f337a526b5 100644 --- a/Resources/Prototypes/SS220/Alerts/spider_queen.yml +++ b/Resources/Prototypes/SS220/Alerts/spider_queen.yml @@ -49,7 +49,7 @@ state: blood22 - sprite: /Textures/SS220/Interface/Alerts/blood_counter.rsi state: blood23 - name: alerts-revenant-essence-name - description: alerts-revenant-essence-desc + name: alerts-spider-blood-points-name + description: alerts-spider-blood-points-desc minSeverity: 0 maxSeverity: 24 From 13efb90632f56402c89c2cde13436d1756883873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 4 Oct 2024 19:27:08 +0300 Subject: [PATCH 40/46] post-review fixes --- .../SS220/SpiderQueen/Systems/SpiderQueenSystem.cs | 9 +++------ .../Components/SpiderCocoonComponent.cs | 3 +++ .../SpiderQueen/Components/SpiderQueenComponent.cs | 14 ++++++++++---- .../Textures/SS220/Interface/Actions/meta.json | 4 ++-- 4 files changed, 18 insertions(+), 12 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 2bcd3e5c30edd4..75b2bdb5c1689f 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -167,7 +167,7 @@ private void OnAfterCocooning(Entity entity, ref AfterCoco private void DoStationAnnouncement(EntityUid uid, SpiderQueenComponent? component = null) { if (!Resolve(uid, ref component) || - component.IsAnnounced || + component.IsAnnouncedOnce || !TryComp(uid, out var xform)) return; @@ -175,7 +175,7 @@ private void DoStationAnnouncement(EntityUid uid, SpiderQueenComponent? componen ("location", FormattedMessage.RemoveMarkupOrThrow(_navMap.GetNearestBeaconString((uid, xform))))); _chat.DispatchGlobalAnnouncement(msg, playSound: false, colorOverride: Color.Red); _audio.PlayGlobal("/Audio/Misc/notice1.ogg", Filter.Broadcast(), true); - component.IsAnnounced = true; + component.IsAnnouncedOnce = true; } /// @@ -232,9 +232,6 @@ private bool TryStartSpiderSpawnDoAfter(EntityUid spider, }; var started = _doAfter.TryStartDoAfter(doAfterArgs); - if (started) - return true; - else - return false; + return started; } } diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs index a1cffd58844a70..b34e339867ddd0 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderCocoonComponent.cs @@ -8,6 +8,9 @@ namespace Content.Shared.SS220.SpiderQueen.Components; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class SpiderCocoonComponent : Component { + /// + /// The time at which the next every-second action will occur (for example ). + /// [ViewVariables] public TimeSpan NextSecond = TimeSpan.Zero; diff --git a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs index 542fd4b75eadb1..2a1802fd40e90a 100644 --- a/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs +++ b/Content.Shared/SS220/SpiderQueen/Components/SpiderQueenComponent.cs @@ -9,8 +9,11 @@ namespace Content.Shared.SS220.SpiderQueen.Components; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class SpiderQueenComponent : Component { + /// + /// The time at which the next every-second action will occur (for example + /// [ViewVariables] - public bool IsAnnounced = false; + public TimeSpan NextSecond = TimeSpan.Zero; /// /// Current amount of blood points @@ -42,9 +45,6 @@ public sealed partial class SpiderQueenComponent : Component [DataField] public float HungerExtractCoefficient = 0.2f; - [ViewVariables] - public TimeSpan NextSecond = TimeSpan.Zero; - /// /// Id of the cocoon prototype /// @@ -75,6 +75,12 @@ public sealed partial class SpiderQueenComponent : Component [DataField] public int? CocoonsCountToAnnouncement; + /// + /// Has there been a special announcement about this entity yet + /// + [ViewVariables] + public bool IsAnnouncedOnce = false; + /// /// The prototype of alert that displays the current amount of blood points /// diff --git a/Resources/Textures/SS220/Interface/Actions/meta.json b/Resources/Textures/SS220/Interface/Actions/meta.json index 55da60f7d49c5b..8e397e4477fda6 100644 --- a/Resources/Textures/SS220/Interface/Actions/meta.json +++ b/Resources/Textures/SS220/Interface/Actions/meta.json @@ -1,11 +1,11 @@ { "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/tgstation/tgstation/blob/HEAD/icons/effects/web.dmi", "size": { "x": 32, "y": 32 }, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/tgstation/tgstation/blob/HEAD/icons/effects/web.dmi", "states": [ { "name": "web" From 6117b476457028908bff56bade9e4a55a4c34038 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Fri, 4 Oct 2024 19:30:36 +0300 Subject: [PATCH 41/46] forgot add to BasicAntagEventsTable --- Resources/Prototypes/GameRules/events.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index f99d17694e17da..23735f29bfcfdf 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -36,6 +36,7 @@ - id: SleeperAgents - id: ZombieOutbreak - id: DarkReaperSpawn #ss220 darkreaper middle event + - id: SpiderQueenSpawn #SS220 spider queen midround event - type: entity id: BaseStationEvent From bb2607b7adb0535c6d9e93b84d917569597e5cc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Sat, 5 Oct 2024 18:07:24 +0300 Subject: [PATCH 42/46] some optimization --- .../SpiderQueen/Systems/SpiderQueenSystem.cs | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 75b2bdb5c1689f..36a45b0277d86d 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -69,7 +69,7 @@ private void OnTargetSpawn(Entity entity, ref SpiderTarget var spider = entity.Owner; if (args.Handled || spider != args.Performer || - (args.Cost > FixedPoint2.Zero && !CheckEnoughBloodPoints(spider, args.Cost, entity.Comp))) + !CheckEnoughBloodPoints(spider, args.Cost, entity.Comp)) return; if (TryStartSpiderSpawnDoAfter(spider, args.DoAfter, args.Target, args.Prototypes, args.Offset, args.Cost)) @@ -89,7 +89,7 @@ private void OnNearbySpawn(Entity entity, ref SpiderNearby if (args.Handled || spider != args.Performer || !TryComp(entity.Owner, out var transform) || - (args.Cost > FixedPoint2.Zero && !CheckEnoughBloodPoints(spider, args.Cost, entity.Comp))) + !CheckEnoughBloodPoints(spider, args.Cost, entity.Comp)) return; if (TryStartSpiderSpawnDoAfter(spider, args.DoAfter, transform.Coordinates, args.Prototypes, args.Offset, args.Cost)) @@ -105,19 +105,13 @@ private void OnNearbySpawn(Entity entity, ref SpiderNearby private void OnSpawnDoAfter(Entity entity, ref SpiderSpawnDoAfterEvent args) { - if (args.Cancelled) + if (args.Cancelled || + !CheckEnoughBloodPoints(entity, args.Cost, entity.Comp)) return; - var performer = entity.Owner; - if (args.Cost > FixedPoint2.Zero) - { - if (!CheckEnoughBloodPoints(performer, args.Cost, entity.Comp)) - return; - - entity.Comp.CurrentBloodPoints -= args.Cost; - Dirty(entity); - UpdateAlert(entity); - } + entity.Comp.CurrentBloodPoints -= args.Cost; + Dirty(entity); + UpdateAlert(entity); var getProtos = EntitySpawnCollection.GetSpawns(args.Prototypes, _random); var targetMapCords = GetCoordinates(args.TargetCoordinates); From 446b419e2526b43e5a0e458ac19c0dc212a2b71c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Tue, 8 Oct 2024 22:01:03 +0300 Subject: [PATCH 43/46] post-tests fixes --- .../Systems/CreateCocoonsConditionSystem.cs | 15 +++++++------- .../SpiderQueen/Systems/SpiderCocoonSystem.cs | 5 +---- .../SpiderQueen/Systems/SpiderQueenSystem.cs | 4 ++++ .../Locale/ru-RU/ss220/mobs/spider-queen.ftl | 20 +++++++++---------- .../ru-RU/ss220/objectives/spider-queen.ftl | 2 +- .../ru-RU/ss220/spider-queen/spider-queen.ftl | 5 ++++- Resources/Prototypes/GameRules/events.yml | 2 +- 7 files changed, 28 insertions(+), 25 deletions(-) diff --git a/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs b/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs index 44ab368866c13a..3ed262ca6452b3 100644 --- a/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs +++ b/Content.Server/SS220/Objectives/Systems/CreateCocoonsConditionSystem.cs @@ -37,14 +37,13 @@ private float GetProgress(EntityUid mindId, MindComponent mind, int target) !TryComp(mobUid, out var spiderQueen)) return 0f; - if (spiderQueen.CocoonsList.Count >= target) - { + var progress = spiderQueen.CocoonsList.Count >= target + ? 1f + : (float)spiderQueen.CocoonsList.Count / (float)target; + + if (progress == 1f) spiderQueenRole.IsCreateCocoonsCompletedOnce = true; - return 1f; - } - else - { - return 0f; - } + + return progress; } } diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs index 5efa4db8726882..49d85cca36cafc 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderCocoonSystem.cs @@ -101,10 +101,7 @@ private void OnAlternativeVerb(EntityUid uid, SpiderCocoonComponent component, G Broadcast = false, BreakOnDamage = false, BreakOnMove = true, - NeedHand = false, - BlockDuplicate = true, - CancelDuplicate = true, - DuplicateCondition = DuplicateConditions.SameEvent + NeedHand = false }; _doAfter.TryStartDoAfter(doAfterEventArgs); diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 36a45b0277d86d..582446bd93fbbb 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -1,9 +1,12 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt using Content.Server.Chat.Systems; using Content.Server.Pinpointer; +using Content.Server.SS220.Objectives.Systems; using Content.Shared.Coordinates.Helpers; using Content.Shared.DoAfter; using Content.Shared.FixedPoint; +using Content.Shared.Mind; +using Content.Shared.Mind.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Nutrition.Components; using Content.Shared.Nutrition.EntitySystems; @@ -36,6 +39,7 @@ public sealed partial class SpiderQueenSystem : SharedSpiderQueenSystem [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly HungerSystem _hunger = default!; + [Dependency] private readonly CreateCocoonsConditionSystem _createCocoonsCondition = default!; public override void Initialize() { diff --git a/Resources/Locale/ru-RU/ss220/mobs/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/mobs/spider-queen.ftl index e983fdf2f8df47..7e7e22325de11b 100644 --- a/Resources/Locale/ru-RU/ss220/mobs/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/mobs/spider-queen.ftl @@ -21,21 +21,21 @@ ent-MobSpiderQueen = королева пауков .suffix = Улей пауков ent-MobSpiderDrone = трутень королевы пауков - .desc = { ent-MobSpiderSpaceQueen.desc } - .suffix = { ent-MobSpiderSpaceQueen.suffix } + .desc = { ent-MobSpiderQueen.desc } + .suffix = { ent-MobSpiderQueen.suffix } ent-MobSpiderHunter = паучий охотник - .desc = { ent-MobSpiderSpaceQueen.desc } - .suffix = { ent-MobSpiderSpaceQueen.suffix } + .desc = { ent-MobSpiderQueen.desc } + .suffix = { ent-MobSpiderQueen.suffix } ent-MobSpiderGhost = паучий призрак - .desc = { ent-MobSpiderSpaceQueen.desc } - .suffix = { ent-MobSpiderSpaceQueen.suffix } + .desc = { ent-MobSpiderQueen.desc } + .suffix = { ent-MobSpiderQueen.suffix } ent-MobSpiderShooter = паучий стрелок - .desc = { ent-MobSpiderSpaceQueen.desc } - .suffix = { ent-MobSpiderSpaceQueen.suffix } + .desc = { ent-MobSpiderQueen.desc } + .suffix = { ent-MobSpiderQueen.suffix } ent-MobSpiderLittle = маленький паучок - .desc = { ent-MobSpiderSpaceQueen.desc } - .suffix = { ent-MobSpiderSpaceQueen.suffix } + .desc = { ent-MobSpiderQueen.desc } + .suffix = { ent-MobSpiderQueenn.suffix } diff --git a/Resources/Locale/ru-RU/ss220/objectives/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/objectives/spider-queen.ftl index a1b31a2288d04d..46934e3f60fdb6 100644 --- a/Resources/Locale/ru-RU/ss220/objectives/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/objectives/spider-queen.ftl @@ -12,7 +12,7 @@ objective-create-cocoons-title = *[other] коконов }. objective-create-cocoons-description = - Используйте действие «Окукливание» чтобы создать { $count } { $count -> + Используйте действие «Сплести кокон» чтобы создать { $count } { $count -> [one] кокон [few] кокона *[other] коконов diff --git a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl index 76c50cd25191fc..550b329ee96626 100644 --- a/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl +++ b/Resources/Locale/ru-RU/ss220/spider-queen/spider-queen.ftl @@ -2,7 +2,7 @@ spider-queen-blood-points-amount = У вас [color=#800000]{ $current } кро spider-queen-not-enough-blood-points = Недостаточно крови spider-queen-warning = Замечена аномальная биологическая активность в { $location }. Служба Безопасности должна ликвидировать угрозу до того как активу будет нанесен непоправимый ущерб! -spider-queen-role-greeting = Ваша задача — построить максимально большой улей. Не позволяйте причинить вред потомству. Экипаж - ваша пища, устройте большой пир! +spider-queen-role-greeting = Ваша задача — построить максимально большой улей, не позволяйте причинять вред вашему потомству. Экипаж - ваша пища, устройте большой пир! spider-cocoon-blood-points-amount = В коконе содержится [color=#800000]{ $amount } крови[/color]. spider-cocoon-extract-blood-points-verb = Извлечь ману @@ -14,3 +14,6 @@ cocooning-target-not-humanoid = Цель должна быть гуманоид objective-issuer-spider-queen = [color=#c8a2c8]Королева пауков[/color] spider-queen-round-end-agent-name = [color=#c8a2c8]королева пауков[/color] + +roles-antag-spider-queen-name = Королева пауков +roles-antag-spider-queen-objective = Постройте максимально большой улей и не позволяйте причинять вред вашему потомству. Экипаж - ваша пища, устройте большой пир! diff --git a/Resources/Prototypes/GameRules/events.yml b/Resources/Prototypes/GameRules/events.yml index 23735f29bfcfdf..966c62e05b476d 100644 --- a/Resources/Prototypes/GameRules/events.yml +++ b/Resources/Prototypes/GameRules/events.yml @@ -36,7 +36,7 @@ - id: SleeperAgents - id: ZombieOutbreak - id: DarkReaperSpawn #ss220 darkreaper middle event - - id: SpiderQueenSpawn #SS220 spider queen midround event + # - id: SpiderQueenSpawn #SS220 spider queen midround event - type: entity id: BaseStationEvent From ef6f42bb14fbe2d6a1678b36fd01ad5e6f961b32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Tue, 8 Oct 2024 22:04:33 +0300 Subject: [PATCH 44/46] delete needless usings --- Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 582446bd93fbbb..02c7e28fa21105 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -5,8 +5,6 @@ using Content.Shared.Coordinates.Helpers; using Content.Shared.DoAfter; using Content.Shared.FixedPoint; -using Content.Shared.Mind; -using Content.Shared.Mind.Components; using Content.Shared.Mobs.Systems; using Content.Shared.Nutrition.Components; using Content.Shared.Nutrition.EntitySystems; From 5ef14561d10af05d7f37beecbaf0f45c098aea54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Tue, 8 Oct 2024 22:06:05 +0300 Subject: [PATCH 45/46] delete needless using and dependency --- Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs index 02c7e28fa21105..36a45b0277d86d 100644 --- a/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs +++ b/Content.Server/SS220/SpiderQueen/Systems/SpiderQueenSystem.cs @@ -1,7 +1,6 @@ // © SS220, An EULA/CLA with a hosting restriction, full text: https://raw.githubusercontent.com/SerbiaStrong-220/space-station-14/master/CLA.txt using Content.Server.Chat.Systems; using Content.Server.Pinpointer; -using Content.Server.SS220.Objectives.Systems; using Content.Shared.Coordinates.Helpers; using Content.Shared.DoAfter; using Content.Shared.FixedPoint; @@ -37,7 +36,6 @@ public sealed partial class SpiderQueenSystem : SharedSpiderQueenSystem [Dependency] private readonly SharedAudioSystem _audio = default!; [Dependency] private readonly SharedDoAfterSystem _doAfter = default!; [Dependency] private readonly HungerSystem _hunger = default!; - [Dependency] private readonly CreateCocoonsConditionSystem _createCocoonsCondition = default!; public override void Initialize() { From c2c67a04141b8a5e72033dabcb1162d8b3116ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B8=D1=80=D0=B8=D0=BB=D0=BB=20=D0=A5=D0=B8=D0=BB?= =?UTF-8?q?=D1=8E=D0=B2=D1=87=D0=B8=D1=86?= Date: Wed, 9 Oct 2024 20:43:48 +0300 Subject: [PATCH 46/46] delete needless comment --- Resources/Prototypes/SS220/Objectives/spider_queen.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/Resources/Prototypes/SS220/Objectives/spider_queen.yml b/Resources/Prototypes/SS220/Objectives/spider_queen.yml index 34204fffe5059b..fb29735a4465a9 100644 --- a/Resources/Prototypes/SS220/Objectives/spider_queen.yml +++ b/Resources/Prototypes/SS220/Objectives/spider_queen.yml @@ -20,7 +20,6 @@ sprite: SS220/Structures/Specific/cocoon.rsi state: cocoon2 - type: NumberObjective - # dragon can only spawn 3 rifts so keep objective the same min: 10 max: 10 title: objective-create-cocoons-title