diff --git a/.github/workflows/labeler-untriaged.yml b/.github/workflows/labeler-untriaged.yml index ec1d194851c..22554d05650 100644 --- a/.github/workflows/labeler-untriaged.yml +++ b/.github/workflows/labeler-untriaged.yml @@ -3,8 +3,6 @@ on: issues: types: [opened] - pull_request_target: - types: [opened] jobs: add_label: diff --git a/Content.Server/DeltaV/GameTicking/Rules/Components/DelayedRuleComponent.cs b/Content.Server/DeltaV/GameTicking/Rules/Components/DelayedRuleComponent.cs new file mode 100644 index 00000000000..64f90f135e0 --- /dev/null +++ b/Content.Server/DeltaV/GameTicking/Rules/Components/DelayedRuleComponent.cs @@ -0,0 +1,46 @@ +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; + +namespace Content.Server.DeltaV.GameTicking.Rules.Components; + +/// +/// Delays adding components to the antags of a gamerule until some time has passed. +/// +/// +/// This is used for the zombies gamemode so that new players don't hit the funny button immediately and ruin anyone else's plans. +/// +[RegisterComponent, Access(typeof(DelayedRuleSystem))] +[AutoGenerateComponentPause] +public sealed partial class DelayedRuleComponent : Component +{ + /// + /// The players must wait this length of time before gets added. + /// If they are somehow found out and get gibbed/cremated/etc before this delay is up they will not turn. + /// + [DataField(required: true)] + public TimeSpan Delay; + + /// + /// Whether to skip the delay if there is only 1 antag selected. + /// + [DataField] + public bool IgnoreSolo; + + /// + /// When the will end. + /// + [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField] + public TimeSpan DelayEnds; + + /// + /// The components to add to each player's mob once the delay ends. + /// + [DataField(required: true)] + public ComponentRegistry DelayedComponents = new(); + + /// + /// Popup to show when the delay ends. + /// + [DataField(required: true)] + public LocId EndedPopup; +} diff --git a/Content.Server/DeltaV/GameTicking/Rules/DelayedRuleSystem.cs b/Content.Server/DeltaV/GameTicking/Rules/DelayedRuleSystem.cs new file mode 100644 index 00000000000..ca64ebf45e0 --- /dev/null +++ b/Content.Server/DeltaV/GameTicking/Rules/DelayedRuleSystem.cs @@ -0,0 +1,58 @@ +using Content.Server.Antag.Components; +using Content.Server.GameTicking.Rules; +using Content.Server.DeltaV.GameTicking.Rules.Components; +using Content.Shared.GameTicking.Components; +using Content.Shared.Mind; +using Content.Shared.Popups; + +namespace Content.Server.DeltaV.GameTicking.Rules; + +public sealed class DelayedRuleSystem : GameRuleSystem +{ + [Dependency] private readonly SharedPopupSystem _popup = default!; + + protected override void Started(EntityUid uid, DelayedRuleComponent component, GameRuleComponent gameRule, GameRuleStartedEvent args) + { + base.Started(uid, component, gameRule, args); + + component.DelayEnds = Timing.CurTime + component.Delay; + } + + protected override void ActiveTick(EntityUid uid, DelayedRuleComponent component, GameRuleComponent gameRule, float frameTime) + { + base.ActiveTick(uid, component, gameRule, frameTime); + + CheckDelay((uid, component)); + } + + /// + /// Checks if the delay has ended. + /// + private void CheckDelay(Entity ent) + { + if (!TryComp(ent, out var selection)) + return; + + // skip the delay if it's just 1 player, theres no plan to ruin if you are the only one + var ends = ent.Comp.DelayEnds; + if (ent.Comp.IgnoreSolo && selection.SelectedMinds.Count < 2) + ends = Timing.CurTime; + + if (Timing.CurTime < ends) + return; + + var comps = ent.Comp.DelayedComponents; + foreach (var (mindId, _) in selection.SelectedMinds) + { + // using OriginalOwnedEntity as the player might have ghosted to try become an evil ghost antag + if (!TryComp(mindId, out var mind) || !TryGetEntity(mind.OriginalOwnedEntity, out var mob)) + continue; + + var uid = mob.Value; + _popup.PopupEntity(Loc.GetString(ent.Comp.EndedPopup), uid, uid, PopupType.LargeCaution); + EntityManager.AddComponents(uid, comps); + } + + RemCompDeferred(ent); + } +} diff --git a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs index d61310908c3..80a3b405a84 100644 --- a/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs +++ b/Content.Server/Objectives/Systems/KillPersonConditionSystem.cs @@ -38,14 +38,17 @@ private void OnGetProgress(EntityUid uid, KillPersonConditionComponent comp, ref args.Progress = GetProgress(target.Value, comp.RequireDead); } - private void OnPersonAssigned(EntityUid uid, PickRandomPersonComponent comp, ref ObjectiveAssignedEvent args) + private void OnPersonAssigned(Entity ent, ref ObjectiveAssignedEvent args) { - AssignRandomTarget(uid, args, _ => true); + AssignRandomTarget(ent, args, _ => true); } - private void OnHeadAssigned(EntityUid uid, PickRandomHeadComponent comp, ref ObjectiveAssignedEvent args) + private void OnHeadAssigned(Entity ent, ref ObjectiveAssignedEvent args) { - AssignRandomTarget(uid, args, mind => HasComp(uid)); + AssignRandomTarget(ent, args, mindId => + TryComp(mindId, out var mind) && + mind.OwnedEntity is { } ownedEnt && + HasComp(ownedEnt)); } private void AssignRandomTarget(EntityUid uid, ObjectiveAssignedEvent args, Predicate filter, bool fallbackToAny = true) diff --git a/Content.Server/Procedural/DungeonJob/DungeonJob.PostGenBiome.cs b/Content.Server/Procedural/DungeonJob/DungeonJob.PostGenBiome.cs index fdadcb7849d..65f6d2d14f9 100644 --- a/Content.Server/Procedural/DungeonJob/DungeonJob.PostGenBiome.cs +++ b/Content.Server/Procedural/DungeonJob/DungeonJob.PostGenBiome.cs @@ -1,6 +1,5 @@ using System.Threading.Tasks; using Content.Server.Parallax; -using Content.Shared.Maps; using Content.Shared.Parallax.Biomes; using Content.Shared.Procedural; using Content.Shared.Procedural.PostGeneration; @@ -16,35 +15,27 @@ public sealed partial class DungeonJob /// private async Task PostGen(BiomeDunGen dunGen, DungeonData data, Dungeon dungeon, HashSet reservedTiles, Random random) { - if (!_prototype.TryIndex(dunGen.BiomeTemplate, out var indexedBiome)) + if (_entManager.TryGetComponent(_gridUid, out BiomeComponent? biomeComp)) return; + biomeComp = _entManager.AddComponent(_gridUid); var biomeSystem = _entManager.System(); - + biomeSystem.SetTemplate(_gridUid, biomeComp, _prototype.Index(dunGen.BiomeTemplate)); var seed = random.Next(); var xformQuery = _entManager.GetEntityQuery(); - var tiles = _maps.GetAllTilesEnumerator(_gridUid, _grid); - while (tiles.MoveNext(out var tileRef)) + foreach (var node in dungeon.RoomTiles) { - var node = tileRef.Value.GridIndices; - if (reservedTiles.Contains(node)) continue; - - if (dunGen.TileMask is not null) - { - if (!dunGen.TileMask.Contains(((ContentTileDefinition) _tileDefManager[tileRef.Value.Tile.TypeId]).ID)) - continue; - } // Need to set per-tile to override data. - if (biomeSystem.TryGetTile(node, indexedBiome.Layers, seed, _grid, out var tile)) + if (biomeSystem.TryGetTile(node, biomeComp.Layers, seed, _grid, out var tile)) { _maps.SetTile(_gridUid, _grid, node, tile.Value); } - if (biomeSystem.TryGetDecals(node, indexedBiome.Layers, seed, _grid, out var decals)) + if (biomeSystem.TryGetDecals(node, biomeComp.Layers, seed, _grid, out var decals)) { foreach (var decal in decals) { @@ -52,7 +43,7 @@ private async Task PostGen(BiomeDunGen dunGen, DungeonData data, Dungeon dungeon } } - if (tile is not null && biomeSystem.TryGetEntity(node, indexedBiome.Layers, tile.Value, seed, _grid, out var entityProto)) + if (biomeSystem.TryGetEntity(node, biomeComp, _grid, out var entityProto)) { var ent = _entManager.SpawnEntity(entityProto, new EntityCoordinates(_gridUid, node + _grid.TileSizeHalfVector)); var xform = xformQuery.Get(ent); @@ -70,5 +61,7 @@ private async Task PostGen(BiomeDunGen dunGen, DungeonData data, Dungeon dungeon if (!ValidateResume()) return; } + + biomeComp.Enabled = false; } } diff --git a/Content.Shared/Parallax/Biomes/SharedBiomeSystem.cs b/Content.Shared/Parallax/Biomes/SharedBiomeSystem.cs index 250b0f70a54..b14baba9817 100644 --- a/Content.Shared/Parallax/Biomes/SharedBiomeSystem.cs +++ b/Content.Shared/Parallax/Biomes/SharedBiomeSystem.cs @@ -183,7 +183,7 @@ public bool TryGetEntity(Vector2i indices, BiomeComponent component, MapGridComp } - public bool TryGetEntity(Vector2i indices, List layers, Tile tileRef, int seed, MapGridComponent grid, + private bool TryGetEntity(Vector2i indices, List layers, Tile tileRef, int seed, MapGridComponent grid, [NotNullWhen(true)] out string? entity) { var tileId = TileDefManager[tileRef.TypeId].ID; diff --git a/Content.Shared/Procedural/PostGeneration/BiomeDunGen.cs b/Content.Shared/Procedural/PostGeneration/BiomeDunGen.cs index e21e582211b..833cf2dec76 100644 --- a/Content.Shared/Procedural/PostGeneration/BiomeDunGen.cs +++ b/Content.Shared/Procedural/PostGeneration/BiomeDunGen.cs @@ -1,4 +1,3 @@ -using Content.Shared.Maps; using Content.Shared.Parallax.Biomes; using Robust.Shared.Prototypes; @@ -12,10 +11,4 @@ public sealed partial class BiomeDunGen : IDunGenLayer { [DataField(required: true)] public ProtoId BiomeTemplate; - - /// - /// creates a biome only on the specified tiles - /// - [DataField] - public HashSet>? TileMask; } diff --git a/Resources/Changelog/DeltaVChangelog.yml b/Resources/Changelog/DeltaVChangelog.yml index 9db929b4640..e700ecf6c26 100644 --- a/Resources/Changelog/DeltaVChangelog.yml +++ b/Resources/Changelog/DeltaVChangelog.yml @@ -1,22 +1,4 @@ Entries: -- author: DebugOk - changes: - - message: Zombies can no longer be psionic - type: Remove - id: 207 - time: '2024-01-19T20:53:05.0000000+00:00' -- author: Adrian16199 - changes: - - message: Fixes mantis and them not be able to spawn with duffelbags and satchels. - type: Fix - id: 208 - time: '2024-01-19T20:54:29.0000000+00:00' -- author: Adrian16199 - changes: - - message: Laika no longer takes 200 damage before dying from critical. - type: Fix - id: 209 - time: '2024-01-19T20:57:11.0000000+00:00' - author: lleftTheDragon changes: [] id: 210 @@ -3765,3 +3747,29 @@ id: 706 time: '2024-11-24T11:57:37.0000000+00:00' url: https://github.com/DeltaV-Station/Delta-v/pull/2278 +- author: deltanedas + changes: + - message: Fixed salvage debris not having anything. + type: Fix + id: 707 + time: '2024-11-24T20:25:25.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2280 +- author: DisposableCrewmember42 + changes: + - message: Hungry? Stuff your face with cream from an emergency pie delivery for + a change! + type: Add + id: 708 + time: '2024-11-25T05:30:25.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2211 +- author: deltanedas + changes: + - message: Initial Infecteds now get radio implants to communicate thanks to the + Syndicate. + type: Tweak + - message: Initial Infecteds now have to wait 5 minutes before they can turn, form + a plan! + type: Tweak + id: 709 + time: '2024-11-26T12:23:26.0000000+00:00' + url: https://github.com/DeltaV-Station/Delta-v/pull/2194 diff --git a/Resources/Locale/en-US/deltav/game-ticking/game-presets/preset-zombies.ftl b/Resources/Locale/en-US/deltav/game-ticking/game-presets/preset-zombies.ftl new file mode 100644 index 00000000000..1bc0332154b --- /dev/null +++ b/Resources/Locale/en-US/deltav/game-ticking/game-presets/preset-zombies.ftl @@ -0,0 +1,2 @@ +zombie-bioterrorist-role-greeting = You are a syndicate sponsored bioterrorist sent to overtake the station by use of the Romerol virus. Coordinate with your team, get supplies and prepare for your eventual transformation. Death to nanotrasen! +zombie-bioterrorist-romerol-active = The romerol in your blood is now active, you are ready to transform! diff --git a/Resources/Maps/arena.yml b/Resources/Maps/arena.yml index 49b7daf6b60..dc404102aca 100644 --- a/Resources/Maps/arena.yml +++ b/Resources/Maps/arena.yml @@ -9348,8 +9348,7 @@ entities: -4,-6: 0: 63247 -5,-6: - 0: 64271 - 2: 1024 + 0: 65295 -3,-8: 0: 16383 -3,-7: @@ -9369,7 +9368,7 @@ entities: -1,-7: 0: 65535 -1,-6: - 3: 65520 + 2: 65520 0: 4 -1,-9: 0: 64160 @@ -9380,7 +9379,7 @@ entities: 0,-7: 0: 57305 0,-6: - 3: 4368 + 2: 4368 0: 52416 -8,-8: 0: 65535 @@ -9840,15 +9839,15 @@ entities: 9,9: 1: 4080 9,10: - 4: 273 - 5: 1092 + 3: 273 + 4: 1092 9,11: 1: 240 10,9: 1: 4080 10,10: - 6: 273 - 7: 1092 + 5: 273 + 6: 1092 10,11: 1: 752 0: 28672 @@ -9857,13 +9856,13 @@ entities: 11,9: 1: 4080 11,10: - 7: 1365 + 6: 1365 11,11: 1: 35056 12,9: 1: 4080 12,10: - 7: 273 + 6: 273 0: 34816 12,11: 1: 5936 @@ -9883,14 +9882,15 @@ entities: -3,10: 1: 62259 -3,11: - 0: 819 + 0: 947 1: 29772 -2,9: 0: 15 -2,10: 1: 63616 -2,11: - 1: 32911 + 1: 32863 + 0: 160 -1,12: 1: 61457 0: 4078 @@ -10719,6 +10719,9 @@ entities: 0: 65535 16,9: 1: 240 + 0: 13056 + 16,10: + 0: 13107 12,13: 1: 61713 11,13: @@ -10994,20 +10997,24 @@ entities: 0: 30464 18,2: 0: 12407 - 1: 32768 18,3: - 0: 13107 - 1: 34952 + 0: 15355 18,4: - 0: 3059 + 0: 3067 19,0: 1: 12847 19,1: 1: 13107 19,2: - 1: 13107 + 1: 3891 + 19,3: + 0: 1911 + 19,4: + 0: 52733 20,0: 1: 15 + 20,3: + 1: 4096 16,7: 0: 61166 16,8: @@ -11025,9 +11032,6 @@ entities: 0: 819 18,6: 0: 30583 - 19,4: - 0: 19964 - 2: 32768 20,4: 0: 4369 1: 3808 @@ -11264,21 +11268,6 @@ entities: - 0 - 0 - 0 - - volume: 2500 - temperature: 293.14975 - moles: - - 20.078888 - - 75.53487 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - - 0 - volume: 2500 temperature: 235 moles: @@ -11362,6 +11351,7 @@ entities: id: Arena - type: GasTileOverlay - type: SpreaderGrid + - type: Shuttle - proto: AirAlarm entities: - uid: 304 @@ -123391,12 +123381,12 @@ entities: - type: Transform pos: 43.567142,-35.436256 parent: 6747 -- proto: MaterialDiamond +- proto: MaterialDiamond1 entities: - uid: 4036 components: - type: Transform - pos: -35.668434,-47.688297 + pos: -35.674225,-47.724026 parent: 6747 - proto: MaterialDurathread entities: @@ -148725,7 +148715,7 @@ entities: - type: Transform pos: 35.444176,-18.296202 parent: 6747 -- proto: RightArmBorgMining +- proto: RightArmBorg entities: - uid: 10713 components: @@ -155624,7 +155614,7 @@ entities: - type: Transform pos: -35.5,0.5 parent: 6747 -- proto: SuitStorageSec +- proto: SuitStorageSecDeltaV entities: - uid: 684 components: diff --git a/Resources/Prototypes/DeltaV/Catalog/Cargo/cargo_food.yml b/Resources/Prototypes/DeltaV/Catalog/Cargo/cargo_food.yml index 42b4d57e910..abd64d33efe 100644 --- a/Resources/Prototypes/DeltaV/Catalog/Cargo/cargo_food.yml +++ b/Resources/Prototypes/DeltaV/Catalog/Cargo/cargo_food.yml @@ -27,3 +27,13 @@ cost: 6000 # Thanks bounties category: Food group: market + +- type: cargoProduct + id: FoodEmergencyPie + icon: + sprite: Objects/Consumable/Food/Baked/pie.rsi + state: tin + product: CrateFoodEmergencyPie + cost: 3333 + category: Food + group: market diff --git a/Resources/Prototypes/DeltaV/Catalog/Fills/Crates/food.yml b/Resources/Prototypes/DeltaV/Catalog/Fills/Crates/food.yml index 6e273a72c48..067a9ed9777 100644 --- a/Resources/Prototypes/DeltaV/Catalog/Fills/Crates/food.yml +++ b/Resources/Prototypes/DeltaV/Catalog/Fills/Crates/food.yml @@ -29,3 +29,14 @@ amount: 1 - id: FoodBoxDonkpocketDink prob: 0.1 + +- type: entity + id: CrateFoodEmergencyPie + parent: CratePlastic + name: emergency pie delivery + description: '"Then let them eat pie."' + components: + - type: StorageFill + contents: + - id: FoodPieBananaCream + amount: 13 diff --git a/Resources/Prototypes/GameRules/roundstart.yml b/Resources/Prototypes/GameRules/roundstart.yml index 3f9fb8c886c..9938acc04bf 100644 --- a/Resources/Prototypes/GameRules/roundstart.yml +++ b/Resources/Prototypes/GameRules/roundstart.yml @@ -250,6 +250,13 @@ min: 600 max: 900 - type: ZombieRule + - type: DelayedRule # DeltaV: Grace period of 5 minutes before you can turn, to avoid a random passenger ruining your plan + delay: 300 + delayedComponents: + - type: PendingZombie + - type: ZombifyOnDeath + - type: IncurableZombie + endedPopup: zombie-bioterrorist-romerol-active - type: AntagSelection definitions: - prefRoles: [ InitialInfected ] @@ -260,14 +267,19 @@ - ZombieImmune - AntagImmune briefing: - text: zombie-patientzero-role-greeting + text: zombie-bioterrorist-role-greeting # DeltaV: Different greeting color: Plum sound: "/Audio/Ambience/Antag/zombie_start.ogg" components: - - type: PendingZombie - - type: ZombifyOnDeath - - type: IncurableZombie + # Begin DeltaV Removals: Moved to DelayedRule above + #- type: PendingZombie + #- type: ZombifyOnDeath + #- type: IncurableZombie + # End DeltaV Removals - type: InitialInfected + - type: AutoImplant # DeltaV: Let them communicate to come up with a plan of action + implants: + - SyndicateRadioImplant mindRoles: - MindRoleInitialInfected diff --git a/Resources/ServerInfo/Guidebook/DeltaV/Rules/GameRules/1_Behave.xml b/Resources/ServerInfo/Guidebook/DeltaV/Rules/GameRules/1_Behave.xml index 66c51439daa..80cc7b96181 100644 --- a/Resources/ServerInfo/Guidebook/DeltaV/Rules/GameRules/1_Behave.xml +++ b/Resources/ServerInfo/Guidebook/DeltaV/Rules/GameRules/1_Behave.xml @@ -21,7 +21,7 @@ You must roleplay. Your character's actions, feelings, and knowledge in-game sho - Do not engage in meta-communications (i.e. using external channels to communicate with other players in the same game). ## Rule B1.3: If you die and return to life, follow the new life rules. -If a player dies, they forget the specific details of their death. [color=#ff0000]Please report players who break this rule.[/color] A borg being removed from its chassis is not a death, and there is no memory loss. +If a player dies, they forget the specific details of their death. [color=#ff0000]Please report players who break this rule.[/color] A borg being removed from its chassis is not a death, and may decide for itself whether or not it experiences memory loss. - If they are revived by using a defibrillator, they can only recall vague information such as “Someone shot me” or “I was set ablaze”. - If they are revived by any other method, they forget the last five minutes leading up to their death, and cannot describe their death in any capacity.