diff --git a/Content.Server/Atmos/Rotting/RottingSystem.cs b/Content.Server/Atmos/Rotting/RottingSystem.cs index 47bac84e0ca..24d6514cba0 100644 --- a/Content.Server/Atmos/Rotting/RottingSystem.cs +++ b/Content.Server/Atmos/Rotting/RottingSystem.cs @@ -13,6 +13,7 @@ using Robust.Server.Containers; using Robust.Shared.Physics.Components; using Robust.Shared.Timing; +using Content.Shared.Cuffs.Components; namespace Content.Server.Atmos.Rotting; @@ -88,6 +89,18 @@ public bool IsRotProgressing(EntityUid uid, PerishableComponent? perishable) return false; } + if (TryComp(uid, out var cuffed) && cuffed.CuffedHandCount > 0) + { + if (TryComp(cuffed.LastAddedCuffs, out var cuffcomp)) + { + if (cuffcomp.NoRot) + { + return false; + } + } + } + + var ev = new IsRottingEvent(); RaiseLocalEvent(uid, ref ev); diff --git a/Content.Server/Connection/ConnectionManager.cs b/Content.Server/Connection/ConnectionManager.cs index 719b4a9c639..27c65de03af 100644 --- a/Content.Server/Connection/ConnectionManager.cs +++ b/Content.Server/Connection/ConnectionManager.cs @@ -200,10 +200,7 @@ private async Task NetMgrOnConnecting(NetConnectingArgs e) var slots = _cfg.GetCVar(CCVars.WhitelistMinPlayers); - var noSlotsOpen = slots > 0 && slots < connectedPlayers - connectedWhitelist; - - if (noSlotsOpen && await _db.GetWhitelistStatusAsync(userId) == false - && adminData is null) + if (await _db.GetWhitelistStatusAsync(userId) == false && adminData is null) { var msg = Loc.GetString(_cfg.GetCVar(CCVars.WhitelistReason)); diff --git a/Content.Server/Spider/SpiderSystem.cs b/Content.Server/Spider/SpiderSystem.cs index 449e43984c3..e9f22bfa2fe 100644 --- a/Content.Server/Spider/SpiderSystem.cs +++ b/Content.Server/Spider/SpiderSystem.cs @@ -4,12 +4,15 @@ using Content.Shared.Maps; using Robust.Server.GameObjects; using Robust.Shared.Map; +using Content.Shared.Nutrition.EntitySystems; +using Content.Shared.Nutrition.Components; namespace Content.Server.Spider; public sealed class SpiderSystem : SharedSpiderSystem { [Dependency] private readonly PopupSystem _popup = default!; + [Dependency] private readonly HungerSystem _hungerSystem = default!; public override void Initialize() { @@ -22,6 +25,13 @@ private void OnSpawnNet(EntityUid uid, SpiderComponent component, SpiderWebActio if (args.Handled) return; + if (TryComp(uid, out var hungerComp) + && _hungerSystem.IsHungerBelowState(uid, HungerThreshold.Okay, hungerComp.CurrentHunger - 5, hungerComp)) + { + _popup.PopupEntity(Loc.GetString("sericulture-failure-hunger"), args.Performer, args.Performer); + return; + } + var transform = Transform(uid); if (transform.GridUid == null) @@ -42,22 +52,10 @@ private void OnSpawnNet(EntityUid uid, SpiderComponent component, SpiderWebActio result = true; } - // Spawn web in other directions - for (var i = 0; i < 4; i++) - { - var direction = (DirectionFlag) (1 << i); - coords = transform.Coordinates.Offset(direction.AsDir().ToVec()); - - if (!IsTileBlockedByWeb(coords)) - { - Spawn(component.WebPrototype, coords); - result = true; - } - } - if (result) { _popup.PopupEntity(Loc.GetString("spider-web-action-success"), args.Performer, args.Performer); + _hungerSystem.ModifyHunger(uid, -5); args.Handled = true; } else @@ -74,4 +72,3 @@ private bool IsTileBlockedByWeb(EntityCoordinates coords) return false; } } - diff --git a/Content.Shared/Cuffs/Components/HandcuffComponent.cs b/Content.Shared/Cuffs/Components/HandcuffComponent.cs index 77a77cf2f84..cd94437637b 100644 --- a/Content.Shared/Cuffs/Components/HandcuffComponent.cs +++ b/Content.Shared/Cuffs/Components/HandcuffComponent.cs @@ -9,6 +9,12 @@ namespace Content.Shared.Cuffs.Components; [Access(typeof(SharedCuffableSystem))] public sealed partial class HandcuffComponent : Component { + /// + /// Whether or not the entity can rot when cuffed (for spooder cocoon) + /// + [DataField, ViewVariables(VVAccess.ReadWrite)] + public bool NoRot = false; + /// /// The time it takes to cuff an entity. /// diff --git a/Resources/Prototypes/Actions/spider.yml b/Resources/Prototypes/Actions/spider.yml index 14b9fb6ccbb..9f42f11b2bf 100644 --- a/Resources/Prototypes/Actions/spider.yml +++ b/Resources/Prototypes/Actions/spider.yml @@ -7,7 +7,7 @@ - type: InstantAction icon: Interface/Actions/web.png event: !type:SpiderWebActionEvent - useDelay: 25 + useDelay: 30 - type: entity id: ActionSericulture diff --git a/Resources/Prototypes/Entities/Mobs/Species/arachnid.yml b/Resources/Prototypes/Entities/Mobs/Species/arachnid.yml index c135ac2b829..77e796dadc9 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/arachnid.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/arachnid.yml @@ -19,6 +19,8 @@ productionLength: 2 entityProduced: MaterialWebSilk1 hungerCost: 4 # Should total to 25 total silk on full hunger + - type: Spider + - type: IgnoreSpiderWeb - type: Tag tags: - CanPilot diff --git a/Resources/Prototypes/Entities/Objects/Misc/handcuffs.yml b/Resources/Prototypes/Entities/Objects/Misc/handcuffs.yml index 5f970da1840..e1e422bbc7d 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/handcuffs.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/handcuffs.yml @@ -157,3 +157,32 @@ - type: Sprite sprite: Clothing/OuterClothing/Misc/straight_jacket.rsi state: icon + +- type: entity + name: web cocoon + description: Strong web cocoon used to restrain criminal or preys, its also prevent rotting. + id: WebCocoon + parent: ClothingOuterStraightjacket + components: + - type: Handcuff + noRot: true + cuffedRSI: Clothing/OuterClothing/Misc/webcocoon.rsi + bodyIconState: body-overlay + breakOnRemove: true + brokenPrototype: MaterialWebSilk1 + startCuffSound: + path: /Audio/Items/Handcuffs/rope_start.ogg + endCuffSound: + path: /Audio/Items/Handcuffs/rope_end.ogg + startUncuffSound: + path: /Audio/Items/Handcuffs/rope_start.ogg + endUncuffSound: + path: /Audio/Items/Handcuffs/rope_breakout.ogg + startBreakoutSound: + path: /Audio/Items/Handcuffs/rope_takeoff.ogg + - type: Construction + graph: WebObjects + node: cocoon + - type: Sprite + sprite: Clothing/OuterClothing/Misc/webcocoon.rsi + state: cocoon diff --git a/Resources/Prototypes/Entities/Objects/Misc/spider_web.yml b/Resources/Prototypes/Entities/Objects/Misc/spider_web.yml index e1f4d086d45..6abd79eea21 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/spider_web.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/spider_web.yml @@ -7,6 +7,9 @@ snap: - Wall components: + - type: Construction + graph: WebStructures + node: spiderweb - type: MeleeSound soundGroups: Brute: diff --git a/Resources/Prototypes/Entities/Structures/Furniture/beds.yml b/Resources/Prototypes/Entities/Structures/Furniture/beds.yml index 7a1c066c189..8cfb2b2ecaa 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/beds.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/beds.yml @@ -179,3 +179,15 @@ MaterialWoodPlank: min: 2 max: 2 + +- type: entity + parent: WebBed + id: WebNest + name: web nest + components: + - type: Sprite + sprite: Structures/Web/nest.rsi + state: icon + - type: Construction + graph: WebStructures + node: nest diff --git a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/gladiator.yml b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/gladiator.yml index 498477eb229..27e3f84e9d7 100644 --- a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/gladiator.yml +++ b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/gladiator.yml @@ -10,10 +10,6 @@ supervisors: job-supervisors-security setPreference: true # whitelistRequired: true - requirements: - - !type:DepartmentTimeRequirement - department: Security - time: 21600 special: - !type:AddComponentSpecial components: diff --git a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/martialartist.yml b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/martialartist.yml index 14c277ff7e5..3cbfb093edd 100644 --- a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/martialartist.yml +++ b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/martialartist.yml @@ -3,9 +3,6 @@ name: job-name-martialartist description: job-description-martialartist playTimeTracker: JobMartialArtist - requirements: - - !type:OverallPlaytimeRequirement - time: 7200 #2 hours startingGear: MartialArtistGear icon: "JobIconMartialArtist" supervisors: job-supervisors-hop diff --git a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/prisoner.yml b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/prisoner.yml index 9df4832a584..8dce5d01fdd 100644 --- a/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/prisoner.yml +++ b/Resources/Prototypes/Nyanotrasen/Roles/Jobs/Wildcards/prisoner.yml @@ -9,11 +9,6 @@ # whitelistRequired: true icon: "JobIconPrisoner" supervisors: job-supervisors-security - requirements: - - !type:DepartmentTimeRequirement - department: Security - time: 21600 - - type: startingGear id: PrisonerGear equipment: diff --git a/Resources/Prototypes/Objectives/objectiveGroups.yml b/Resources/Prototypes/Objectives/objectiveGroups.yml index fba2c4cc172..f00641702a2 100644 --- a/Resources/Prototypes/Objectives/objectiveGroups.yml +++ b/Resources/Prototypes/Objectives/objectiveGroups.yml @@ -80,7 +80,6 @@ TechnologyDiskStealCollectionObjective: 1 #rnd FigurineStealCollectionObjective: 0.3 #service IDCardsStealCollectionObjective: 1 - CannabisStealCollectionObjective: 1 LAMPStealCollectionObjective: 2 #only for moth - type: weightedRandom diff --git a/Resources/Prototypes/Recipes/Construction/Graphs/web.yml b/Resources/Prototypes/Recipes/Construction/Graphs/web.yml index 4eb368f5ab7..1e92fb6d1b8 100644 --- a/Resources/Prototypes/Recipes/Construction/Graphs/web.yml +++ b/Resources/Prototypes/Recipes/Construction/Graphs/web.yml @@ -60,6 +60,14 @@ amount: 8 doAfter: 6 + - to: nest + completed: + - !type:SnapToGrid + southRotation: true + steps: + - material: WebSilk + amount: 6 + doAfter: 3 # Deconstruction is down here - node: wall @@ -133,3 +141,15 @@ steps: - tool: Cutting doAfter: 3 + + - node: nest + entity: WebNest + edges: + - to: start + completed: + - !type:SpawnPrototype + prototype: MaterialWebSilk1 + amount: 5 + steps: + - tool: Cutting + doAfter: 2 diff --git a/Resources/Prototypes/Recipes/Construction/web.yml b/Resources/Prototypes/Recipes/Construction/web.yml index 9a0d832d012..f249cbd5957 100644 --- a/Resources/Prototypes/Recipes/Construction/web.yml +++ b/Resources/Prototypes/Recipes/Construction/web.yml @@ -117,3 +117,21 @@ - SpiderCraft conditions: - !type:TileNotBlocked + +- type: construction + name: web nest + id: WebNest + graph: WebStructures + startNode: start + targetNode: nest + category: construction-category-furniture + description: Fun fact, you eating spiders in your sleep is false. + icon: + sprite: Structures/Web/nest.rsi + state: icon + objectType: Structure + placementMode: SnapgridCenter + canRotate: false + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked diff --git a/Resources/Prototypes/Recipes/Crafting/Graphs/web.yml b/Resources/Prototypes/Recipes/Crafting/Graphs/web.yml index 7c17cbc0806..ed257e546be 100644 --- a/Resources/Prototypes/Recipes/Crafting/Graphs/web.yml +++ b/Resources/Prototypes/Recipes/Crafting/Graphs/web.yml @@ -41,13 +41,20 @@ - material: WebSilk amount: 12 doAfter: 6 - + - to: boots steps: - material: WebSilk amount: 2 doAfter: 4 - + + - to: cocoon + steps: + - material: WebSilk + amount: 8 + doAfter: 6 + + # Deconstruction - node: tile entity: FloorTileItemWeb @@ -69,3 +76,6 @@ - node: boots entity: ClothingShoesBootsWinterWeb + + - node: cocoon + entity: WebCocoon diff --git a/Resources/Prototypes/Recipes/Crafting/web.yml b/Resources/Prototypes/Recipes/Crafting/web.yml index 5fe9d1b85a3..66cbf7030d2 100644 --- a/Resources/Prototypes/Recipes/Crafting/web.yml +++ b/Resources/Prototypes/Recipes/Crafting/web.yml @@ -109,3 +109,16 @@ sprite: Clothing/Shoes/Boots/winterbootsweb.rsi state: icon objectType: Item + +- type: construction + name: web cocoon + id: WebCocoon + graph: WebObjects + startNode: start + targetNode: cocoon + category: construction-category-clothing + description: "Strong web cocoon used to restrain criminal or preys, its also prevent rotting." + icon: + sprite: Clothing/OuterClothing/Misc/webcocoon.rsi + state: cocoon + objectType: Item diff --git a/Resources/Textures/Clothing/OuterClothing/Misc/webcocoon.rsi/body-overlay-2.png b/Resources/Textures/Clothing/OuterClothing/Misc/webcocoon.rsi/body-overlay-2.png new file mode 100644 index 00000000000..dc9448e2fcb Binary files /dev/null and b/Resources/Textures/Clothing/OuterClothing/Misc/webcocoon.rsi/body-overlay-2.png differ diff --git a/Resources/Textures/Clothing/OuterClothing/Misc/webcocoon.rsi/cocoon.png b/Resources/Textures/Clothing/OuterClothing/Misc/webcocoon.rsi/cocoon.png new file mode 100644 index 00000000000..4d4b07d7a92 Binary files /dev/null and b/Resources/Textures/Clothing/OuterClothing/Misc/webcocoon.rsi/cocoon.png differ diff --git a/Resources/Textures/Clothing/OuterClothing/Misc/webcocoon.rsi/meta.json b/Resources/Textures/Clothing/OuterClothing/Misc/webcocoon.rsi/meta.json new file mode 100644 index 00000000000..101fefc436a --- /dev/null +++ b/Resources/Textures/Clothing/OuterClothing/Misc/webcocoon.rsi/meta.json @@ -0,0 +1,18 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Made by Heroman3003", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "cocoon" + }, + { + "name": "body-overlay-2", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Structures/Web/nest.rsi/icon.png b/Resources/Textures/Structures/Web/nest.rsi/icon.png new file mode 100644 index 00000000000..378e6af55b2 Binary files /dev/null and b/Resources/Textures/Structures/Web/nest.rsi/icon.png differ diff --git a/Resources/Textures/Structures/Web/nest.rsi/meta.json b/Resources/Textures/Structures/Web/nest.rsi/meta.json new file mode 100644 index 00000000000..5cde3e94233 --- /dev/null +++ b/Resources/Textures/Structures/Web/nest.rsi/meta.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Made by Heroman3003", + "states": [ + { + "name": "icon" + } + ] +}