From 377dfe49a7ad2a2c65cf5edfd8c0312e12f884f1 Mon Sep 17 00:00:00 2001 From: BlueHNT <79374236+BlueHNT@users.noreply.github.com> Date: Tue, 7 Jan 2025 15:58:43 +0100 Subject: [PATCH 01/41] adds Cohiba Robusto cigars --- .../Catalog/Fills/Lockers/heads.yml | 2 +- .../Consumable/Smokeables/Cigars/case.yml | 41 +++++++++++++ .../Consumable/Smokeables/Cigars/cigar.yml | 57 +++++++++++++++++- .../Loadouts/Jobs/Security/headOfSecurity.yml | 15 +++++ .../Cigars/case_robust.rsi/cigar1.png | Bin 0 -> 184 bytes .../Cigars/case_robust.rsi/cigar2.png | Bin 0 -> 183 bytes .../Cigars/case_robust.rsi/cigar3.png | Bin 0 -> 184 bytes .../Cigars/case_robust.rsi/cigar4.png | Bin 0 -> 184 bytes .../Cigars/case_robust.rsi/cigar5.png | Bin 0 -> 183 bytes .../Cigars/case_robust.rsi/closed.png | Bin 0 -> 374 bytes .../Cigars/case_robust.rsi/inhand-left.png | Bin 0 -> 283 bytes .../Cigars/case_robust.rsi/inhand-right.png | Bin 0 -> 295 bytes .../Cigars/case_robust.rsi/meta.json | 40 ++++++++++++ .../Cigars/case_robust.rsi/open.png | Bin 0 -> 386 bytes 14 files changed, 152 insertions(+), 3 deletions(-) create mode 100644 Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar1.png create mode 100644 Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar2.png create mode 100644 Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar3.png create mode 100644 Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar4.png create mode 100644 Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar5.png create mode 100644 Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/closed.png create mode 100644 Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/inhand-left.png create mode 100644 Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/inhand-right.png create mode 100644 Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/meta.json create mode 100644 Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/open.png diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml index e7f4439873..7ad3b64590 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/heads.yml @@ -275,7 +275,7 @@ - id: ClothingHeadsetAltSecurity - id: ClothingEyesGlassesSunglasses - id: ClothingShoesBootsJack - - id: CigarGoldCase + - id: CigarRobustCase prob: 0.50 - id: DoorRemoteSecurity - id: RubberStampHos diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml index 2cfc429f62..a857714ff2 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml @@ -72,3 +72,44 @@ contents: - id: CigarGold amount: 8 + +- type: entity + id: CigarRobustCase + parent: CigarCase + name: Cohiba Robusto cigar case + description: "A case of imported Cohiba cigars, renowned for their strong flavor." + components: + - type: Sprite + sprite: Objects/Consumable/Smokeables/Cigars/case_robust.rsi + layers: + - state: closed + - state: open + map: ["openLayer"] + - state: cigar1 + map: ["cigar1"] + visible: false + - state: cigar2 + map: ["cigar2"] + visible: false + - state: cigar3 + map: ["cigar3"] + visible: false + - state: cigar4 + map: ["cigar4"] + visible: false + - state: cigar5 + map: ["cigar5"] + visible: false + - type: Storage + grid: + - 0,1,4,1 + - type: Item + sprite: Objects/Consumable/Smokeables/Cigars/case_robust.rsi + size: Normal + shape: + - 0,0,2,1 + storedRotation: 90 + - type: StorageFill + contents: + - id: CigarRobust + amount: 5 \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml index dc8d4eaf3c..a0e4428aea 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/cigar.yml @@ -14,6 +14,13 @@ tags: - Cigar - Trash + - type: SolutionContainerManager + solutions: + smokable: + maxVol: 50 + reagents: + - ReagentId: Nicotine + Quantity: 25 - type: Clothing sprite: Objects/Consumable/Smokeables/Cigars/cigar.rsi slots: [ mask ] @@ -33,7 +40,7 @@ - type: SolutionContainerManager solutions: smokable: - maxVol: 20 + maxVol: 50 - type: Tag tags: - Cigar @@ -55,6 +62,15 @@ equippedPrefix: unlit - type: Item size: Tiny + - type: SolutionContainerManager + solutions: + smokable: + maxVol: 50 + reagents: + - ReagentId: Nicotine + Quantity: 25 + - ReagentId: Gold + Quantity: 5 - type: entity id: CigarGoldSpent @@ -68,4 +84,41 @@ - type: SolutionContainerManager solutions: smokable: - maxVol: 20 + maxVol: 50 + +- type: entity + id: CigarRobust + parent: Cigar + name: Cohiba Robusto cigar + description: There's little more you could want from a cigar. + components: + - type: Sprite + sprite: Objects/Consumable/Smokeables/Cigars/cigar-gold.rsi + state: unlit-icon + - type: Clothing + sprite: Objects/Consumable/Smokeables/Cigars/cigar-gold.rsi + slots: [ mask ] + equippedPrefix: unlit + - type: Item + size: Tiny + - type: SolutionContainerManager + solutions: + smokable: + maxVol: 50 + reagents: + - ReagentId: Nicotine + Quantity: 40 # infinite cancer works + +- type: entity + id: CigarRobustSpent + parent: CigarRobust + suffix: spent + components: + - type: Sprite + state: burnt-icon + - type: Smokable + state: Burnt + - type: SolutionContainerManager + solutions: + smokable: + maxVol: 50 \ No newline at end of file diff --git a/Resources/Prototypes/Loadouts/Jobs/Security/headOfSecurity.yml b/Resources/Prototypes/Loadouts/Jobs/Security/headOfSecurity.yml index 7954e5d444..9e48af0819 100644 --- a/Resources/Prototypes/Loadouts/Jobs/Security/headOfSecurity.yml +++ b/Resources/Prototypes/Loadouts/Jobs/Security/headOfSecurity.yml @@ -9,6 +9,7 @@ # Head of Security Weapon Selection # Most of these mirror the unique weapons that were previously map-specific items placed in the HoS Office. # Or are weapons that fit a similar theme of "Rare weapons not normally seen by Security" + - type: loadout id: LoadoutCommandHoSPulsePistol category: JobsSecurityHeadOfSecurity @@ -369,3 +370,17 @@ - HeadOfSecurity items: - ClothingUniformJumpskirtHosFormal + +# Trinkets +- type: loadout + id: LoadoutHoSCigarCase + category: JobsSecurityHeadOfSecurity + cost: 0 + requirements: + - !type:CharacterItemGroupRequirement + group: LoadoutHeadOfSecurityTrinkets + - !type:CharacterJobRequirement + jobs: + - HeadOfSecurity + items: + - CigarRobustCase \ No newline at end of file diff --git a/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar1.png b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar1.png new file mode 100644 index 0000000000000000000000000000000000000000..5789320b765bdd4301d1a44dc5c4c066c9bc253c GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}MV>B>ArY;~ z2@%ZK%8T~}_itnUv%m5tP^RU; z`dr5U_4il*`=2w(;ID4J=Z2sEi)tSoh~Vok4r-p;88yw=z`!8q&Y!M_7oMv3TrnsH dn_k4g5INPL;%oBhi9p*KJYD@<);T3K0RR*POg;br literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar2.png b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar2.png new file mode 100644 index 0000000000000000000000000000000000000000..3ae29508b12e8bddf4a9af5ad0fe681cac6015e5 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}g`O^sArY;~ z2@l;)wEStjtw4A}y)z4*}Q$iB}J7-8f literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar3.png b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar3.png new file mode 100644 index 0000000000000000000000000000000000000000..6625e8829f0b8afb2309ade872ac45a72aa99f79 GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}MV>B>ArY;~ z2@5 d09(Pp@Z_XH#dVk6i-EQ?c)I$ztaD0e0sxy!O6LFo literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar4.png b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar4.png new file mode 100644 index 0000000000000000000000000000000000000000..9ef8f13db26b3cf56664eaae12ccea6c322748a2 GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}MV>B>ArY;~ z2@%ZK%8T~}_itnUv%m5tP^RU; z`dr5U_4il*`=2w(;ID4J=Z2sEi)tSoh~Vokj$*MEHk@W`U|^7Q=TFze3s2R1u9O|n c09(PppjBj0;W_z>JkWLqPgg&ebxsLQ0IG~hWdHyG literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar5.png b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/cigar5.png new file mode 100644 index 0000000000000000000000000000000000000000..012617b99c1053418f43dc6d3f60b7ac0fa580ac GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdz#^NA%Cx&(BWL^R}g`O^sArY;~ z2@z$UAkdQFTt2?@O1TaS?83{1OV~-M??Ss literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/closed.png b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/closed.png new file mode 100644 index 0000000000000000000000000000000000000000..77c3c27dcce1ff7c82345a3fa3894ec87128d26c GIT binary patch literal 374 zcmV-+0g3*JP)Px$FiAu~R9J=WlQB!fKp2K!OCX45C{)B7BsgTR6oiO-x;UNxp__lBtG^>#7oA(` z=nrtn;GhHx4u^z7=;t5_#=F|PSm^RS%SZ0J@V8m( z=Ef;7&8sc0fzu4AqQvRZ0RX`FI#`w~_?~%Ke)g8-3ILqbu5J7)u{Jo58pG_GFPC7k UqIC}>Z~y=R07*qoM6N<$g3ht2MF0Q* literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/inhand-left.png b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/inhand-left.png new file mode 100644 index 0000000000000000000000000000000000000000..805da9bb87bcb511d22e4b276c8ddf8e25f4aee6 GIT binary patch literal 283 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=k33x*Ln`LHy=BPPdc z=CO4f>gx}0-xlY%^0dG6OqKe_f`o1@P&HioY)?`Xa?>-cA)rmt-TF}WLbZbcXfzasmbx#-X;G8$}WW{v^Pv?o(Zx1}L5`AP+C3Q+A_@!&d;?JSe`om)7 c7#PlcV_>eRRDSNbVJ*lEPgg&ebxsLQ0CS>wG5`Po literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/inhand-right.png b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/inhand-right.png new file mode 100644 index 0000000000000000000000000000000000000000..a7b46b6b93bcf4b1844da88ecbaf16edc2193675 GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=?>t=`Ln`LHy=BOC$Ux-S$K?;w z7K#h#KVaQ6ad!C1*?eh)TO+64ytyU*xAuZn*Cd4XmTND3*Dk&@ zu5m$ox!27tEE}J&KrCcn5d1jvkXhIp)tayM2R6^}{-F1u@X4Eb;zt!zmQ@u8Cz&_( pB}U22(O!5p_(qt#90P;NA=b|aYm^h%Uul4h@O1TaS?83{1OOWSd|?0p literal 0 HcmV?d00001 diff --git a/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/meta.json b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/meta.json new file mode 100644 index 0000000000..f39b281ebf --- /dev/null +++ b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/meta.json @@ -0,0 +1,40 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from NSV13 https://github.com/BeeStation/NSV13", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "cigar1" + }, + { + "name": "cigar2" + }, + { + "name": "cigar3" + }, + { + "name": "cigar4" + }, + { + "name": "cigar5" + }, + { + "name": "open" + }, + { + "name": "closed" + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/open.png b/Resources/Textures/Objects/Consumable/Smokeables/Cigars/case_robust.rsi/open.png new file mode 100644 index 0000000000000000000000000000000000000000..2a2b836e450bd859f67224efbad10d7edd3ff87f GIT binary patch literal 386 zcmV-|0e$|7P)Px$JV``BR9J=Wl|gI5Fc^kkB^c{gXpw>SFi*Pw|5Lnf?6SkUv4cXHp%Uy)(Tsh` zmqbvNNs?|FIqRe^zl|IUc}!e*Iwsly*%8+N|nZCZ zl;6qzDeMS?1mI z`$L*UOtG48$;S{Bz?KU!jSjGyZ&BV#GC` Date: Tue, 7 Jan 2025 18:22:52 +0100 Subject: [PATCH 02/41] yaml unstinked --- Resources/Locale/en-US/loadouts/itemgroups.ftl | 1 + .../CharacterItemGroups/Jobs/Security/headOfSecurity.yml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/Resources/Locale/en-US/loadouts/itemgroups.ftl b/Resources/Locale/en-US/loadouts/itemgroups.ftl index 8af87679c4..a81d8b00eb 100644 --- a/Resources/Locale/en-US/loadouts/itemgroups.ftl +++ b/Resources/Locale/en-US/loadouts/itemgroups.ftl @@ -578,6 +578,7 @@ character-item-group-LoadoutHeadOfSecurityMask = Head Of Security Masks character-item-group-LoadoutHeadOfSecurityOuter = Head Of Security Outerwear character-item-group-LoadoutHeadOfSecurityShoes = Head Of Security Shoes character-item-group-LoadoutHeadOfSecurityUniforms = Head Of Security Uniforms +character-item-group-LoadoutHeadOfSecurityTrinkets = Head Of Security Trinkets # Security - Security Officer character-item-group-LoadoutSecurityOfficerBackpacks = Security Officer Backpacks diff --git a/Resources/Prototypes/CharacterItemGroups/Jobs/Security/headOfSecurity.yml b/Resources/Prototypes/CharacterItemGroups/Jobs/Security/headOfSecurity.yml index 9ccc5232e4..cc28e92ba6 100644 --- a/Resources/Prototypes/CharacterItemGroups/Jobs/Security/headOfSecurity.yml +++ b/Resources/Prototypes/CharacterItemGroups/Jobs/Security/headOfSecurity.yml @@ -118,3 +118,11 @@ id: LoadoutCommandHOSJumpskirtParade - type: loadout id: LoadoutCommandHOSJumpskirtFormal + +- type: characterItemGroup + id: LoadoutHeadOfSecurityTrinkets + maxItems: 2 + items: + - type: loadout + id: LoadoutHoSCigarCase + # TBD From ef9785d2c95ecd645d69653bf3e75a7f7c1debd5 Mon Sep 17 00:00:00 2001 From: BlueHNT <79374236+BlueHNT@users.noreply.github.com> Date: Thu, 9 Jan 2025 20:09:14 +0100 Subject: [PATCH 03/41] Oh, I am may be are stu-huh? (fixes cigar6-8) --- .../Objects/Consumable/Smokeables/Cigars/case.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml index a857714ff2..854175dcb9 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigars/case.yml @@ -112,4 +112,14 @@ - type: StorageFill contents: - id: CigarRobust - amount: 5 \ No newline at end of file + amount: 5 + - type: ItemCounter + count: + tags: [Cigar] + composite: true + layerStates: + - cigar1 + - cigar2 + - cigar3 + - cigar4 + - cigar5 \ No newline at end of file From 3a6de6ca83649efe5d46e9c6ab880d747c2e1a0a Mon Sep 17 00:00:00 2001 From: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> Date: Fri, 17 Jan 2025 23:23:14 -0400 Subject: [PATCH 04/41] Fix Sophia Sending a Massive Float to Chat (#1581) ![image](https://github.com/user-attachments/assets/b53f8a0a-422b-47f8-acda-01d830dc8aaa) # Changelog :cl: - fix: Fixed full glimmer float being displayed to chat by Sophia. --- .../Research/SophicScribe/SophicScribeSystem.cs | 6 +++--- Content.Shared/Psionics/Glimmer/GlimmerSystem.cs | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Content.Server/Nyanotrasen/Research/SophicScribe/SophicScribeSystem.cs b/Content.Server/Nyanotrasen/Research/SophicScribe/SophicScribeSystem.cs index e468c838aa..b13febea0f 100644 --- a/Content.Server/Nyanotrasen/Research/SophicScribe/SophicScribeSystem.cs +++ b/Content.Server/Nyanotrasen/Research/SophicScribe/SophicScribeSystem.cs @@ -38,7 +38,7 @@ public override void Update(float frameTime) if (!TryComp(scribe, out var radio)) continue; - var message = Loc.GetString("glimmer-report", ("level", _glimmerSystem.GlimmerOutput)); + var message = Loc.GetString("glimmer-report", ("level", _glimmerSystem.GlimmerOutputString)); var channel = _prototypeManager.Index("Science"); _radioSystem.SendRadioMessage(scribe, message, channel, scribe); @@ -62,7 +62,7 @@ private void OnInteractHand(EntityUid uid, SophicScribeComponent component, Inte component.StateTime = _timing.CurTime + component.StateCD; - _chat.TrySendInGameICMessage(uid, Loc.GetString("glimmer-report", ("level", _glimmerSystem.GlimmerOutput)), InGameICChatType.Speak, true); + _chat.TrySendInGameICMessage(uid, Loc.GetString("glimmer-report", ("level", _glimmerSystem.GlimmerOutputString)), InGameICChatType.Speak, true); } private void OnGlimmerEventEnded(GlimmerEventEndedEvent args) @@ -79,7 +79,7 @@ private void OnGlimmerEventEnded(GlimmerEventEndedEvent args) speaker = swapped.OriginalEntity; } - var message = Loc.GetString(args.Message, ("decrease", args.GlimmerBurned), ("level", _glimmerSystem.GlimmerOutput)); + var message = Loc.GetString(args.Message, ("decrease", args.GlimmerBurned), ("level", _glimmerSystem.GlimmerOutputString)); var channel = _prototypeManager.Index("Common"); _radioSystem.SendRadioMessage(speaker, message, channel, speaker); } diff --git a/Content.Shared/Psionics/Glimmer/GlimmerSystem.cs b/Content.Shared/Psionics/Glimmer/GlimmerSystem.cs index 32d6502707..df7be34cc1 100644 --- a/Content.Shared/Psionics/Glimmer/GlimmerSystem.cs +++ b/Content.Shared/Psionics/Glimmer/GlimmerSystem.cs @@ -5,6 +5,7 @@ namespace Content.Shared.Psionics.Glimmer; + /// /// This handles setting / reading the value of glimmer. /// @@ -13,6 +14,7 @@ public sealed class GlimmerSystem : EntitySystem [Dependency] private readonly IConfigurationManager _cfg = default!; private float _glimmerInput = 0; + /// /// GlimmerInput represents the system-facing value of the station's glimmer, and is given by f(y) for this graph: https://www.desmos.com/calculator/posutiq38e /// Where x = GlimmerOutput and y = GlimmerInput @@ -25,6 +27,13 @@ public float GlimmerInput get { return _glimmerInput; } private set { _glimmerInput = _enabled ? Math.Max(value, 0) : 0; } } + + /// + /// This returns a string that returns a more display-friendly glimmer input. + /// For example, 502.03837847 will become 502.03. + /// + public string GlimmerInputString => _glimmerInput.ToString("#.##"); + private float _glimmerOutput = 0; /// @@ -45,6 +54,13 @@ public float GlimmerOutput get { return _glimmerOutput; } private set { _glimmerOutput = _enabled ? Math.Clamp(value, 0, 999.999f) : 0; } } + + /// + /// This returns a string that returns a more display-friendly glimmer output. + /// For example, 502.03837847 will become 502.03. + /// + public string GlimmerOutputString => _glimmerOutput.ToString("#.##"); + private bool _enabled; public override void Initialize() { From 2ca3ef0add108037780490bb4be60232725b692d Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Sat, 18 Jan 2025 03:23:40 +0000 Subject: [PATCH 05/41] Automatic Changelog Update (#1581) --- Resources/Changelog/Changelog.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 3631d7e8cf..1d6d7f0479 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -10251,3 +10251,10 @@ Entries: id: 6719 time: '2025-01-17T15:53:24.0000000+00:00' url: https://github.com/Simple-Station/Einstein-Engines/pull/1578 +- author: sleepyyapril + changes: + - type: Fix + message: Fixed full glimmer float being displayed to chat by Sophia. + id: 6720 + time: '2025-01-18T03:23:15.0000000+00:00' + url: https://github.com/Simple-Station/Einstein-Engines/pull/1581 From 2ce71b44baa2a8856f851d6953577cab1300dd08 Mon Sep 17 00:00:00 2001 From: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> Date: Sat, 18 Jan 2025 00:10:49 -0400 Subject: [PATCH 06/41] Make Room for Longer Chem Names. (#1582) # Description Fixed not having enough space for longer chemicals on the ChemMaster UI. --- # Changelog :cl: - fix: Fixed not having enough space for longer chemicals on the ChemMaster UI. --- Content.Client/Chemistry/UI/ChemMasterWindow.xaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml index 61bbba3c35..72417ac98b 100644 --- a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml +++ b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml @@ -2,7 +2,7 @@ xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" - MinSize="620 770" + MinSize="770 770" Title="{Loc 'chem-master-bound-user-interface-title'}"> From 2bf0c000bc62277d4a7a580ee0fe5615d3579ec4 Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Sat, 18 Jan 2025 04:11:17 +0000 Subject: [PATCH 07/41] Automatic Changelog Update (#1582) --- Resources/Changelog/Changelog.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 1d6d7f0479..cc184b4067 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -10258,3 +10258,10 @@ Entries: id: 6720 time: '2025-01-18T03:23:15.0000000+00:00' url: https://github.com/Simple-Station/Einstein-Engines/pull/1581 +- author: sleepyyapril + changes: + - type: Fix + message: Fixed not having enough space for longer chemicals on the ChemMaster UI. + id: 6721 + time: '2025-01-18T04:10:50.0000000+00:00' + url: https://github.com/Simple-Station/Einstein-Engines/pull/1582 From d326d4c711bf7a675720a9698a9989374b384aa9 Mon Sep 17 00:00:00 2001 From: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> Date: Sat, 18 Jan 2025 00:35:31 -0400 Subject: [PATCH 08/41] IPCs Can Cryo Again (#1583) # Description My bad --- # Changelog :cl: - fix: Fixed IPCs being unable to cryo. --- Resources/Prototypes/Entities/Mobs/Player/silicon_base.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon_base.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon_base.yml index 7cdc46f350..9747f2436c 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon_base.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon_base.yml @@ -30,6 +30,7 @@ baseWalkSpeed: 4 baseSprintSpeed: 3 - type: ZombieImmune + - type: CanEnterCryostorage - type: DoAfter - type: RotationVisuals horizontalRotation: 90 From 18dfce33ddeb9e45267cb035ac4402fb8d6c3cd7 Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Sat, 18 Jan 2025 04:35:58 +0000 Subject: [PATCH 09/41] Automatic Changelog Update (#1583) --- Resources/Changelog/Changelog.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index cc184b4067..7609a09911 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -10265,3 +10265,10 @@ Entries: id: 6721 time: '2025-01-18T04:10:50.0000000+00:00' url: https://github.com/Simple-Station/Einstein-Engines/pull/1582 +- author: sleepyyapril + changes: + - type: Fix + message: Fixed IPCs being unable to cryo. + id: 6722 + time: '2025-01-18T04:35:32.0000000+00:00' + url: https://github.com/Simple-Station/Einstein-Engines/pull/1583 From 357f8378c09ccb9f172fc720fd61deb25bc168ea Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sat, 18 Jan 2025 13:16:33 -0500 Subject: [PATCH 10/41] Split All CVars Into Separate Files (#1587) # Description This PR splits all the CVars into separate files. Unfortunately I need to hella clean this up by restoring all the CVars that are different on EE, because cherrypicking it reset everything to Wizden's Defaults (Including CVars that no longer exist on EE, and removing CVars from systems I codeown now, such as Atmos, Guns, and Melee). # Changelog No changelog because this isn't player facing. :) --------- Co-authored-by: Simon <63975668+Simyon264@users.noreply.github.com> --- Content.Shared/CCVar/CCVars.Accessibility.cs | 47 + Content.Shared/CCVar/CCVars.Admin.Ahelp.cs | 79 + Content.Shared/CCVar/CCVars.Admin.Logs.cs | 42 + Content.Shared/CCVar/CCVars.Admin.Rules.cs | 18 + Content.Shared/CCVar/CCVars.Admin.cs | 172 + Content.Shared/CCVar/CCVars.Announcer.cs | 37 + Content.Shared/CCVar/CCVars.Atmos.cs | 188 + Content.Shared/CCVar/CCVars.Audio.cs | 60 + Content.Shared/CCVar/CCVars.AutoVote.cs | 20 + Content.Shared/CCVar/CCVars.CPR.cs | 54 + Content.Shared/CCVar/CCVars.Chat.Looc.cs | 26 + Content.Shared/CCVar/CCVars.Chat.Ooc.cs | 27 + Content.Shared/CCVar/CCVars.Chat.cs | 71 + Content.Shared/CCVar/CCVars.Cloning.cs | 60 + Content.Shared/CCVar/CCVars.Config.cs | 35 + Content.Shared/CCVar/CCVars.Console.cs | 15 + Content.Shared/CCVar/CCVars.Contests.cs | 57 + Content.Shared/CCVar/CCVars.Crewmanifest.cs | 24 + Content.Shared/CCVar/CCVars.Database.cs | 76 + Content.Shared/CCVar/CCVars.Discord.cs | 72 + Content.Shared/CCVar/CCVars.Events.cs | 26 + Content.Shared/CCVar/CCVars.Explosion.cs | 108 + Content.Shared/CCVar/CCVars.FOV.cs | 19 + Content.Shared/CCVar/CCVars.Game.Infolinks.cs | 54 + Content.Shared/CCVar/CCVars.Game.cs | 396 +++ Content.Shared/CCVar/CCVars.Ghost.cs | 24 + Content.Shared/CCVar/CCVars.GhostRespawn.cs | 15 + Content.Shared/CCVar/CCVars.HeightSliders.cs | 27 + Content.Shared/CCVar/CCVars.Hud.cs | 27 + Content.Shared/CCVar/CCVars.Ic.cs | 48 + Content.Shared/CCVar/CCVars.Interactions.cs | 60 + Content.Shared/CCVar/CCVars.Interface.cs | 27 + Content.Shared/CCVar/CCVars.Jetpack.cs | 18 + Content.Shared/CCVar/CCVars.LayingDown.cs | 18 + Content.Shared/CCVar/CCVars.Mapping.cs | 24 + .../CCVar/CCVars.MaterialReclaimer.cs | 12 + Content.Shared/CCVar/CCVars.MaterialSilo.cs | 12 + Content.Shared/CCVar/CCVars.Midi.cs | 18 + Content.Shared/CCVar/CCVars.Misc.cs | 103 + Content.Shared/CCVar/CCVars.Mood.cs | 26 + Content.Shared/CCVar/CCVars.NPC.cs | 16 + Content.Shared/CCVar/CCVars.Net.cs | 15 + Content.Shared/CCVar/CCVars.Parallax.cs | 15 + Content.Shared/CCVar/CCVars.Physics.cs | 27 + Content.Shared/CCVar/CCVars.Psionics.cs | 40 + Content.Shared/CCVar/CCVars.Queue.cs | 13 + Content.Shared/CCVar/CCVars.Radiation.cs | 32 + Content.Shared/CCVar/CCVars.Replays.cs | 43 + Content.Shared/CCVar/CCVars.Salvage.cs | 18 + Content.Shared/CCVar/CCVars.Server.cs | 43 + Content.Shared/CCVar/CCVars.Shuttle.cs | 189 + Content.Shared/CCVar/CCVars.SoftCrit.cs | 25 + Content.Shared/CCVar/CCVars.Sounds.cs | 30 + Content.Shared/CCVar/CCVars.StationGoals.cs | 18 + Content.Shared/CCVar/CCVars.Status.cs | 13 + Content.Shared/CCVar/CCVars.Supermatter.cs | 52 + Content.Shared/CCVar/CCVars.Surgery.cs | 9 + Content.Shared/CCVar/CCVars.Tips.cs | 40 + Content.Shared/CCVar/CCVars.Viewport.cs | 33 + Content.Shared/CCVar/CCVars.Vote.cs | 180 + Content.Shared/CCVar/CCVars.Whitelist.cs | 19 + Content.Shared/CCVar/CCVars.Worldgen.cs | 18 + Content.Shared/CCVar/CCVars.cs | 3109 +---------------- 63 files changed, 3153 insertions(+), 3086 deletions(-) create mode 100644 Content.Shared/CCVar/CCVars.Accessibility.cs create mode 100644 Content.Shared/CCVar/CCVars.Admin.Ahelp.cs create mode 100644 Content.Shared/CCVar/CCVars.Admin.Logs.cs create mode 100644 Content.Shared/CCVar/CCVars.Admin.Rules.cs create mode 100644 Content.Shared/CCVar/CCVars.Admin.cs create mode 100644 Content.Shared/CCVar/CCVars.Announcer.cs create mode 100644 Content.Shared/CCVar/CCVars.Atmos.cs create mode 100644 Content.Shared/CCVar/CCVars.Audio.cs create mode 100644 Content.Shared/CCVar/CCVars.AutoVote.cs create mode 100644 Content.Shared/CCVar/CCVars.CPR.cs create mode 100644 Content.Shared/CCVar/CCVars.Chat.Looc.cs create mode 100644 Content.Shared/CCVar/CCVars.Chat.Ooc.cs create mode 100644 Content.Shared/CCVar/CCVars.Chat.cs create mode 100644 Content.Shared/CCVar/CCVars.Cloning.cs create mode 100644 Content.Shared/CCVar/CCVars.Config.cs create mode 100644 Content.Shared/CCVar/CCVars.Console.cs create mode 100644 Content.Shared/CCVar/CCVars.Contests.cs create mode 100644 Content.Shared/CCVar/CCVars.Crewmanifest.cs create mode 100644 Content.Shared/CCVar/CCVars.Database.cs create mode 100644 Content.Shared/CCVar/CCVars.Discord.cs create mode 100644 Content.Shared/CCVar/CCVars.Events.cs create mode 100644 Content.Shared/CCVar/CCVars.Explosion.cs create mode 100644 Content.Shared/CCVar/CCVars.FOV.cs create mode 100644 Content.Shared/CCVar/CCVars.Game.Infolinks.cs create mode 100644 Content.Shared/CCVar/CCVars.Game.cs create mode 100644 Content.Shared/CCVar/CCVars.Ghost.cs create mode 100644 Content.Shared/CCVar/CCVars.GhostRespawn.cs create mode 100644 Content.Shared/CCVar/CCVars.HeightSliders.cs create mode 100644 Content.Shared/CCVar/CCVars.Hud.cs create mode 100644 Content.Shared/CCVar/CCVars.Ic.cs create mode 100644 Content.Shared/CCVar/CCVars.Interactions.cs create mode 100644 Content.Shared/CCVar/CCVars.Interface.cs create mode 100644 Content.Shared/CCVar/CCVars.Jetpack.cs create mode 100644 Content.Shared/CCVar/CCVars.LayingDown.cs create mode 100644 Content.Shared/CCVar/CCVars.Mapping.cs create mode 100644 Content.Shared/CCVar/CCVars.MaterialReclaimer.cs create mode 100644 Content.Shared/CCVar/CCVars.MaterialSilo.cs create mode 100644 Content.Shared/CCVar/CCVars.Midi.cs create mode 100644 Content.Shared/CCVar/CCVars.Misc.cs create mode 100644 Content.Shared/CCVar/CCVars.Mood.cs create mode 100644 Content.Shared/CCVar/CCVars.NPC.cs create mode 100644 Content.Shared/CCVar/CCVars.Net.cs create mode 100644 Content.Shared/CCVar/CCVars.Parallax.cs create mode 100644 Content.Shared/CCVar/CCVars.Physics.cs create mode 100644 Content.Shared/CCVar/CCVars.Psionics.cs create mode 100644 Content.Shared/CCVar/CCVars.Queue.cs create mode 100644 Content.Shared/CCVar/CCVars.Radiation.cs create mode 100644 Content.Shared/CCVar/CCVars.Replays.cs create mode 100644 Content.Shared/CCVar/CCVars.Salvage.cs create mode 100644 Content.Shared/CCVar/CCVars.Server.cs create mode 100644 Content.Shared/CCVar/CCVars.Shuttle.cs create mode 100644 Content.Shared/CCVar/CCVars.SoftCrit.cs create mode 100644 Content.Shared/CCVar/CCVars.Sounds.cs create mode 100644 Content.Shared/CCVar/CCVars.StationGoals.cs create mode 100644 Content.Shared/CCVar/CCVars.Status.cs create mode 100644 Content.Shared/CCVar/CCVars.Supermatter.cs create mode 100644 Content.Shared/CCVar/CCVars.Surgery.cs create mode 100644 Content.Shared/CCVar/CCVars.Tips.cs create mode 100644 Content.Shared/CCVar/CCVars.Viewport.cs create mode 100644 Content.Shared/CCVar/CCVars.Vote.cs create mode 100644 Content.Shared/CCVar/CCVars.Whitelist.cs create mode 100644 Content.Shared/CCVar/CCVars.Worldgen.cs diff --git a/Content.Shared/CCVar/CCVars.Accessibility.cs b/Content.Shared/CCVar/CCVars.Accessibility.cs new file mode 100644 index 0000000000..9a08af59bd --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Accessibility.cs @@ -0,0 +1,47 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Chat window opacity slider, controlling the alpha of the chat window background. + /// Goes from to 0 (completely transparent) to 1 (completely opaque) + /// + public static readonly CVarDef ChatWindowOpacity = + CVarDef.Create("accessibility.chat_window_transparency", 0.85f, CVar.CLIENTONLY | CVar.ARCHIVE); + + /// + /// Toggle for visual effects that may potentially cause motion sickness. + /// Where reasonable, effects affected by this CVar should use an alternate effect. + /// Please do not use this CVar as a bandaid for effects that could otherwise be made accessible without issue. + /// + public static readonly CVarDef ReducedMotion = + CVarDef.Create("accessibility.reduced_motion", false, CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef ChatEnableColorName = + CVarDef.Create("accessibility.enable_color_name", + true, + CVar.CLIENTONLY | CVar.ARCHIVE, + "Toggles displaying names with individual colors."); + + /// + /// Screen shake intensity slider, controlling the intensity of the CameraRecoilSystem. + /// Goes from 0 (no recoil at all) to 1 (regular amounts of recoil) + /// + public static readonly CVarDef ScreenShakeIntensity = + CVarDef.Create("accessibility.screen_shake_intensity", 1f, CVar.CLIENTONLY | CVar.ARCHIVE); + + /// + /// A generic toggle for various visual effects that are color sensitive. + /// As of 2/16/24, only applies to progress bar colors. + /// + public static readonly CVarDef AccessibilityColorblindFriendly = + CVarDef.Create("accessibility.colorblind_friendly", false, CVar.CLIENTONLY | CVar.ARCHIVE); + + /// + /// Disables all vision filters for species like Vulpkanin or Harpies. There are good reasons someone might want to disable these. + /// + public static readonly CVarDef NoVisionFilters = + CVarDef.Create("accessibility.no_vision_filters", true, CVar.CLIENTONLY | CVar.ARCHIVE); +} diff --git a/Content.Shared/CCVar/CCVars.Admin.Ahelp.cs b/Content.Shared/CCVar/CCVars.Admin.Ahelp.cs new file mode 100644 index 0000000000..1211fd8b8e --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Admin.Ahelp.cs @@ -0,0 +1,79 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Ahelp rate limit values are accounted in periods of this size (seconds). + /// After the period has passed, the count resets. + /// + /// + public static readonly CVarDef AhelpRateLimitPeriod = + CVarDef.Create("ahelp.rate_limit_period", 2f, CVar.SERVERONLY); + + /// + /// How many ahelp messages are allowed in a single rate limit period. + /// + /// + public static readonly CVarDef AhelpRateLimitCount = + CVarDef.Create("ahelp.rate_limit_count", 10, CVar.SERVERONLY); + + /// + /// Should the administrator's position be displayed in ahelp. + /// If it is is false, only the admin's ckey will be displayed in the ahelp. + /// + /// + /// + public static readonly CVarDef AhelpAdminPrefix = + CVarDef.Create("ahelp.admin_prefix", true, CVar.SERVERONLY); + + /// + /// Should the administrator's position be displayed in the webhook. + /// If it is is false, only the admin's ckey will be displayed in webhook. + /// + /// + /// + public static readonly CVarDef AhelpAdminPrefixWebhook = + CVarDef.Create("ahelp.admin_prefix_webhook", true, CVar.SERVERONLY); + + /// + /// If an admin replies to users from discord, should it use their discord role color? (if applicable) + /// Overrides DiscordReplyColor and AdminBwoinkColor. + /// + public static readonly CVarDef UseDiscordRoleColor = + CVarDef.Create("admin.use_discord_role_color", false, CVar.SERVERONLY); + + /// + /// If an admin replies to users from discord, should it use their discord role color? (if applicable) + /// Overrides DiscordReplyColor and AdminBwoinkColor. + /// + public static readonly CVarDef UseDiscordRoleName = + CVarDef.Create("admin.use_discord_role_name", false, CVar.SERVERONLY); + + /// + /// The text before an admin's name when replying from discord to indicate they're speaking from discord. + /// + public static readonly CVarDef DiscordReplyPrefix = + CVarDef.Create("admin.discord_reply_prefix", "(DC) ", CVar.SERVERONLY); + + /// + /// The color of the names of admins. This is the fallback color for admins. + /// + public static readonly CVarDef AdminBwoinkColor = + CVarDef.Create("admin.admin_bwoink_color", "red", CVar.SERVERONLY); + + /// + /// The color of the names of admins who reply from discord. Leave empty to disable. + /// Overrides AdminBwoinkColor. + /// + public static readonly CVarDef DiscordReplyColor = + CVarDef.Create("admin.discord_reply_color", string.Empty, CVar.SERVERONLY); + + /// + /// Use the admin's Admin OOC color in bwoinks. + /// If either the ooc color or this is not set, uses the admin.admin_bwoink_color value. + /// + public static readonly CVarDef UseAdminOOCColorInBwoinks = + CVarDef.Create("admin.bwoink_use_admin_ooc_color", false, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Admin.Logs.cs b/Content.Shared/CCVar/CCVars.Admin.Logs.cs new file mode 100644 index 0000000000..862456ddfd --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Admin.Logs.cs @@ -0,0 +1,42 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Controls if admin logs are enabled. Highly recommended to shut this off for development. + /// + public static readonly CVarDef AdminLogsEnabled = + CVarDef.Create("adminlogs.enabled", true, CVar.SERVERONLY); + + public static readonly CVarDef AdminLogsQueueSendDelay = + CVarDef.Create("adminlogs.queue_send_delay_seconds", 5f, CVar.SERVERONLY); + + /// + /// When to skip the waiting time to save in-round admin logs, if no admin logs are currently being saved + /// + public static readonly CVarDef AdminLogsQueueMax = + CVarDef.Create("adminlogs.queue_max", 5000, CVar.SERVERONLY); + + /// + /// When to skip the waiting time to save pre-round admin logs, if no admin logs are currently being saved + /// + public static readonly CVarDef AdminLogsPreRoundQueueMax = + CVarDef.Create("adminlogs.pre_round_queue_max", 5000, CVar.SERVERONLY); + + /// + /// When to start dropping logs + /// + public static readonly CVarDef AdminLogsDropThreshold = + CVarDef.Create("adminlogs.drop_threshold", 20000, CVar.SERVERONLY); + + /// + /// How many logs to send to the client at once + /// + public static readonly CVarDef AdminLogsClientBatchSize = + CVarDef.Create("adminlogs.client_batch_size", 1000, CVar.SERVERONLY); + + public static readonly CVarDef AdminLogsServerName = + CVarDef.Create("adminlogs.server_name", "unknown", CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Admin.Rules.cs b/Content.Shared/CCVar/CCVars.Admin.Rules.cs new file mode 100644 index 0000000000..b87074288f --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Admin.Rules.cs @@ -0,0 +1,18 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Time that players have to wait before rules can be accepted. + /// + public static readonly CVarDef RulesWaitTime = + CVarDef.Create("rules.time", 45f, CVar.SERVER | CVar.REPLICATED); + + /// + /// Don't show rules to localhost/loopback interface. + /// + public static readonly CVarDef RulesExemptLocal = + CVarDef.Create("rules.exempt_local", false, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Admin.cs b/Content.Shared/CCVar/CCVars.Admin.cs new file mode 100644 index 0000000000..3a4eb7b065 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Admin.cs @@ -0,0 +1,172 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef AdminAnnounceLogin = + CVarDef.Create("admin.announce_login", true, CVar.SERVERONLY); + + public static readonly CVarDef AdminAnnounceLogout = + CVarDef.Create("admin.announce_logout", true, CVar.SERVERONLY); + + /// + /// The token used to authenticate with the admin API. Leave empty to disable the admin API. This is a secret! Do not share! + /// + public static readonly CVarDef AdminApiToken = + CVarDef.Create("admin.api_token", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL); + + /// + /// Should users be able to see their own notes? Admins will be able to see and set notes regardless + /// + public static readonly CVarDef SeeOwnNotes = + CVarDef.Create("admin.see_own_notes", false, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); + + /// + /// Should the server play a quick sound to the active admins whenever a new player joins? + /// + public static readonly CVarDef AdminNewPlayerJoinSound = + CVarDef.Create("admin.new_player_join_sound", false, CVar.SERVERONLY); + + /// + /// The amount of days before the note starts fading. It will slowly lose opacity until it reaches stale. Set to 0 to disable. + /// + public static readonly CVarDef NoteFreshDays = + CVarDef.Create("admin.note_fresh_days", 91.31055, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); + + /// + /// The amount of days before the note completely fades, and can only be seen by admins if they press "see more notes". Set to 0 + /// if you want the note to immediately disappear without fading. + /// + public static readonly CVarDef NoteStaleDays = + CVarDef.Create("admin.note_stale_days", 365.2422, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); + + /// + /// How much time does the user have to wait in seconds before confirming that they saw an admin message? + /// + public static readonly CVarDef MessageWaitTime = + CVarDef.Create("admin.message_wait_time", 3f, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); + + /// + /// Default severity for role bans + /// + public static readonly CVarDef RoleBanDefaultSeverity = + CVarDef.Create("admin.role_ban_default_severity", "medium", CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); + + /// + /// Default severity for department bans + /// + public static readonly CVarDef DepartmentBanDefaultSeverity = + CVarDef.Create("admin.department_ban_default_severity", "medium", CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); + + /// + /// Default severity for server bans + /// + public static readonly CVarDef ServerBanDefaultSeverity = + CVarDef.Create("admin.server_ban_default_severity", "High", CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); + + /// + /// Whether a server ban will ban the player's ip by default. + /// + public static readonly CVarDef ServerBanIpBanDefault = + CVarDef.Create("admin.server_ban_ip_ban_default", true, CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); + + /// + /// Whether a server ban will ban the player's hardware id by default. + /// + public static readonly CVarDef ServerBanHwidBanDefault = + CVarDef.Create("admin.server_ban_hwid_ban_default", true, CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); + + /// + /// Whether to use details from last connection for ip/hwid in the BanPanel. + /// + public static readonly CVarDef ServerBanUseLastDetails = + CVarDef.Create("admin.server_ban_use_last_details", true, CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); + + /// + /// Whether to erase a player's chat messages and their entity from the game when banned. + /// + public static readonly CVarDef ServerBanErasePlayer = + CVarDef.Create("admin.server_ban_erase_player", false, CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); + + /// + /// Minimum players sharing a connection required to create an alert. -1 to disable the alert. + /// + /// + /// If you set this to 0 or 1 then it will alert on every connection, so probably don't do that. + /// + public static readonly CVarDef AdminAlertMinPlayersSharingConnection = + CVarDef.Create("admin.alert.min_players_sharing_connection", -1, CVar.SERVERONLY); + + /// + /// Minimum explosion intensity to create an admin alert message. -1 to disable the alert. + /// + public static readonly CVarDef AdminAlertExplosionMinIntensity = + CVarDef.Create("admin.alert.explosion_min_intensity", 60, CVar.SERVERONLY); + + /// + /// Minimum particle accelerator strength to create an admin alert message. + /// + public static readonly CVarDef AdminAlertParticleAcceleratorMinPowerState = + CVarDef.Create("admin.alert.particle_accelerator_min_power_state", 3, CVar.SERVERONLY); + + /// + /// Should the ban details in admin channel include PII? (IP, HWID, etc) + /// + public static readonly CVarDef AdminShowPIIOnBan = + CVarDef.Create("admin.show_pii_onban", false, CVar.SERVERONLY); + + /// + /// If an admin joins a round by reading up or using the late join button, automatically + /// de-admin them. + /// + public static readonly CVarDef AdminDeadminOnJoin = + CVarDef.Create("admin.deadmin_on_join", false, CVar.SERVERONLY); + + /// + /// Overrides the name the client sees in ahelps. Set empty to disable. + /// + public static readonly CVarDef AdminAhelpOverrideClientName = + CVarDef.Create("admin.override_adminname_in_client_ahelp", string.Empty, CVar.SERVERONLY); + + /// + /// The threshold of minutes to appear as a "new player" in the ahelp menu + /// If 0, appearing as a new player is disabled. + /// + public static readonly CVarDef NewPlayerThreshold = + CVarDef.Create("admin.new_player_threshold", 0, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); + + /// + /// How long an admin client can go without any input before being considered AFK. + /// + public static readonly CVarDef AdminAfkTime = + CVarDef.Create("admin.afk_time", 600f, CVar.SERVERONLY); + + /// + /// If true, admins are able to connect even if + /// would otherwise block regular players. + /// + public static readonly CVarDef AdminBypassMaxPlayers = + CVarDef.Create("admin.bypass_max_players", true, CVar.SERVERONLY); + + /// + /// Determine if custom rank names are used. + /// If it is false, it'd use the actual rank name regardless of the individual's title. + /// + /// + /// + public static readonly CVarDef AdminUseCustomNamesAdminRank = + CVarDef.Create("admin.use_custom_names_admin_rank", true, CVar.SERVERONLY); + + /// + /// Determines whether admins count towards the total playercount when determining whether the server is over + /// Ideally this should be used in conjuction with . + /// This also applies to playercount limits in whitelist conditions + /// If false, then admins will not be considered when checking whether the playercount is already above the soft player cap + /// + public static readonly CVarDef AdminsCountForMaxPlayers = + CVarDef.Create("admin.admins_count_for_max_players", false, CVar.SERVERONLY); + + public static readonly CVarDef BanHardwareIds = + CVarDef.Create("ban.hardware_ids", true, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Announcer.cs b/Content.Shared/CCVar/CCVars.Announcer.cs new file mode 100644 index 0000000000..acccd7d0e4 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Announcer.cs @@ -0,0 +1,37 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Weighted list of announcers to choose from + /// + public static readonly CVarDef AnnouncerList = + CVarDef.Create("announcer.list", "RandomAnnouncers", CVar.REPLICATED); + + /// + /// Optionally force set an announcer + /// + public static readonly CVarDef Announcer = + CVarDef.Create("announcer.announcer", "", CVar.SERVERONLY); + + /// + /// Optionally blacklist announcers + /// List of IDs separated by commas + /// + public static readonly CVarDef AnnouncerBlacklist = + CVarDef.Create("announcer.blacklist", "", CVar.SERVERONLY); + + /// + /// Changes how loud the announcers are for the client + /// + public static readonly CVarDef AnnouncerVolume = + CVarDef.Create("announcer.volume", 0.5f, CVar.ARCHIVE | CVar.CLIENTONLY); + + /// + /// Disables multiple announcement sounds from playing at once + /// + public static readonly CVarDef AnnouncerDisableMultipleSounds = + CVarDef.Create("announcer.disable_multiple_sounds", false, CVar.ARCHIVE | CVar.CLIENTONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Atmos.cs b/Content.Shared/CCVar/CCVars.Atmos.cs new file mode 100644 index 0000000000..46890cea0c --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Atmos.cs @@ -0,0 +1,188 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Whether gas differences will move entities. + /// + public static readonly CVarDef SpaceWind = + CVarDef.Create("atmos.space_wind", true, CVar.SERVERONLY); + + public static readonly CVarDef SpaceWindStrengthMultiplier = + CVarDef.Create("atmos.space_wind_strength_multiplier", 1f, CVar.SERVERONLY); + + /// + /// Divisor from maxForce (pressureDifference * 2.25f) to force applied on objects. + /// + public static readonly CVarDef SpaceWindPressureForceDivisorThrow = + CVarDef.Create("atmos.space_wind_pressure_force_divisor_throw", 15f, CVar.SERVERONLY); + + /// + /// Divisor from maxForce (pressureDifference * 2.25f) to force applied on objects. + /// + public static readonly CVarDef SpaceWindPressureForceDivisorPush = + CVarDef.Create("atmos.space_wind_pressure_force_divisor_push", 2500f, CVar.SERVERONLY); + + /// + /// The maximum velocity (not force) that may be applied to an object by atmospheric pressure differences. + /// Useful to prevent clipping through objects. + /// + public static readonly CVarDef SpaceWindMaxVelocity = + CVarDef.Create("atmos.space_wind_max_velocity", 15f, CVar.SERVERONLY); + + /// + /// The maximum force that may be applied to an object by pushing (i.e. not throwing) atmospheric pressure differences. + /// A "throwing" atmospheric pressure difference ignores this limit, but not the max. velocity limit. + /// + public static readonly CVarDef SpaceWindMaxPushForce = + CVarDef.Create("atmos.space_wind_max_push_force", 20f, CVar.SERVERONLY); + + /// + /// If an object's mass is below this number, then this number is used in place of mass to determine whether air pressure can throw an object. + /// This has nothing to do with throwing force, only acting as a way of reducing the odds of tiny 5 gram objects from being yeeted by people's breath + /// + /// + /// If you are reading this because you want to change it, consider looking into why almost every item in the game weighs only 5 grams + /// And maybe do your part to fix that? :) + /// + public static readonly CVarDef SpaceWindMinimumCalculatedMass = + CVarDef.Create("atmos.space_wind_minimum_calculated_mass", 5f, CVar.SERVERONLY); + + /// + /// Calculated as 1/Mass, where Mass is the physics.Mass of the desired threshold. + /// If an object's inverse mass is lower than this, it is capped at this. Basically, an upper limit to how heavy an object can be before it stops resisting space wind more. + /// + public static readonly CVarDef SpaceWindMaximumCalculatedInverseMass = + CVarDef.Create("atmos.space_wind_maximum_calculated_inverse_mass", 0.04f, CVar.SERVERONLY); + + /// + /// Whether monstermos tile equalization is enabled. + /// + public static readonly CVarDef MonstermosEqualization = + CVarDef.Create("atmos.monstermos_equalization", true, CVar.SERVERONLY); + + /// + /// Whether monstermos explosive depressurization is enabled. + /// Needs to be enabled to work. + /// + public static readonly CVarDef MonstermosDepressurization = + CVarDef.Create("atmos.monstermos_depressurization", true, CVar.SERVERONLY); + + /// + /// Whether monstermos explosive depressurization will rip tiles.. + /// Needs and to be enabled to work. + /// WARNING: This cvar causes MAJOR contrast issues, and usually tends to make any spaced scene look very cluttered. + /// This not only usually looks strange, but can also reduce playability for people with impaired vision. Please think twice before enabling this on your server. + /// Also looks weird on slow spacing for unrelated reasons. If you do want to enable this, you should probably turn on instaspacing. + /// + public static readonly CVarDef MonstermosRipTiles = + CVarDef.Create("atmos.monstermos_rip_tiles", true, CVar.SERVERONLY); + + /// + /// Taken as the cube of a tile's mass, this acts as a minimum threshold of mass for which air pressure calculates whether or not to rip a tile from the floor + /// This should be set by default to the cube of the game's lowest mass tile as defined in their prototypes, but can be increased for server performance reasons + /// + public static readonly CVarDef MonstermosRipTilesMinimumPressure = + CVarDef.Create("atmos.monstermos_rip_tiles_min_pressure", 20f, CVar.SERVERONLY); + + /// + /// Whether explosive depressurization will cause the grid to gain an impulse. + /// Needs and to be enabled to work. + /// + public static readonly CVarDef AtmosGridImpulse = + CVarDef.Create("atmos.grid_impulse", false, CVar.SERVERONLY); + + /// + /// What fraction of air from a spaced tile escapes every tick. + /// 1.0 for instant spacing, 0.2 means 20% of remaining air lost each time + /// + public static readonly CVarDef AtmosSpacingEscapeRatio = + CVarDef.Create("atmos.mmos_spacing_speed", 0.05f, CVar.SERVERONLY); + + /// + /// Minimum amount of air allowed on a spaced tile before it is reset to 0 immediately in kPa + /// Since the decay due to SpacingEscapeRatio follows a curve, it would never reach 0.0 exactly + /// unless we truncate it somewhere. + /// + public static readonly CVarDef AtmosSpacingMinGas = + CVarDef.Create("atmos.mmos_min_gas", 2.0f, CVar.SERVERONLY); + + /// + /// How much wind can go through a single tile before that tile doesn't depressurize itself + /// (I.e spacing is limited in large rooms heading into smaller spaces) + /// + public static readonly CVarDef AtmosSpacingMaxWind = + CVarDef.Create("atmos.mmos_max_wind", 500f, CVar.SERVERONLY); + + /// + /// Increases default airflow calculations to O(n^2) complexity, for use with heavy space wind optimizations. Potato servers BEWARE + /// This solves the problem of objects being trapped in an infinite loop of slamming into a wall repeatedly. + /// + public static readonly CVarDef MonstermosUseExpensiveAirflow = + CVarDef.Create("atmos.mmos_expensive_airflow", false, CVar.SERVERONLY); + + /// + /// Whether atmos superconduction is enabled. + /// + /// Disabled by default, superconduction is awful. + public static readonly CVarDef Superconduction = + CVarDef.Create("atmos.superconduction", false, CVar.SERVERONLY); + + /// + /// Heat loss per tile due to radiation at 20 degC, in W. + /// + public static readonly CVarDef SuperconductionTileLoss = + CVarDef.Create("atmos.superconduction_tile_loss", 30f, CVar.SERVERONLY); + + /// + /// Whether excited groups will be processed and created. + /// + public static readonly CVarDef ExcitedGroups = + CVarDef.Create("atmos.excited_groups", true, CVar.SERVERONLY); + + /// + /// Whether all tiles in an excited group will clear themselves once being exposed to space. + /// Similar to , without none of the tile ripping or + /// things being thrown around very violently. + /// Needs to be enabled to work. + /// + public static readonly CVarDef ExcitedGroupsSpaceIsAllConsuming = + CVarDef.Create("atmos.excited_groups_space_is_all_consuming", false, CVar.SERVERONLY); + + /// + /// Maximum time in milliseconds that atmos can take processing. + /// + public static readonly CVarDef AtmosMaxProcessTime = + CVarDef.Create("atmos.max_process_time", 3f, CVar.SERVERONLY); + + /// + /// Atmos tickrate in TPS. Atmos processing will happen every 1/TPS seconds. + /// + public static readonly CVarDef AtmosTickRate = + CVarDef.Create("atmos.tickrate", 15f, CVar.SERVERONLY); + + /// + /// Scale factor for how fast things happen in our atmosphere + /// simulation compared to real life. 1x means pumps run at 1x + /// speed. Players typically expect things to happen faster + /// in-game. + /// + public static readonly CVarDef AtmosSpeedup = + CVarDef.Create("atmos.speedup", 8f, CVar.SERVERONLY); + + /// + /// Like atmos.speedup, but only for gas and reaction heat values. 64x means + /// gases heat up and cool down 64x faster than real life. + /// + public static readonly CVarDef AtmosHeatScale = + CVarDef.Create("atmos.heat_scale", 8f, CVar.SERVERONLY); + + /// + /// A multiplier on the amount of force applied to Humanoid entities, as tracked by HumanoidAppearanceComponent + /// This multiplier is added after all other checks are made, and applies to both throwing force, and how easy it is for an entity to be thrown. + /// + public static readonly CVarDef AtmosHumanoidThrowMultiplier = + CVarDef.Create("atmos.humanoid_throw_multiplier", 2f, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Audio.cs b/Content.Shared/CCVar/CCVars.Audio.cs new file mode 100644 index 0000000000..308383781a --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Audio.cs @@ -0,0 +1,60 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// How long we'll wait until re-sampling nearby objects for ambience. Should be pretty fast, but doesn't have to match the tick rate. + /// + public static readonly CVarDef AmbientCooldown = + CVarDef.Create("ambience.cooldown", 0.1f, CVar.ARCHIVE | CVar.CLIENTONLY); + + /// + /// How large of a range to sample for ambience. + /// + public static readonly CVarDef AmbientRange = + CVarDef.Create("ambience.range", 8f, CVar.REPLICATED | CVar.SERVER); + + /// + /// Maximum simultaneous ambient sounds. + /// + public static readonly CVarDef MaxAmbientSources = + CVarDef.Create("ambience.max_sounds", 16, CVar.ARCHIVE | CVar.CLIENTONLY); + + /// + /// The minimum value the user can set for ambience.max_sounds + /// + public static readonly CVarDef MinMaxAmbientSourcesConfigured = + CVarDef.Create("ambience.min_max_sounds_configured", 16, CVar.REPLICATED | CVar.SERVER | CVar.CHEAT); + + /// + /// The maximum value the user can set for ambience.max_sounds + /// + public static readonly CVarDef MaxMaxAmbientSourcesConfigured = + CVarDef.Create("ambience.max_max_sounds_configured", 64, CVar.REPLICATED | CVar.SERVER | CVar.CHEAT); + + /// + /// Ambience volume. + /// + public static readonly CVarDef AmbienceVolume = + CVarDef.Create("ambience.volume", 1.5f, CVar.ARCHIVE | CVar.CLIENTONLY); + + /// + /// Ambience music volume. + /// + public static readonly CVarDef AmbientMusicVolume = + CVarDef.Create("ambience.music_volume", 1.5f, CVar.ARCHIVE | CVar.CLIENTONLY); + + /// + /// Lobby / round end music volume. + /// + public static readonly CVarDef LobbyMusicVolume = + CVarDef.Create("ambience.lobby_music_volume", 0.50f, CVar.ARCHIVE | CVar.CLIENTONLY); + + /// + /// UI volume. + /// + public static readonly CVarDef InterfaceVolume = + CVarDef.Create("audio.interface_volume", 0.50f, CVar.ARCHIVE | CVar.CLIENTONLY); +} diff --git a/Content.Shared/CCVar/CCVars.AutoVote.cs b/Content.Shared/CCVar/CCVars.AutoVote.cs new file mode 100644 index 0000000000..3154a67731 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.AutoVote.cs @@ -0,0 +1,20 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// Enables the automatic voting system. + public static readonly CVarDef AutoVoteEnabled = + CVarDef.Create("vote.autovote_enabled", true, CVar.SERVERONLY); + + /// Automatically starts a map vote when returning to the lobby. + /// Requires auto voting to be enabled. + public static readonly CVarDef MapAutoVoteEnabled = + CVarDef.Create("vote.map_autovote_enabled", true, CVar.SERVERONLY); + + /// Automatically starts a gamemode vote when returning to the lobby. + /// Requires auto voting to be enabled. + public static readonly CVarDef PresetAutoVoteEnabled = + CVarDef.Create("vote.preset_autovote_enabled", true, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.CPR.cs b/Content.Shared/CCVar/CCVars.CPR.cs new file mode 100644 index 0000000000..8d7a27ede3 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.CPR.cs @@ -0,0 +1,54 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /* + * CPR System + */ + /// + /// Controls whether the entire CPR system runs. When false, nobody can perform CPR. You should probably remove the trait too + /// if you are wishing to permanently disable the system on your server. + /// + public static readonly CVarDef EnableCPR = + CVarDef.Create("cpr.enable", true, CVar.REPLICATED | CVar.SERVER); + + /// + /// Toggles whether or not CPR reduces rot timers(As an abstraction of delaying brain death, the IRL actual purpose of CPR) + /// + public static readonly CVarDef CPRReducesRot = + CVarDef.Create("cpr.reduces_rot", true, CVar.REPLICATED | CVar.SERVER); + + /// + /// Toggles whether or not CPR heals airloss, included for completeness sake. I'm not going to stop you if your intention is to make CPR do nothing. + /// I guess it might be funny to troll your players with? I won't judge. + /// + public static readonly CVarDef CPRHealsAirloss = + CVarDef.Create("cpr.heals_airloss", true, CVar.REPLICATED | CVar.SERVER); + + /// + /// The chance for a patient to be resuscitated when CPR is successfully performed. + /// Setting this above 0 isn't very realistic, but people who see CPR in movies and TV will expect CPR to work this way. + /// + public static readonly CVarDef CPRResuscitationChance = + CVarDef.Create("cpr.resuscitation_chance", 0.05f, CVar.REPLICATED | CVar.SERVER); + + /// + /// By default, CPR reduces rot timers by an amount of seconds equal to the time spent performing CPR. This is an optional multiplier that can increase or decrease the amount + /// of rot reduction. Set it to 2 for if you want 3 seconds of CPR to reduce 6 seconds of rot. + /// + /// + /// If you're wondering why there isn't a CVar for setting the duration of the doafter, that's because it's not actually possible to have a timespan in cvar form + /// Curiously, it's also not possible for **shared** systems to set variable timespans. Which is where this system lives. + /// + public static readonly CVarDef CPRRotReductionMultiplier = + CVarDef.Create("cpr.rot_reduction_multiplier", 1f, CVar.REPLICATED | CVar.SERVER); + + /// + /// By default, CPR heals airloss by 1 point for every second spent performing CPR. Just like above, this directly multiplies the healing amount. + /// Set it to 2 to get 6 points of airloss healing for every 3 seconds of CPR. + /// + public static readonly CVarDef CPRAirlossReductionMultiplier = + CVarDef.Create("cpr.airloss_reduction_multiplier", 1f, CVar.REPLICATED | CVar.SERVER); +} diff --git a/Content.Shared/CCVar/CCVars.Chat.Looc.cs b/Content.Shared/CCVar/CCVars.Chat.Looc.cs new file mode 100644 index 0000000000..84ee2c2807 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Chat.Looc.cs @@ -0,0 +1,26 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef LoocEnabled = + CVarDef.Create("looc.enabled", true, CVar.NOTIFY | CVar.REPLICATED); + + public static readonly CVarDef AdminLoocEnabled = + CVarDef.Create("looc.enabled_admin", true, CVar.NOTIFY); + + /// + /// True: Dead players can use LOOC + /// False: Dead player LOOC gets redirected to dead chat + /// + public static readonly CVarDef DeadLoocEnabled = + CVarDef.Create("looc.enabled_dead", false, CVar.NOTIFY | CVar.REPLICATED); + + /// + /// True: Crit players can use LOOC + /// False: Crit player LOOC gets redirected to dead chat + /// + public static readonly CVarDef CritLoocEnabled = + CVarDef.Create("looc.enabled_crit", false, CVar.NOTIFY | CVar.REPLICATED); +} diff --git a/Content.Shared/CCVar/CCVars.Chat.Ooc.cs b/Content.Shared/CCVar/CCVars.Chat.Ooc.cs new file mode 100644 index 0000000000..ba5e41053b --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Chat.Ooc.cs @@ -0,0 +1,27 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef + OocEnabled = CVarDef.Create("ooc.enabled", true, CVar.NOTIFY | CVar.REPLICATED); + + public static readonly CVarDef AdminOocEnabled = + CVarDef.Create("ooc.enabled_admin", true, CVar.NOTIFY); + + /// + /// If true, whenever OOC is disabled the Discord OOC relay will also be disabled. + /// + public static readonly CVarDef DisablingOOCDisablesRelay = + CVarDef.Create("ooc.disabling_ooc_disables_relay", true, CVar.SERVERONLY); + + /// + /// Whether or not OOC chat should be enabled during a round. + /// + public static readonly CVarDef OocEnableDuringRound = + CVarDef.Create("ooc.enable_during_round", false, CVar.NOTIFY | CVar.REPLICATED | CVar.SERVER); + + public static readonly CVarDef ShowOocPatronColor = + CVarDef.Create("ooc.show_ooc_patron_color", true, CVar.ARCHIVE | CVar.REPLICATED | CVar.CLIENT); +} diff --git a/Content.Shared/CCVar/CCVars.Chat.cs b/Content.Shared/CCVar/CCVars.Chat.cs new file mode 100644 index 0000000000..7950e5f35a --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Chat.cs @@ -0,0 +1,71 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Chat rate limit values are accounted in periods of this size (seconds). + /// After the period has passed, the count resets. + /// + /// + public static readonly CVarDef ChatRateLimitPeriod = + CVarDef.Create("chat.rate_limit_period", 2f, CVar.SERVERONLY); + + /// + /// How many chat messages are allowed in a single rate limit period. + /// + /// + /// The total rate limit throughput per second is effectively + /// divided by . + /// + /// + public static readonly CVarDef ChatRateLimitCount = + CVarDef.Create("chat.rate_limit_count", 10, CVar.SERVERONLY); + + /// + /// Minimum delay (in seconds) between notifying admins about chat message rate limit violations. + /// A negative value disables admin announcements. + /// + public static readonly CVarDef ChatRateLimitAnnounceAdminsDelay = + CVarDef.Create("chat.rate_limit_announce_admins_delay", 15, CVar.SERVERONLY); + + public static readonly CVarDef ChatMaxMessageLength = + CVarDef.Create("chat.max_message_length", 1000, CVar.SERVER | CVar.REPLICATED); + + public static readonly CVarDef ChatMaxAnnouncementLength = + CVarDef.Create("chat.max_announcement_length", 256, CVar.SERVER | CVar.REPLICATED); + + public static readonly CVarDef ChatSanitizerEnabled = + CVarDef.Create("chat.chat_sanitizer_enabled", true, CVar.SERVERONLY); + + public static readonly CVarDef ChatShowTypingIndicator = + CVarDef.Create("chat.show_typing_indicator", true, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); + + public static readonly CVarDef ChatEnableFancyBubbles = + CVarDef.Create("chat.enable_fancy_bubbles", + true, + CVar.CLIENTONLY | CVar.ARCHIVE, + "Toggles displaying fancy speech bubbles, which display the speaking character's name."); + + public static readonly CVarDef ChatFancyNameBackground = + CVarDef.Create("chat.fancy_name_background", + false, + CVar.CLIENTONLY | CVar.ARCHIVE, + "Toggles displaying a background under the speaking character's name."); + + public static readonly CVarDef ChatStackLastLines = + CVarDef.Create("chat.chatstack_last_lines", 1, CVar.CLIENTONLY | CVar.ARCHIVE, "How far into the chat history to look when looking for similiar messages to coalesce them."); + + /// + /// A message broadcast to each player that joins the lobby. + /// May be changed by admins ingame through use of the "set-motd" command. + /// In this case the new value, if not empty, is broadcast to all connected players and saved between rounds. + /// May be requested by any player through use of the "get-motd" command. + /// + public static readonly CVarDef MOTD = + CVarDef.Create("chat.motd", + "", + CVar.SERVER | CVar.SERVERONLY | CVar.ARCHIVE, + "A message broadcast to each player that joins the lobby."); +} diff --git a/Content.Shared/CCVar/CCVars.Cloning.cs b/Content.Shared/CCVar/CCVars.Cloning.cs new file mode 100644 index 0000000000..72472b1f6a --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Cloning.cs @@ -0,0 +1,60 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// How much should the cost to clone an entity be multiplied by. + /// + public static readonly CVarDef CloningBiomassCostMultiplier = + CVarDef.Create("cloning.biomass_cost_multiplier", 1f, CVar.SERVERONLY); + + /// + /// Whether or not the Biomass Reclaimer is allowed to roundremove bodies with a soul. + /// + public static readonly CVarDef CloningReclaimSouledBodies = + CVarDef.Create("cloning.reclaim_souled_bodies", true, CVar.SERVERONLY); + + /// + /// Controls whether or not Metempsychosis will potentially give people a sex change. + /// + public static readonly CVarDef CloningPreserveSex = + CVarDef.Create("cloning.preserve_sex", false, CVar.SERVERONLY); + + /// + /// Controls whether or not Metempsychosis preserves Pronouns when reincarnating people. + /// + public static readonly CVarDef CloningPreserveGender = + CVarDef.Create("cloning.preserve_gender", true, CVar.SERVERONLY); + + /// + /// Controls whether or not Metempsychosis preserves Age. + /// + public static readonly CVarDef CloningPreserveAge = + CVarDef.Create("cloning.preserve_age", false, CVar.SERVERONLY); + + /// + /// Controls whether or not Metempsychosis preserves height. + /// + public static readonly CVarDef CloningPreserveHeight = + CVarDef.Create("cloning.preserve_height", false, CVar.SERVERONLY); + + /// + /// Controls whether or not Metempsychosis preserves width. + /// + public static readonly CVarDef CloningPreserveWidth = + CVarDef.Create("cloning.preserve_width", false, CVar.SERVERONLY); + + /// + /// Controls whether or not Metempsychosis preserves Names. EG: Are you actually a new person? + /// + public static readonly CVarDef CloningPreserveName = + CVarDef.Create("cloning.preserve_name", true, CVar.SERVERONLY); + + /// + /// Controls whether or not Metempsychosis preserves Flavor Text. + /// + public static readonly CVarDef CloningPreserveFlavorText = + CVarDef.Create("cloning.preserve_flavor_text", true, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Config.cs b/Content.Shared/CCVar/CCVars.Config.cs new file mode 100644 index 0000000000..4e11f09ee7 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Config.cs @@ -0,0 +1,35 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + // These are server-only for now since I don't foresee a client use yet, + // and I don't wanna have to start coming up with like .client suffixes and stuff like that. + + /// + /// Configuration presets to load during startup. + /// Multiple presets can be separated by comma and are loaded in order. + /// + /// + /// Loaded presets must be located under the ConfigPresets/ resource directory and end with the .toml extension. + /// Only the file name (without extension) must be given for this variable. + /// + public static readonly CVarDef ConfigPresets = + CVarDef.Create("config.presets", "", CVar.SERVERONLY); + + /// + /// Whether to load the preset development CVars. + /// This disables some things like lobby to make development easier. + /// Even when true, these are only loaded if the game is compiled with DEVELOPMENT set. + /// + public static readonly CVarDef ConfigPresetDevelopment = + CVarDef.Create("config.preset_development", true, CVar.SERVERONLY); + + /// + /// Whether to load the preset debug CVars. + /// Even when true, these are only loaded if the game is compiled with DEBUG set. + /// + public static readonly CVarDef ConfigPresetDebug = + CVarDef.Create("config.preset_debug", true, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Console.cs b/Content.Shared/CCVar/CCVars.Console.cs new file mode 100644 index 0000000000..e670b9f836 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Console.cs @@ -0,0 +1,15 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef ConsoleLoginLocal = + CVarDef.Create("console.loginlocal", true, CVar.ARCHIVE | CVar.SERVERONLY); + + /// + /// Automatically log in the given user as host, equivalent to the promotehost command. + /// + public static readonly CVarDef ConsoleLoginHostUser = + CVarDef.Create("console.login_host_user", "", CVar.ARCHIVE | CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Contests.cs b/Content.Shared/CCVar/CCVars.Contests.cs new file mode 100644 index 0000000000..bfdab3e776 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Contests.cs @@ -0,0 +1,57 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// The MASTER TOGGLE for the entire Contests System. + /// ALL CONTESTS BELOW, regardless of type or setting will output 1f when false. + /// + public static readonly CVarDef DoContestsSystem = + CVarDef.Create("contests.do_contests_system", true, CVar.REPLICATED | CVar.SERVER); + + /// + /// Contest functions normally include an optional override to bypass the clamp set by max_percentage. + /// This CVar disables the bypass when false, forcing all implementations to comply with max_percentage. + /// + public static readonly CVarDef AllowClampOverride = + CVarDef.Create("contests.allow_clamp_override", true, CVar.REPLICATED | CVar.SERVER); + /// + /// Toggles all MassContest functions. All mass contests output 1f when false + /// + public static readonly CVarDef DoMassContests = + CVarDef.Create("contests.do_mass_contests", true, CVar.REPLICATED | CVar.SERVER); + + /// + /// Toggles all StaminaContest functions. All stamina contests output 1f when false + /// + public static readonly CVarDef DoStaminaContests = + CVarDef.Create("contests.do_stamina_contests", true, CVar.REPLICATED | CVar.SERVER); + + /// + /// Toggles all HealthContest functions. All health contests output 1f when false + /// + public static readonly CVarDef DoHealthContests = + CVarDef.Create("contests.do_health_contests", true, CVar.REPLICATED | CVar.SERVER); + + /// + /// Toggles all MindContest functions. All mind contests output 1f when false. + /// MindContests are not currently implemented, and are awaiting completion of the Psionic Refactor + /// + public static readonly CVarDef DoMindContests = + CVarDef.Create("contests.do_mind_contests", true, CVar.REPLICATED | CVar.SERVER); + + /// + /// Toggles all MoodContest functions. All mood contests output 1f when false. + /// + public static readonly CVarDef DoMoodContests = + CVarDef.Create("contests.do_mood_contests", true, CVar.REPLICATED | CVar.SERVER); + + /// + /// The maximum amount that Mass Contests can modify a physics multiplier, given as a +/- percentage + /// Default of 0.25f outputs between * 0.75f and 1.25f + /// + public static readonly CVarDef MassContestsMaxPercentage = + CVarDef.Create("contests.max_percentage", 0.25f, CVar.REPLICATED | CVar.SERVER); +} diff --git a/Content.Shared/CCVar/CCVars.Crewmanifest.cs b/Content.Shared/CCVar/CCVars.Crewmanifest.cs new file mode 100644 index 0000000000..d6251886b9 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Crewmanifest.cs @@ -0,0 +1,24 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Setting this allows a crew manifest to be opened from any window + /// that has a crew manifest button, and sends the correct message. + /// If this is false, only in-game entities will allow you to see + /// the crew manifest, if the functionality is coded in. + /// Having administrator priveledge ignores this, but will still + /// hide the button in UI windows. + /// + public static readonly CVarDef CrewManifestWithoutEntity = + CVarDef.Create("crewmanifest.no_entity", true, CVar.REPLICATED); + + /// + /// Setting this allows the crew manifest to be viewed from 'unsecure' + /// entities, such as the PDA. + /// + public static readonly CVarDef CrewManifestUnsecure = + CVarDef.Create("crewmanifest.unsecure", true, CVar.REPLICATED); +} diff --git a/Content.Shared/CCVar/CCVars.Database.cs b/Content.Shared/CCVar/CCVars.Database.cs new file mode 100644 index 0000000000..cf36bc5ba9 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Database.cs @@ -0,0 +1,76 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef DatabaseEngine = + CVarDef.Create("database.engine", "sqlite", CVar.SERVERONLY); + + public static readonly CVarDef DatabaseSqliteDbPath = + CVarDef.Create("database.sqlite_dbpath", "preferences.db", CVar.SERVERONLY); + + /// + /// Milliseconds to asynchronously delay all SQLite database acquisitions with. + /// + /// + /// Defaults to 1 on DEBUG, 0 on RELEASE. + /// This is intended to help catch .Result deadlock bugs that only happen on postgres + /// (because SQLite is not actually asynchronous normally) + /// + public static readonly CVarDef DatabaseSqliteDelay = + CVarDef.Create("database.sqlite_delay", DefaultSqliteDelay, CVar.SERVERONLY); + + /// + /// Amount of concurrent SQLite database operations. + /// + /// + /// Note that SQLite is not a properly asynchronous database and also has limited read/write concurrency. + /// Increasing this number may allow more concurrent reads, but it probably won't matter much. + /// SQLite operations are normally ran on the thread pool, which may cause thread pool starvation if the concurrency is too high. + /// + public static readonly CVarDef DatabaseSqliteConcurrency = + CVarDef.Create("database.sqlite_concurrency", 3, CVar.SERVERONLY); + +#if DEBUG + private const int DefaultSqliteDelay = 1; +#else + private const int DefaultSqliteDelay = 0; +#endif + + + public static readonly CVarDef DatabasePgHost = + CVarDef.Create("database.pg_host", "localhost", CVar.SERVERONLY); + + public static readonly CVarDef DatabasePgPort = + CVarDef.Create("database.pg_port", 5432, CVar.SERVERONLY); + + public static readonly CVarDef DatabasePgDatabase = + CVarDef.Create("database.pg_database", "ss14", CVar.SERVERONLY); + + public static readonly CVarDef DatabasePgUsername = + CVarDef.Create("database.pg_username", "postgres", CVar.SERVERONLY); + + public static readonly CVarDef DatabasePgPassword = + CVarDef.Create("database.pg_password", "", CVar.SERVERONLY | CVar.CONFIDENTIAL); + + /// + /// Max amount of concurrent Postgres database operations. + /// + public static readonly CVarDef DatabasePgConcurrency = + CVarDef.Create("database.pg_concurrency", 8, CVar.SERVERONLY); + + /// + /// Milliseconds to asynchronously delay all PostgreSQL database operations with. + /// + /// + /// This is intended for performance testing. It works different from , + /// as the lag is applied after acquiring the database lock. + /// + public static readonly CVarDef DatabasePgFakeLag = + CVarDef.Create("database.pg_fake_lag", 0, CVar.SERVERONLY); + + // Basically only exists for integration tests to avoid race conditions. + public static readonly CVarDef DatabaseSynchronous = + CVarDef.Create("database.sync", false, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Discord.cs b/Content.Shared/CCVar/CCVars.Discord.cs new file mode 100644 index 0000000000..10fe6e1f44 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Discord.cs @@ -0,0 +1,72 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// The role that will get mentioned if a new SOS ahelp comes in. + /// + public static readonly CVarDef DiscordAhelpMention = + CVarDef.Create("discord.on_call_ping", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL); + + /// + /// URL of the discord webhook to relay unanswered ahelp messages. + /// + public static readonly CVarDef DiscordOnCallWebhook = + CVarDef.Create("discord.on_call_webhook", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL); + + /// + /// URL of the Discord webhook which will relay all ahelp messages. + /// + public static readonly CVarDef DiscordAHelpWebhook = + CVarDef.Create("discord.ahelp_webhook", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL); + + /// + /// The server icon to use in the Discord ahelp embed footer. + /// Valid values are specified at https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure. + /// + public static readonly CVarDef DiscordAHelpFooterIcon = + CVarDef.Create("discord.ahelp_footer_icon", string.Empty, CVar.SERVERONLY); + + /// + /// The avatar to use for the webhook. Should be an URL. + /// + public static readonly CVarDef DiscordAHelpAvatar = + CVarDef.Create("discord.ahelp_avatar", string.Empty, CVar.SERVERONLY); + + /// + /// URL of the Discord webhook which will relay all custom votes. If left empty, disables the webhook. + /// + public static readonly CVarDef DiscordVoteWebhook = + CVarDef.Create("discord.vote_webhook", string.Empty, CVar.SERVERONLY); + + /// URL of the Discord webhook which will relay round restart messages. + /// + public static readonly CVarDef DiscordRoundUpdateWebhook = + CVarDef.Create("discord.round_update_webhook", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL); + + /// + /// Role id for the Discord webhook to ping when the round ends. + /// + public static readonly CVarDef DiscordRoundEndRoleWebhook = + CVarDef.Create("discord.round_end_role", string.Empty, CVar.SERVERONLY); + + /// + /// Enable Discord linking, show linking button and modal window + /// + public static readonly CVarDef DiscordAuthEnabled = + CVarDef.Create("discord.auth_enabled", false, CVar.SERVERONLY); + + /// + /// URL of the Discord auth server API + /// + public static readonly CVarDef DiscordAuthApiUrl = + CVarDef.Create("discord.auth_api_url", "", CVar.SERVERONLY); + + /// + /// Secret key of the Discord auth server API + /// + public static readonly CVarDef DiscordAuthApiKey = + CVarDef.Create("discord.auth_api_key", "", CVar.SERVERONLY | CVar.CONFIDENTIAL); +} diff --git a/Content.Shared/CCVar/CCVars.Events.cs b/Content.Shared/CCVar/CCVars.Events.cs new file mode 100644 index 0000000000..61e4ae173d --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Events.cs @@ -0,0 +1,26 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Controls if the game should run station events + /// + public static readonly CVarDef + EventsEnabled = CVarDef.Create("events.enabled", true, CVar.ARCHIVE | CVar.SERVERONLY); + + /// + /// Average time (in minutes) for when the ramping event scheduler should stop increasing the chaos modifier. + /// Close to how long you expect a round to last, so you'll probably have to tweak this on downstreams. + /// + public static readonly CVarDef + EventsRampingAverageEndTime = CVarDef.Create("events.ramping_average_end_time", 40f, CVar.ARCHIVE | CVar.SERVERONLY); + + /// + /// Average ending chaos modifier for the ramping event scheduler. + /// Max chaos chosen for a round will deviate from this + /// + public static readonly CVarDef + EventsRampingAverageChaos = CVarDef.Create("events.ramping_average_chaos", 6f, CVar.ARCHIVE | CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Explosion.cs b/Content.Shared/CCVar/CCVars.Explosion.cs new file mode 100644 index 0000000000..51d93456b7 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Explosion.cs @@ -0,0 +1,108 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// How many tiles the explosion system will process per tick + /// + /// + /// Setting this too high will put a large load on a single tick. Setting this too low will lead to + /// unnaturally "slow" explosions. + /// + public static readonly CVarDef ExplosionTilesPerTick = + CVarDef.Create("explosion.tiles_per_tick", 100, CVar.SERVERONLY); + + /// + /// Upper limit on the size of an explosion before physics-throwing is disabled. + /// + /// + /// Large nukes tend to generate a lot of shrapnel that flies through space. This can functionally cripple + /// the server TPS for a while after an explosion (or even during, if the explosion is processed + /// incrementally. + /// + public static readonly CVarDef ExplosionThrowLimit = + CVarDef.Create("explosion.throw_limit", 400, CVar.SERVERONLY); + + /// + /// If this is true, explosion processing will pause the NodeGroupSystem to pause updating. + /// + /// + /// This only takes effect if an explosion needs more than one tick to process (i.e., covers more than tiles). If this is not enabled, the node-system will rebuild its graph + /// every tick as the explosion shreds the station, causing significant slowdown. + /// + public static readonly CVarDef ExplosionSleepNodeSys = + CVarDef.Create("explosion.node_sleep", true, CVar.SERVERONLY); + + /// + /// Upper limit on the total area that an explosion can affect before the neighbor-finding algorithm just + /// stops. Defaults to a 60-rile radius explosion. + /// + /// + /// Actual area may be larger, as it currently doesn't terminate mid neighbor finding. I.e., area may be that of a ~51 tile radius circle instead. + /// + public static readonly CVarDef ExplosionMaxArea = + CVarDef.Create("explosion.max_area", (int)3.14f * 256 * 256, CVar.SERVERONLY); + + /// + /// Upper limit on the number of neighbor finding steps for the explosion system neighbor-finding algorithm. + /// + /// + /// Effectively places an upper limit on the range that any explosion can have. In the vast majority of + /// instances, will likely be hit before this becomes a limiting factor. + /// + public static readonly CVarDef ExplosionMaxIterations = + CVarDef.Create("explosion.max_iterations", 500, CVar.SERVERONLY); + + /// + /// Max Time in milliseconds to spend processing explosions every tick. + /// + /// + /// This time limiting is not perfectly implemented. Firstly, a significant chunk of processing time happens + /// due to queued entity deletions, which happen outside of the system update code. Secondly, explosion + /// spawning cannot currently be interrupted & resumed, and may lead to exceeding this time limit. + /// + public static readonly CVarDef ExplosionMaxProcessingTime = + CVarDef.Create("explosion.max_tick_time", 7f, CVar.SERVERONLY); + + /// + /// If the explosion is being processed incrementally over several ticks, this variable determines whether + /// updating the grid tiles should be done incrementally at the end of every tick, or only once the explosion has finished processing. + /// + /// + /// The most notable consequence of this change is that explosions will only punch a hole in the station & + /// create a vacumm once they have finished exploding. So airlocks will no longer slam shut as the explosion + /// expands, just suddenly at the end. + /// + public static readonly CVarDef ExplosionIncrementalTileBreaking = + CVarDef.Create("explosion.incremental_tile", false, CVar.SERVERONLY); + + /// + /// This determines for how many seconds an explosion should stay visible once it has finished expanding. + /// + public static readonly CVarDef ExplosionPersistence = + CVarDef.Create("explosion.persistence", 1.0f, CVar.SERVERONLY); + + /// + /// If an explosion covers a larger area than this number, the damaging/processing will always start during + /// the next tick, instead of during the same tick that the explosion was generated in. + /// + /// + /// This value can be used to ensure that for large explosions the area/tile calculation and the explosion + /// processing/damaging occurs in separate ticks. This helps reduce the single-tick lag if both and are large. I.e., instead of + /// a single tick explosion, this cvar allows for a configuration that results in a two-tick explosion, + /// though most of the computational cost is still in the second tick. + /// + public static readonly CVarDef ExplosionSingleTickAreaLimit = + CVarDef.Create("explosion.single_tick_area_limit", 400, CVar.SERVERONLY); + + /// + /// Whether or not explosions are allowed to create tiles that have + /// set to true. + /// + public static readonly CVarDef ExplosionCanCreateVacuum = + CVarDef.Create("explosion.can_create_vacuum", true, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.FOV.cs b/Content.Shared/CCVar/CCVars.FOV.cs new file mode 100644 index 0000000000..7983a8525f --- /dev/null +++ b/Content.Shared/CCVar/CCVars.FOV.cs @@ -0,0 +1,19 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// The number by which the current FOV size is divided for each level. + /// + public static readonly CVarDef ZoomLevelStep = + CVarDef.Create("fov.zoom_step", 1.2f, CVar.SERVER | CVar.REPLICATED); + + /// + /// How many times the player can zoom in until they reach the minimum zoom. + /// This does not affect the maximum zoom. + /// + public static readonly CVarDef ZoomLevels = + CVarDef.Create("fov.zoom_levels", 7, CVar.SERVER | CVar.REPLICATED); +} diff --git a/Content.Shared/CCVar/CCVars.Game.Infolinks.cs b/Content.Shared/CCVar/CCVars.Game.Infolinks.cs new file mode 100644 index 0000000000..fa8332b497 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Game.Infolinks.cs @@ -0,0 +1,54 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Link to Discord server to show in the launcher. + /// + public static readonly CVarDef InfoLinksDiscord = + CVarDef.Create("infolinks.discord", "", CVar.SERVER | CVar.REPLICATED); + + /// + /// Link to website to show in the launcher. + /// + public static readonly CVarDef InfoLinksForum = + CVarDef.Create("infolinks.forum", "", CVar.SERVER | CVar.REPLICATED); + + /// + /// Link to GitHub page to show in the launcher. + /// + public static readonly CVarDef InfoLinksGithub = + CVarDef.Create("infolinks.github", "", CVar.SERVER | CVar.REPLICATED); + + /// + /// Link to website to show in the launcher. + /// + public static readonly CVarDef InfoLinksWebsite = + CVarDef.Create("infolinks.website", "", CVar.SERVER | CVar.REPLICATED); + + /// + /// Link to wiki to show in the launcher. + /// + public static readonly CVarDef InfoLinksWiki = + CVarDef.Create("infolinks.wiki", "", CVar.SERVER | CVar.REPLICATED); + + /// + /// Link to Patreon. Not shown in the launcher currently. + /// + public static readonly CVarDef InfoLinksPatreon = + CVarDef.Create("infolinks.patreon", "", CVar.SERVER | CVar.REPLICATED); + + /// + /// Link to the bug report form. + /// + public static readonly CVarDef InfoLinksBugReport = + CVarDef.Create("infolinks.bug_report", "", CVar.SERVER | CVar.REPLICATED); + + /// + /// Link to site handling ban appeals. Shown in ban disconnect messages. + /// + public static readonly CVarDef InfoLinksAppeal = + CVarDef.Create("infolinks.appeal", "", CVar.SERVER | CVar.REPLICATED); +} diff --git a/Content.Shared/CCVar/CCVars.Game.cs b/Content.Shared/CCVar/CCVars.Game.cs new file mode 100644 index 0000000000..a1ee8ef8e6 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Game.cs @@ -0,0 +1,396 @@ +using Content.Shared.Roles; +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Disables most functionality in the GameTicker. + /// + public static readonly CVarDef + GameDummyTicker = CVarDef.Create("game.dummyticker", false, CVar.ARCHIVE | CVar.SERVERONLY); + + /// + /// Controls if the lobby is enabled. If it is not, and there are no available jobs, you may get stuck on a black screen. + /// + public static readonly CVarDef + GameLobbyEnabled = CVarDef.Create("game.lobbyenabled", true, CVar.ARCHIVE); + + /// + /// Controls the duration of the lobby timer in seconds. Defaults to 2 minutes and 30 seconds. + /// + public static readonly CVarDef + GameLobbyDuration = CVarDef.Create("game.lobbyduration", 150, CVar.ARCHIVE); + + /// + /// Controls if players can latejoin at all. + /// + public static readonly CVarDef + GameDisallowLateJoins = CVarDef.Create("game.disallowlatejoins", false, CVar.ARCHIVE | CVar.SERVERONLY); + + /// + /// Controls the default game preset. + /// + public static readonly CVarDef + GameLobbyDefaultPreset = CVarDef.Create("game.defaultpreset", "secret", CVar.ARCHIVE); + + /// + /// Controls if the game can force a different preset if the current preset's criteria are not met. + /// + public static readonly CVarDef + GameLobbyFallbackEnabled = CVarDef.Create("game.fallbackenabled", true, CVar.ARCHIVE); + + /// + /// The preset for the game to fall back to if the selected preset could not be used, and fallback is enabled. + /// + public static readonly CVarDef + GameLobbyFallbackPreset = CVarDef.Create("game.fallbackpreset", "Traitor,Extended", CVar.ARCHIVE); + + /// + /// Controls if people can win the game in Suspicion or Deathmatch. + /// + public static readonly CVarDef + GameLobbyEnableWin = CVarDef.Create("game.enablewin", true, CVar.ARCHIVE); + + /// + /// Minimum time between Basic station events in seconds + /// + public static readonly CVarDef // 5 Minutes + GameEventsBasicMinimumTime = CVarDef.Create("game.events_basic_minimum_time", 300, CVar.SERVERONLY | CVar.ARCHIVE); + + /// + /// Maximum time between Basic station events in seconds + /// + public static readonly CVarDef // 25 Minutes + GameEventsBasicMaximumTime = CVarDef.Create("game.events_basic_maximum_time", 1500, CVar.SERVERONLY | CVar.ARCHIVE); + + /// + /// Minimum time between Ramping station events in seconds + /// + public static readonly CVarDef // 4 Minutes + GameEventsRampingMinimumTime = CVarDef.Create("game.events_ramping_minimum_time", 240, CVar.SERVERONLY | CVar.ARCHIVE); + + /// + /// Maximum time between Ramping station events in seconds + /// + public static readonly CVarDef // 12 Minutes + GameEventsRampingMaximumTime = CVarDef.Create("game.events_ramping_maximum_time", 720, CVar.SERVERONLY | CVar.ARCHIVE); + + /// + /// Minimum time between Oscillating station events in seconds. This is the bare minimum which will never be violated, unlike with ramping events. + /// + public static readonly CVarDef // 40 seconds + GameEventsOscillatingMinimumTime = CVarDef.Create("game.events_oscillating_minimum_time", 40, CVar.SERVERONLY | CVar.ARCHIVE); + + /// + /// Time between Oscillating station events in seconds at 1x chaos level. Events may occur at larger intervals if current chaos is lower than that. + /// + public static readonly CVarDef // 20 Minutes - which constitutes a minimum of 120 seconds between events in Irregular and 280 seconds in Extended Irregular + GameEventsOscillatingAverageTime = CVarDef.Create("game.events_oscillating_average_time", 1200, CVar.SERVERONLY | CVar.ARCHIVE); + + /// + /// Controls the maximum number of character slots a player is allowed to have. + /// + public static readonly CVarDef + GameMaxCharacterSlots = CVarDef.Create("game.maxcharacterslots", 30, CVar.ARCHIVE | CVar.SERVERONLY); + + /// + /// Controls the game map prototype to load. SS14 stores these prototypes in Prototypes/Maps. + /// + public static readonly CVarDef + GameMap = CVarDef.Create("game.map", string.Empty, CVar.SERVERONLY); + + /// + /// If roles should be restricted based on whether or not they are whitelisted. + /// + public static readonly CVarDef + GameRoleWhitelist = CVarDef.Create("game.role_whitelist", true, CVar.SERVER | CVar.REPLICATED); + + + /// + /// Controls whether to use world persistence or not. + /// + public static readonly CVarDef + UsePersistence = CVarDef.Create("game.usepersistence", false, CVar.ARCHIVE); + + /// + /// If world persistence is used, what map prototype should be initially loaded. + /// If the save file exists, it replaces MapPath but everything else stays the same (station name and such). + /// + public static readonly CVarDef + PersistenceMap = CVarDef.Create("game.persistencemap", "Empty", CVar.ARCHIVE); + + /// + /// Prototype to use for map pool. + /// + public static readonly CVarDef + GameMapPool = CVarDef.Create("game.map_pool", "DefaultMapPool", CVar.SERVERONLY); + + /// + /// The depth of the queue used to calculate which map is next in rotation. + /// This is how long the game "remembers" that some map was put in play. Default is 16 rounds. + /// + public static readonly CVarDef + GameMapMemoryDepth = CVarDef.Create("game.map_memory_depth", 16, CVar.SERVERONLY); + + /// + /// Is map rotation enabled? + /// + public static readonly CVarDef + GameMapRotation = CVarDef.Create("game.map_rotation", true, CVar.SERVERONLY); + + /// + /// If roles should be restricted based on time. + /// + public static readonly CVarDef + GameRoleTimers = CVarDef.Create("game.role_timers", true, CVar.SERVER | CVar.REPLICATED); + + /// + /// Whether or not disconnecting inside of a cryopod should remove the character or just store them until they reconnect. + /// + public static readonly CVarDef + GameCryoSleepRejoining = CVarDef.Create("game.cryo_sleep_rejoining", false, CVar.SERVER | CVar.REPLICATED); + + /// + /// When enabled, guests will be assigned permanent UIDs and will have their preferences stored. + /// + public static readonly CVarDef GamePersistGuests = + CVarDef.Create("game.persistguests", true, CVar.ARCHIVE | CVar.SERVERONLY); + + public static readonly CVarDef GameDiagonalMovement = + CVarDef.Create("game.diagonalmovement", true, CVar.ARCHIVE); + + public static readonly CVarDef SoftMaxPlayers = + CVarDef.Create("game.soft_max_players", 30, CVar.SERVERONLY | CVar.ARCHIVE); + + /// + /// If a player gets denied connection to the server, + /// how long they are forced to wait before attempting to reconnect. + /// + public static readonly CVarDef GameServerFullReconnectDelay = + CVarDef.Create("game.server_full_reconnect_delay", 30, CVar.SERVERONLY); + + /// + /// Whether or not panic bunker is currently enabled. + /// + public static readonly CVarDef PanicBunkerEnabled = + CVarDef.Create("game.panic_bunker.enabled", false, CVar.NOTIFY | CVar.REPLICATED); + + /// + /// Whether or not the panic bunker will disable when an admin comes online. + /// + public static readonly CVarDef PanicBunkerDisableWithAdmins = + CVarDef.Create("game.panic_bunker.disable_with_admins", false, CVar.SERVERONLY); + + /// + /// Whether or not the panic bunker will enable when no admins are online. + /// + public static readonly CVarDef PanicBunkerEnableWithoutAdmins = + CVarDef.Create("game.panic_bunker.enable_without_admins", false, CVar.SERVERONLY); + + /// + /// Whether or not the panic bunker will count deadminned admins for + /// and + /// + /// + public static readonly CVarDef PanicBunkerCountDeadminnedAdmins = + CVarDef.Create("game.panic_bunker.count_deadminned_admins", false, CVar.SERVERONLY); + + /// + /// Show reason of disconnect for user or not. + /// + public static readonly CVarDef PanicBunkerShowReason = + CVarDef.Create("game.panic_bunker.show_reason", false, CVar.SERVERONLY); + + /// + /// Minimum age of the account (from server's PoV, so from first-seen date) in hours. + /// + public static readonly CVarDef PanicBunkerMinAccountAge = + CVarDef.Create("game.panic_bunker.min_account_age", 24, CVar.SERVERONLY); + + /// + /// Minimal overall played time. + /// + public static readonly CVarDef PanicBunkerMinOverallHours = + CVarDef.Create("game.panic_bunker.min_overall_hours", 10, CVar.SERVERONLY); + + /// + /// A custom message that will be used for connections denied to the panic bunker + /// If not empty, then will overwrite + /// + public static readonly CVarDef PanicBunkerCustomReason = + CVarDef.Create("game.panic_bunker.custom_reason", string.Empty, CVar.SERVERONLY); + + /// + /// Allow bypassing the panic bunker if the user is whitelisted. + /// + public static readonly CVarDef BypassBunkerWhitelist = + CVarDef.Create("game.panic_bunker.whitelisted_can_bypass", true, CVar.SERVERONLY); + + /* + * TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future. + */ + + /// + /// Whether the baby jail is currently enabled. + /// + public static readonly CVarDef BabyJailEnabled = + CVarDef.Create("game.baby_jail.enabled", false, CVar.NOTIFY | CVar.REPLICATED | CVar.SERVER); + + /// + /// Show reason of disconnect for user or not. + /// + public static readonly CVarDef BabyJailShowReason = + CVarDef.Create("game.baby_jail.show_reason", false, CVar.SERVERONLY); + + /// + /// Maximum age of the account (from server's PoV, so from first-seen date) in hours that can access baby + /// jailed servers. + /// + public static readonly CVarDef BabyJailMaxAccountAge = + CVarDef.Create("game.baby_jail.max_account_age", 24, CVar.SERVERONLY); + + /// + /// Maximum overall played time allowed to access baby jailed servers. + /// + public static readonly CVarDef BabyJailMaxOverallHours = + CVarDef.Create("game.baby_jail.max_overall_hours", 2, CVar.SERVERONLY); + + /// + /// A custom message that will be used for connections denied due to the baby jail. + /// If not empty, then will overwrite + /// + public static readonly CVarDef BabyJailCustomReason = + CVarDef.Create("game.baby_jail.custom_reason", string.Empty, CVar.SERVERONLY); + + /// + /// Allow bypassing the baby jail if the user is whitelisted. + /// + public static readonly CVarDef BypassBabyJailWhitelist = + CVarDef.Create("game.baby_jail.whitelisted_can_bypass", true, CVar.SERVERONLY); + + /// + /// Make people bonk when trying to climb certain objects like tables. + /// + public static readonly CVarDef GameTableBonk = + CVarDef.Create("game.table_bonk", false, CVar.REPLICATED); + + /// + /// Whether or not status icons are rendered for everyone. + /// + public static readonly CVarDef GlobalStatusIconsEnabled = + CVarDef.Create("game.global_status_icons_enabled", true, CVar.SERVER | CVar.REPLICATED); + + /// + /// Whether or not status icons are rendered on this specific client. + /// + public static readonly CVarDef LocalStatusIconsEnabled = + CVarDef.Create("game.local_status_icons_enabled", true, CVar.CLIENTONLY); + + /// + /// Whether or not coordinates on the Debug overlay should only be available to admins. + /// + public static readonly CVarDef DebugCoordinatesAdminOnly = + CVarDef.Create("game.debug_coordinates_admin_only", true, CVar.SERVER | CVar.REPLICATED); + + + /// + /// Whether to allow characters to select traits. + /// + public static readonly CVarDef GameTraitsEnabled = + CVarDef.Create("game.traits_enabled", true, CVar.REPLICATED); + + /// + /// How many traits a character can have at most. + /// + public static readonly CVarDef GameTraitsMax = + CVarDef.Create("game.traits_max", 14, CVar.REPLICATED); + + /// + /// How many points a character should start with. + /// + public static readonly CVarDef GameTraitsDefaultPoints = + CVarDef.Create("game.traits_default_points", 10, CVar.REPLICATED); + + /// + /// Whether the game will SMITE people who used cheat engine to spawn with all of the traits. + /// Illegal trait totals will still be logged even if this is disabled. + /// If you are intending to decrease the trait points availability, or modify the costs of traits, consider temporarily disabling this. + /// + public static readonly CVarDef TraitsPunishCheaters = + CVarDef.Create("game.traits_punish_cheaters", false, CVar.REPLICATED); + + /// + /// Whether to allow characters to select loadout items. + /// + public static readonly CVarDef GameLoadoutsEnabled = + CVarDef.Create("game.loadouts_enabled", true, CVar.REPLICATED); + + /// + /// How many points to give to each player for loadouts. + /// + public static readonly CVarDef GameLoadoutsPoints = + CVarDef.Create("game.loadouts_points", 14, CVar.REPLICATED); + + + /// + /// Whether to repeat eating doafters after completion + /// + public static readonly CVarDef GameAutoEatFood = + CVarDef.Create("game.auto_eat_food", false, CVar.REPLICATED); + + /// + /// Whether to repeat drinking doafters after completion + /// + public static readonly CVarDef GameAutoEatDrinks = + CVarDef.Create("game.auto_eat_drinks", false, CVar.REPLICATED); + + /// + /// Whether item slots, such as power cell slots or AME fuel cell slots, should support quick swap if it is not otherwise specified in their YAML prototype. + /// + public static readonly CVarDef AllowSlotQuickSwap = + CVarDef.Create("game.slot_quick_swap", false, CVar.REPLICATED); + +#if EXCEPTION_TOLERANCE + /// + /// Amount of times round start must fail before the server is shut down. + /// Set to 0 or a negative number to disable. + /// + public static readonly CVarDef RoundStartFailShutdownCount = + CVarDef.Create("game.round_start_fail_shutdown_count", 5, CVar.SERVERONLY | CVar.SERVER); +#endif + + /// + /// Delay between station alert level changes. + /// + public static readonly CVarDef GameAlertLevelChangeDelay = + CVarDef.Create("game.alert_level_change_delay", 30, CVar.SERVERONLY); + + /// + /// The time in seconds that the server should wait before restarting the round. + /// Defaults to 2 minutes. + /// + public static readonly CVarDef RoundRestartTime = + CVarDef.Create("game.round_restart_time", 120f, CVar.SERVERONLY); + + /// + /// The prototype to use for secret weights. + /// + public static readonly CVarDef SecretWeightPrototype = + CVarDef.Create("game.secret_weight_prototype", "Secret", CVar.SERVERONLY); + + /// + /// The id of the sound collection to randomly choose a sound from and play when the round ends. + /// + public static readonly CVarDef RoundEndSoundCollection = + CVarDef.Create("game.round_end_sound_collection", "RoundEnd", CVar.SERVERONLY); + + /// + /// Set to true to enable the dynamic hostname system. + /// Automatically updates the hostname to include current map and preset. + /// Configure what that looks like for you in Resources/Prototypes/Locale/en-US/dynamichostname/hostname.ftl + /// + public static readonly CVarDef UseDynamicHostname = + CVarDef.Create("game.use_dynamic_hostname", false, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Ghost.cs b/Content.Shared/CCVar/CCVars.Ghost.cs new file mode 100644 index 0000000000..c0a91668ae --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Ghost.cs @@ -0,0 +1,24 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// The time you must spend reading the rules, before the "Request" button is enabled + /// + public static readonly CVarDef GhostRoleTime = + CVarDef.Create("ghost.role_time", 8f, CVar.REPLICATED | CVar.SERVER); + + /// + /// If ghost role lotteries should be made near-instanteous. + /// + public static readonly CVarDef GhostQuickLottery = + CVarDef.Create("ghost.quick_lottery", false, CVar.SERVERONLY); + + /// + /// Whether or not to kill the player's mob on ghosting, when it is in a critical health state. + /// + public static readonly CVarDef GhostKillCrit = + CVarDef.Create("ghost.kill_crit", true, CVar.REPLICATED | CVar.SERVER); +} diff --git a/Content.Shared/CCVar/CCVars.GhostRespawn.cs b/Content.Shared/CCVar/CCVars.GhostRespawn.cs new file mode 100644 index 0000000000..9eb3e6aa46 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.GhostRespawn.cs @@ -0,0 +1,15 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef GhostRespawnTime = + CVarDef.Create("ghost.respawn_time", 15d, CVar.SERVERONLY); + + public static readonly CVarDef GhostRespawnMaxPlayers = + CVarDef.Create("ghost.respawn_max_players", 40, CVar.SERVERONLY); + + public static readonly CVarDef GhostAllowSameCharacter = + CVarDef.Create("ghost.allow_same_character", false, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.HeightSliders.cs b/Content.Shared/CCVar/CCVars.HeightSliders.cs new file mode 100644 index 0000000000..c49ae5d512 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.HeightSliders.cs @@ -0,0 +1,27 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Whether height & width sliders adjust a character's Fixture Component + /// + public static readonly CVarDef HeightAdjustModifiesHitbox = + CVarDef.Create("heightadjust.modifies_hitbox", true, CVar.SERVERONLY); + + /// + /// Whether height & width sliders adjust a player's max view distance + /// + public static readonly CVarDef HeightAdjustModifiesZoom = + CVarDef.Create("heightadjust.modifies_zoom", false, CVar.SERVERONLY); + + /// + /// Whether height & width sliders adjust a player's bloodstream volume. + /// + /// + /// This can be configured more precisely by modifying BloodstreamAffectedByMassComponent. + /// + public static readonly CVarDef HeightAdjustModifiesBloodstream = + CVarDef.Create("heightadjust.modifies_bloodstream", true, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Hud.cs b/Content.Shared/CCVar/CCVars.Hud.cs new file mode 100644 index 0000000000..f1adbb1851 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Hud.cs @@ -0,0 +1,27 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef HudTheme = + CVarDef.Create("hud.theme", 0, CVar.ARCHIVE | CVar.CLIENTONLY); + + public static readonly CVarDef HudHeldItemShow = + CVarDef.Create("hud.held_item_show", true, CVar.ARCHIVE | CVar.CLIENTONLY); + + public static readonly CVarDef OfferModeIndicatorsPointShow = + CVarDef.Create("hud.offer_mode_indicators_point_show", true, CVar.ARCHIVE | CVar.CLIENTONLY); + + public static readonly CVarDef CombatModeIndicatorsPointShow = + CVarDef.Create("hud.combat_mode_indicators_point_show", true, CVar.ARCHIVE | CVar.CLIENTONLY); + + public static readonly CVarDef LoocAboveHeadShow = + CVarDef.Create("hud.show_looc_above_head", true, CVar.ARCHIVE | CVar.CLIENTONLY); + + public static readonly CVarDef HudHeldItemOffset = + CVarDef.Create("hud.held_item_offset", 28f, CVar.ARCHIVE | CVar.CLIENTONLY); + + public static readonly CVarDef HudFpsCounterVisible = + CVarDef.Create("hud.fps_counter_visible", false, CVar.CLIENTONLY | CVar.ARCHIVE); +} diff --git a/Content.Shared/CCVar/CCVars.Ic.cs b/Content.Shared/CCVar/CCVars.Ic.cs new file mode 100644 index 0000000000..51839030c5 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Ic.cs @@ -0,0 +1,48 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Restricts IC character names to alphanumeric chars. + /// + public static readonly CVarDef RestrictedNames = + CVarDef.Create("ic.restricted_names", true, CVar.SERVER | CVar.REPLICATED); + + /// + /// Allows flavor text (character descriptions) + /// + public static readonly CVarDef FlavorText = + CVarDef.Create("ic.flavor_text", true, CVar.SERVER | CVar.REPLICATED); + + /// + /// Adds a period at the end of a sentence if the sentence ends in a letter. + /// + public static readonly CVarDef ChatPunctuation = + CVarDef.Create("ic.punctuation", true, CVar.SERVER); + + /// + /// Enables automatically forcing IC name rules. Uppercases the first letter of the first and last words of the name + /// + public static readonly CVarDef ICNameCase = + CVarDef.Create("ic.name_case", true, CVar.SERVER | CVar.REPLICATED); + + /// + /// Whether or not players' characters are randomly generated rather than using their selected characters in the creator. + /// + public static readonly CVarDef ICRandomCharacters = + CVarDef.Create("ic.random_characters", false, CVar.SERVER); + + /// + /// A weighted random prototype used to determine the species selected for random characters. + /// + public static readonly CVarDef ICRandomSpeciesWeights = + CVarDef.Create("ic.random_species_weights", "SpeciesWeights", CVar.SERVER); + + /// + /// Control displaying SSD indicators near players + /// + public static readonly CVarDef ICShowSSDIndicator = + CVarDef.Create("ic.show_ssd_indicator", false, CVar.CLIENTONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Interactions.cs b/Content.Shared/CCVar/CCVars.Interactions.cs new file mode 100644 index 0000000000..6838dde363 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Interactions.cs @@ -0,0 +1,60 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Deadzone for drag-drop interactions. + /// + public static readonly CVarDef DragDropDeadZone = + CVarDef.Create("control.drag_dead_zone", 12f, CVar.CLIENTONLY | CVar.ARCHIVE); + + /// + /// Toggles whether the walking key is a toggle or a held key. + /// + public static readonly CVarDef ToggleWalk = + CVarDef.Create("control.toggle_walk", false, CVar.CLIENTONLY | CVar.ARCHIVE); + + /// + /// Whether the player mob is walking by default instead of running. + /// + public static readonly CVarDef DefaultWalk = + CVarDef.Create("control.default_walk", true, CVar.CLIENT | CVar.REPLICATED | CVar.ARCHIVE); + + // The rationale behind the default limit is simply that I can easily get to 7 interactions per second by just + // trying to spam toggle a light switch or lever (though the UseDelay component limits the actual effect of the + // interaction). I don't want to accidentally spam admins with alerts just because somebody is spamming a + // key manually, nor do we want to alert them just because the player is having network issues and the server + // receives multiple interactions at once. But we also want to try catch people with modified clients that spam + // many interactions on the same tick. Hence, a very short period, with a relatively high count. + + /// + /// Maximum number of interactions that a player can perform within seconds + /// + public static readonly CVarDef InteractionRateLimitCount = + CVarDef.Create("interaction.rate_limit_count", 5, CVar.SERVER | CVar.REPLICATED); + + /// + public static readonly CVarDef InteractionRateLimitPeriod = + CVarDef.Create("interaction.rate_limit_period", 0.5f, CVar.SERVER | CVar.REPLICATED); + + /// + /// Minimum delay (in seconds) between notifying admins about interaction rate limit violations. A negative + /// value disables admin announcements. + /// + public static readonly CVarDef InteractionRateLimitAnnounceAdminsDelay = + CVarDef.Create("interaction.rate_limit_announce_admins_delay", 120, CVar.SERVERONLY); + + /// + /// Whether or not the storage UI is static and bound to the hotbar, or unbound and allowed to be dragged anywhere. + /// + public static readonly CVarDef StaticStorageUI = + CVarDef.Create("control.static_storage_ui", true, CVar.CLIENTONLY | CVar.ARCHIVE); + + /// + /// Whether or not the storage window uses a transparent or opaque sprite. + /// + public static readonly CVarDef OpaqueStorageWindow = + CVarDef.Create("control.opaque_storage_background", false, CVar.CLIENTONLY | CVar.ARCHIVE); +} diff --git a/Content.Shared/CCVar/CCVars.Interface.cs b/Content.Shared/CCVar/CCVars.Interface.cs new file mode 100644 index 0000000000..542b3e796c --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Interface.cs @@ -0,0 +1,27 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef UIClickSound = + CVarDef.Create("interface.click_sound", "/Audio/UserInterface/click.ogg", CVar.REPLICATED); + + public static readonly CVarDef UIHoverSound = + CVarDef.Create("interface.hover_sound", "/Audio/UserInterface/hover.ogg", CVar.REPLICATED); + + public static readonly CVarDef UILayout = + CVarDef.Create("ui.layout", "Separated", CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef OverlayScreenChatSize = + CVarDef.Create("ui.overlay_chat_size", "", CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef DefaultScreenChatSize = + CVarDef.Create("ui.default_chat_size", "", CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef SeparatedScreenChatSize = + CVarDef.Create("ui.separated_chat_size", "0.6,0", CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef OutlineEnabled = + CVarDef.Create("outline.enabled", true, CVar.CLIENTONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Jetpack.cs b/Content.Shared/CCVar/CCVars.Jetpack.cs new file mode 100644 index 0000000000..638ba414c8 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Jetpack.cs @@ -0,0 +1,18 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// When true, Jetpacks can be enabled anywhere, even in gravity. + /// + public static readonly CVarDef JetpackEnableAnywhere = + CVarDef.Create("jetpack.enable_anywhere", false, CVar.REPLICATED); + + /// + /// When true, jetpacks can be enabled on grids that have zero gravity. + /// + public static readonly CVarDef JetpackEnableInNoGravity = + CVarDef.Create("jetpack.enable_in_no_gravity", true, CVar.REPLICATED); +} diff --git a/Content.Shared/CCVar/CCVars.LayingDown.cs b/Content.Shared/CCVar/CCVars.LayingDown.cs new file mode 100644 index 0000000000..aebd59b9f1 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.LayingDown.cs @@ -0,0 +1,18 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef AutoGetUp = + CVarDef.Create("rest.auto_get_up", true, CVar.CLIENT | CVar.ARCHIVE | CVar.REPLICATED); + + public static readonly CVarDef HoldLookUp = + CVarDef.Create("rest.hold_look_up", false, CVar.CLIENT | CVar.ARCHIVE); + + /// + /// When true, players can choose to crawl under tables while laying down, using the designated keybind. + /// + public static readonly CVarDef CrawlUnderTables = + CVarDef.Create("rest.crawlundertables", true, CVar.SERVER | CVar.ARCHIVE); +} diff --git a/Content.Shared/CCVar/CCVars.Mapping.cs b/Content.Shared/CCVar/CCVars.Mapping.cs new file mode 100644 index 0000000000..06cd2870ba --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Mapping.cs @@ -0,0 +1,24 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Will mapping mode enable autosaves when it's activated? + /// + public static readonly CVarDef + AutosaveEnabled = CVarDef.Create("mapping.autosave", true, CVar.SERVERONLY); + + /// + /// Autosave interval in seconds. + /// + public static readonly CVarDef + AutosaveInterval = CVarDef.Create("mapping.autosave_interval", 600f, CVar.SERVERONLY); + + /// + /// Directory in server user data to save to. Saves will be inside folders in this directory. + /// + public static readonly CVarDef + AutosaveDirectory = CVarDef.Create("mapping.autosave_dir", "Autosaves", CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.MaterialReclaimer.cs b/Content.Shared/CCVar/CCVars.MaterialReclaimer.cs new file mode 100644 index 0000000000..79e28d2323 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.MaterialReclaimer.cs @@ -0,0 +1,12 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Whether or not a Material Reclaimer is allowed to eat people when emagged. + /// + public static readonly CVarDef ReclaimerAllowGibbing = + CVarDef.Create("reclaimer.allow_gibbing", true, CVar.SERVER); +} diff --git a/Content.Shared/CCVar/CCVars.MaterialSilo.cs b/Content.Shared/CCVar/CCVars.MaterialSilo.cs new file mode 100644 index 0000000000..ab7710f83d --- /dev/null +++ b/Content.Shared/CCVar/CCVars.MaterialSilo.cs @@ -0,0 +1,12 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Is ore material enabled. + /// + public static readonly CVarDef SiloEnabled = + CVarDef.Create("silo.silo_enabled", true, CVar.SERVER | CVar.REPLICATED); +} diff --git a/Content.Shared/CCVar/CCVars.Midi.cs b/Content.Shared/CCVar/CCVars.Midi.cs new file mode 100644 index 0000000000..4ca4bfd6f8 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Midi.cs @@ -0,0 +1,18 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef MaxMidiEventsPerSecond = + CVarDef.Create("midi.max_events_per_second", 1000, CVar.REPLICATED | CVar.SERVER); + + public static readonly CVarDef MaxMidiEventsPerBatch = + CVarDef.Create("midi.max_events_per_batch", 60, CVar.REPLICATED | CVar.SERVER); + + public static readonly CVarDef MaxMidiBatchesDropped = + CVarDef.Create("midi.max_batches_dropped", 1, CVar.SERVERONLY); + + public static readonly CVarDef MaxMidiLaggedBatches = + CVarDef.Create("midi.max_lagged_batches", 8, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Misc.cs b/Content.Shared/CCVar/CCVars.Misc.cs new file mode 100644 index 0000000000..00e153ff8e --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Misc.cs @@ -0,0 +1,103 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef HolidaysEnabled = CVarDef.Create("holidays.enabled", true, CVar.SERVERONLY); + public static readonly CVarDef BrandingSteam = CVarDef.Create("branding.steam", false, CVar.CLIENTONLY); + public static readonly CVarDef EntityMenuGroupingType = CVarDef.Create("entity_menu", 0, CVar.CLIENTONLY); + + /// + /// Should we pre-load all of the procgen atlasses. + /// + public static readonly CVarDef ProcgenPreload = + CVarDef.Create("procgen.preload", true, CVar.SERVERONLY); + + /// + /// Enabled: Cloning has 70% cost and reclaimer will refuse to reclaim corpses with souls. (For LRP). + /// Disabled: Cloning has full biomass cost and reclaimer can reclaim corpses with souls. (Playtested and balanced for MRP+). + /// + public static readonly CVarDef BiomassEasyMode = + CVarDef.Create("biomass.easy_mode", true, CVar.SERVERONLY); + + /// + /// A scale factor applied to a grid's bounds when trying to find a spot to randomly generate an anomaly. + /// + public static readonly CVarDef AnomalyGenerationGridBoundsScale = + CVarDef.Create("anomaly.generation_grid_bounds_scale", 0.6f, CVar.SERVERONLY); + + /// + /// How long a client can go without any input before being considered AFK. + /// + public static readonly CVarDef AfkTime = + CVarDef.Create("afk.time", 60f, CVar.SERVERONLY); + + /// + /// Flavor limit. This is to ensure that having a large mass of flavors in + /// some food object won't spam a user with flavors. + /// + public static readonly CVarDef + FlavorLimit = CVarDef.Create("flavor.limit", 10, CVar.SERVERONLY); + + public static readonly CVarDef DestinationFile = + CVarDef.Create("autogen.destination_file", "", CVar.SERVER | CVar.SERVERONLY); + + /// + /// Whether uploaded files will be stored in the server's database. + /// This is useful to keep "logs" on what files admins have uploaded in the past. + /// + public static readonly CVarDef ResourceUploadingStoreEnabled = + CVarDef.Create("netres.store_enabled", true, CVar.SERVER | CVar.SERVERONLY); + + /// + /// Numbers of days before stored uploaded files are deleted. Set to zero or negative to disable auto-delete. + /// This is useful to free some space automatically. Auto-deletion runs only on server boot. + /// + public static readonly CVarDef ResourceUploadingStoreDeletionDays = + CVarDef.Create("netres.store_deletion_days", 30, CVar.SERVER | CVar.SERVERONLY); + + /// + /// If a server update restart is pending, the delay after the last player leaves before we actually restart. In seconds. + /// + public static readonly CVarDef UpdateRestartDelay = + CVarDef.Create("update.restart_delay", 20f, CVar.SERVERONLY); + + /// + /// If fire alarms should have all access, or if activating/resetting these + /// should be restricted to what is dictated on a player's access card. + /// Defaults to true. + /// + public static readonly CVarDef FireAlarmAllAccess = + CVarDef.Create("firealarm.allaccess", true, CVar.SERVERONLY); + + /// + /// Time between play time autosaves, in seconds. + /// + public static readonly CVarDef + PlayTimeSaveInterval = CVarDef.Create("playtime.save_interval", 900f, CVar.SERVERONLY); + + /// + /// The maximum amount of time the entity GC can process, in ms. + /// + public static readonly CVarDef GCMaximumTimeMs = + CVarDef.Create("entgc.maximum_time_ms", 5, CVar.SERVERONLY); + + public static readonly CVarDef GatewayGeneratorEnabled = + CVarDef.Create("gateway.generator_enabled", true); + + public static readonly CVarDef TippyEntity = + CVarDef.Create("tippy.entity", "Tippy", CVar.SERVER | CVar.REPLICATED); + + /// + /// The number of seconds that must pass for a single entity to be able to point at something again. + /// + public static readonly CVarDef PointingCooldownSeconds = + CVarDef.Create("pointing.cooldown_seconds", 0.5f, CVar.SERVERONLY); + + /// + /// The amount of time between NPC Silicons draining their battery in seconds. + /// + public static readonly CVarDef SiliconNpcUpdateTime = + CVarDef.Create("silicon.npcupdatetime", 1.5f, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Mood.cs b/Content.Shared/CCVar/CCVars.Mood.cs new file mode 100644 index 0000000000..3775a6b0e5 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Mood.cs @@ -0,0 +1,26 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /* + * Mood System + */ + + public static readonly CVarDef MoodEnabled = +#if RELEASE + CVarDef.Create("mood.enabled", true, CVar.SERVER); +#else + CVarDef.Create("mood.enabled", false, CVar.SERVER); +#endif + + public static readonly CVarDef MoodIncreasesSpeed = + CVarDef.Create("mood.increases_speed", true, CVar.SERVER); + + public static readonly CVarDef MoodDecreasesSpeed = + CVarDef.Create("mood.decreases_speed", true, CVar.SERVER); + + public static readonly CVarDef MoodModifiesThresholds = + CVarDef.Create("mood.modify_thresholds", false, CVar.SERVER); +} diff --git a/Content.Shared/CCVar/CCVars.NPC.cs b/Content.Shared/CCVar/CCVars.NPC.cs new file mode 100644 index 0000000000..f0d5520195 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.NPC.cs @@ -0,0 +1,16 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef NPCMaxUpdates = + CVarDef.Create("npc.max_updates", 128); + + public static readonly CVarDef NPCEnabled = CVarDef.Create("npc.enabled", true); + + /// + /// Should NPCs pathfind when steering. For debug purposes. + /// + public static readonly CVarDef NPCPathfinding = CVarDef.Create("npc.pathfinding", true); +} diff --git a/Content.Shared/CCVar/CCVars.Net.cs b/Content.Shared/CCVar/CCVars.Net.cs new file mode 100644 index 0000000000..b7465def2e --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Net.cs @@ -0,0 +1,15 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef NetAtmosDebugOverlayTickRate = + CVarDef.Create("net.atmosdbgoverlaytickrate", 3.0f); + + public static readonly CVarDef NetGasOverlayTickRate = + CVarDef.Create("net.gasoverlaytickrate", 3.0f); + + public static readonly CVarDef GasOverlayThresholds = + CVarDef.Create("net.gasoverlaythresholds", 20); +} diff --git a/Content.Shared/CCVar/CCVars.Parallax.cs b/Content.Shared/CCVar/CCVars.Parallax.cs new file mode 100644 index 0000000000..9b19c8f494 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Parallax.cs @@ -0,0 +1,15 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef ParallaxEnabled = + CVarDef.Create("parallax.enabled", true, CVar.CLIENTONLY); + + public static readonly CVarDef ParallaxDebug = + CVarDef.Create("parallax.debug", false, CVar.CLIENTONLY); + + public static readonly CVarDef ParallaxLowQuality = + CVarDef.Create("parallax.low_quality", false, CVar.ARCHIVE | CVar.CLIENTONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Physics.cs b/Content.Shared/CCVar/CCVars.Physics.cs new file mode 100644 index 0000000000..379676b5df --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Physics.cs @@ -0,0 +1,27 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// When a mob is walking should its X / Y movement be relative to its parent (true) or the map (false). + /// + public static readonly CVarDef RelativeMovement = + CVarDef.Create("physics.relative_movement", true, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); + + public static readonly CVarDef TileFrictionModifier = + CVarDef.Create("physics.tile_friction", 40.0f, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); + + public static readonly CVarDef StopSpeed = + CVarDef.Create("physics.stop_speed", 0.1f, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); + + /// + /// Whether mobs can push objects like lockers. + /// + /// + /// Technically client doesn't need to know about it but this may prevent a bug in the distant future so it stays. + /// + public static readonly CVarDef MobPushing = + CVarDef.Create("physics.mob_pushing", false, CVar.REPLICATED | CVar.SERVER); +} diff --git a/Content.Shared/CCVar/CCVars.Psionics.cs b/Content.Shared/CCVar/CCVars.Psionics.cs new file mode 100644 index 0000000000..71c8a19495 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Psionics.cs @@ -0,0 +1,40 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Whether glimmer is enabled. + /// + public static readonly CVarDef GlimmerEnabled = + CVarDef.Create("glimmer.enabled", true, CVar.REPLICATED); + + /// + /// The rate at which glimmer linearly decays. Since glimmer increases (usually) follow a logistic curve, this means glimmer + /// becomes increasingly harder to raise after ~502 points. + /// + public static readonly CVarDef GlimmerLinearDecayPerMinute = + CVarDef.Create("glimmer.linear_decay_per_minute", 6f, CVar.SERVERONLY); + + /// + /// Whether random rolls for psionics are allowed. + /// Guaranteed psionics will still go through. + /// + public static readonly CVarDef PsionicRollsEnabled = + CVarDef.Create("psionics.rolls_enabled", true, CVar.SERVERONLY); + + /// + /// When mindbroken, permanently eject the player from their own body, and turn their character into an NPC. + /// Congratulations, now they *actually* aren't a person anymore. + /// For people who complained that it wasn't obvious enough from the text that Mindbreaking is a form of Murder. + /// + public static readonly CVarDef ScarierMindbreaking = + CVarDef.Create("psionics.scarier_mindbreaking", false, CVar.SERVERONLY); + + /// + /// Allow Ethereal Ent to PassThrough Walls/Objects while in Ethereal. + /// + public static readonly CVarDef EtherealPassThrough = + CVarDef.Create("ic.EtherealPassThrough", false, CVar.SERVER); +} diff --git a/Content.Shared/CCVar/CCVars.Queue.cs b/Content.Shared/CCVar/CCVars.Queue.cs new file mode 100644 index 0000000000..170cefce5e --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Queue.cs @@ -0,0 +1,13 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Controls if the connections queue is enabled + /// If enabled plyaers will be added to a queue instead of being kicked after SoftMaxPlayers is reached + /// + public static readonly CVarDef QueueEnabled = + CVarDef.Create("queue.enabled", false, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Radiation.cs b/Content.Shared/CCVar/CCVars.Radiation.cs new file mode 100644 index 0000000000..dfcce15b2f --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Radiation.cs @@ -0,0 +1,32 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// What is the smallest radiation dose in rads that can be received by object. + /// Extremely small values may impact performance. + /// + public static readonly CVarDef RadiationMinIntensity = + CVarDef.Create("radiation.min_intensity", 0.1f, CVar.SERVERONLY); + + /// + /// Rate of radiation system update in seconds. + /// + public static readonly CVarDef RadiationGridcastUpdateRate = + CVarDef.Create("radiation.gridcast.update_rate", 1.0f, CVar.SERVERONLY); + + /// + /// If both radiation source and receiver are placed on same grid, ignore grids between them. + /// May get inaccurate result in some cases, but greatly boost performance in general. + /// + public static readonly CVarDef RadiationGridcastSimplifiedSameGrid = + CVarDef.Create("radiation.gridcast.simplified_same_grid", true, CVar.SERVERONLY); + + /// + /// Max distance that radiation ray can travel in meters. + /// + public static readonly CVarDef RadiationGridcastMaxDistance = + CVarDef.Create("radiation.gridcast.max_distance", 50f, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Replays.cs b/Content.Shared/CCVar/CCVars.Replays.cs new file mode 100644 index 0000000000..64f47e8ad8 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Replays.cs @@ -0,0 +1,43 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Whether or not to record admin chat. If replays are being publicly distributes, this should probably be + /// false. + /// + public static readonly CVarDef ReplayRecordAdminChat = + CVarDef.Create("replay.record_admin_chat", false, CVar.ARCHIVE); + + /// + /// Automatically record full rounds as replays. + /// + public static readonly CVarDef ReplayAutoRecord = + CVarDef.Create("replay.auto_record", false, CVar.SERVERONLY); + + /// + /// The file name to record automatic replays to. The path is relative to . + /// + /// + /// + /// If the path includes slashes, directories will be automatically created if necessary. + /// + /// + /// A number of substitutions can be used to automatically fill in the file name: {year}, {month}, {day}, {hour}, {minute}, {round}. + /// + /// + public static readonly CVarDef ReplayAutoRecordName = + CVarDef.Create("replay.auto_record_name", + "{year}_{month}_{day}-{hour}_{minute}-round_{round}.zip", + CVar.SERVERONLY); + + /// + /// Path that, if provided, automatic replays are initially recorded in. + /// When the recording is done, the file is moved into its final destination. + /// Unless this path is rooted, it will be relative to . + /// + public static readonly CVarDef ReplayAutoRecordTempDir = + CVarDef.Create("replay.auto_record_temp_dir", "", CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Salvage.cs b/Content.Shared/CCVar/CCVars.Salvage.cs new file mode 100644 index 0000000000..ddc332786b --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Salvage.cs @@ -0,0 +1,18 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Duration for missions + /// + public static readonly CVarDef + SalvageExpeditionDuration = CVarDef.Create("salvage.expedition_duration", 660f, CVar.REPLICATED); + + /// + /// Cooldown for missions. + /// + public static readonly CVarDef + SalvageExpeditionCooldown = CVarDef.Create("salvage.expedition_cooldown", 780f, CVar.REPLICATED); +} diff --git a/Content.Shared/CCVar/CCVars.Server.cs b/Content.Shared/CCVar/CCVars.Server.cs new file mode 100644 index 0000000000..2c861584af --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Server.cs @@ -0,0 +1,43 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /* + * Server + */ + + /// + /// Change this to have the changelog and rules "last seen" date stored separately. + /// + public static readonly CVarDef ServerId = + CVarDef.Create("server.id", "unknown_server_id", CVar.REPLICATED | CVar.SERVER); + + /// + /// Guide Entry Prototype ID to be displayed as the server rules. + /// + public static readonly CVarDef RulesFile = + CVarDef.Create("server.rules_file", "DefaultRuleset", CVar.REPLICATED | CVar.SERVER); + + /// + /// Guide entry that is displayed by default when a guide is opened. + /// + public static readonly CVarDef DefaultGuide = + CVarDef.Create("server.default_guide", "NewPlayer", CVar.REPLICATED | CVar.SERVER); + + /// + /// If greater than 0, automatically restart the server after this many minutes of uptime. + /// + /// + /// + /// This is intended to work around various bugs and performance issues caused by long continuous server uptime. + /// + /// + /// This uses the same non-disruptive logic as update restarts, + /// i.e. the game will only restart at round end or when there is nobody connected. + /// + /// + public static readonly CVarDef ServerUptimeRestartMinutes = + CVarDef.Create("server.uptime_restart_minutes", 0, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Shuttle.cs b/Content.Shared/CCVar/CCVars.Shuttle.cs new file mode 100644 index 0000000000..485343a834 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Shuttle.cs @@ -0,0 +1,189 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + // Look this is technically eye behavior but its main impact is shuttles so I just dumped it here. + /// + /// If true then the camera will match the grid / map and is unchangeable. + /// - When traversing grids it will snap to 0 degrees rotation. + /// False means the player has control over the camera rotation. + /// - When traversing grids it will snap to the nearest cardinal which will generally be imperceptible. + /// + public static readonly CVarDef CameraRotationLocked = + CVarDef.Create("shuttle.camera_rotation_locked", false, CVar.REPLICATED); + + /// + /// Whether the arrivals terminal should be on a planet map. + /// + public static readonly CVarDef ArrivalsPlanet = + CVarDef.Create("shuttle.arrivals_planet", false, CVar.SERVERONLY); + + /// + /// Whether the arrivals shuttle is enabled. + /// + public static readonly CVarDef ArrivalsShuttles = + CVarDef.Create("shuttle.arrivals", true, CVar.SERVERONLY); + + /// + /// The map to use for the arrivals station. + /// + public static readonly CVarDef ArrivalsMap = + CVarDef.Create("shuttle.arrivals_map", "/Maps/Misc/terminal.yml", CVar.SERVERONLY); + + /// + /// Cooldown between arrivals departures. This should be longer than the FTL time or it will double cycle. + /// + public static readonly CVarDef ArrivalsCooldown = + CVarDef.Create("shuttle.arrivals_cooldown", 50f, CVar.SERVERONLY); + + /// + /// Time it takes the shuttle to spin up it's hyper drive and jump + /// + public static readonly CVarDef ArrivalsStartupTime= + CVarDef.Create("shuttle.arrivals_startup_time", 5.5f, CVar.SERVERONLY); + + /// + /// Time spent in hyperspace + /// + public static readonly CVarDef ArrivalsHyperspaceTime = + CVarDef.Create("shuttle.arrivals_hyperspace_time", 20f, CVar.SERVERONLY); + + /// + /// Are players allowed to return on the arrivals shuttle. + /// + public static readonly CVarDef ArrivalsReturns = + CVarDef.Create("shuttle.arrivals_returns", false, CVar.SERVERONLY); + + /// + /// Should all players who spawn at arrivals have godmode until they leave the map? + /// + public static readonly CVarDef GodmodeArrivals = + CVarDef.Create("shuttle.godmode_arrivals", false, CVar.SERVERONLY); + + /// + /// If a grid is split then hide any smaller ones under this mass (kg) from the map. + /// This is useful to avoid split grids spamming out labels. + /// + public static readonly CVarDef HideSplitGridsUnder = + CVarDef.Create("shuttle.hide_split_grids_under", 30, CVar.SERVERONLY); + + /// + /// Whether to automatically spawn escape shuttles. + /// + public static readonly CVarDef GridFill = + CVarDef.Create("shuttle.grid_fill", true, CVar.SERVERONLY); + + /// + /// Whether to automatically preloading grids by GridPreloaderSystem + /// + public static readonly CVarDef PreloadGrids = + CVarDef.Create("shuttle.preload_grids", true, CVar.SERVERONLY); + + /// + /// How long the warmup time before FTL start should be. + /// + public static readonly CVarDef FTLStartupTime = + CVarDef.Create("shuttle.startup_time", 5.5f, CVar.SERVERONLY); + + /// + /// How long a shuttle spends in FTL. + /// + public static readonly CVarDef FTLTravelTime = + CVarDef.Create("shuttle.travel_time", 20f, CVar.SERVERONLY); + + /// + /// How long the final stage of FTL before arrival should be. + /// + public static readonly CVarDef FTLArrivalTime = + CVarDef.Create("shuttle.arrival_time", 5f, CVar.SERVERONLY); + + /// + /// How much time needs to pass before a shuttle can FTL again. + /// + public static readonly CVarDef FTLCooldown = + CVarDef.Create("shuttle.cooldown", 10f, CVar.SERVERONLY); + + /// + /// The maximum a grid can have before it becomes unable to FTL. + /// Any value equal to or less than zero will disable this check. + /// + public static readonly CVarDef FTLMassLimit = + CVarDef.Create("shuttle.mass_limit", 300f, CVar.SERVERONLY); + + /// + /// How long to knock down entities for if they aren't buckled when FTL starts and stops. + /// + public static readonly CVarDef HyperspaceKnockdownTime = + CVarDef.Create("shuttle.hyperspace_knockdown_time", 5f, CVar.SERVERONLY); + + /// + /// the Entropic decay of energy combined with the minimal but existent particles that would slow the vessel down + /// + public static readonly CVarDef SpaceFrictionStrength = + CVarDef.Create("shuttle.space_friction_strength", 0.0015f, CVar.REPLICATED); + + /// + /// the strength of drag when the inertia dampeners are set to anchor to slow the vessel down and hold it in place + /// + public static readonly CVarDef AnchorDampeningStrength = + CVarDef.Create("shuttle.ancho_dampening_strength", 0.5f, CVar.REPLICATED); + + /// + /// Is the emergency shuttle allowed to be early launched. + /// + public static readonly CVarDef EmergencyEarlyLaunchAllowed = + CVarDef.Create("shuttle.emergency_early_launch_allowed", false, CVar.SERVERONLY); + + /// + /// How long the emergency shuttle remains docked with the station, in seconds. + /// + public static readonly CVarDef EmergencyShuttleDockTime = + CVarDef.Create("shuttle.emergency_dock_time", 240f, CVar.SERVERONLY); + + /// + /// How long after the console is authorized for the shuttle to early launch. + /// + public static readonly CVarDef EmergencyShuttleAuthorizeTime = + CVarDef.Create("shuttle.emergency_authorize_time", 10f, CVar.SERVERONLY); + + /// + /// The minimum time for the emergency shuttle to arrive at centcomm. + /// Actual minimum travel time cannot be less than + /// + public static readonly CVarDef EmergencyShuttleMinTransitTime = + CVarDef.Create("shuttle.emergency_transit_time_min", 90f, CVar.SERVERONLY); + + /// + /// The maximum time for the emergency shuttle to arrive at centcomm. + /// + public static readonly CVarDef EmergencyShuttleMaxTransitTime = + CVarDef.Create("shuttle.emergency_transit_time_max", 180f, CVar.SERVERONLY); + + /// + /// Whether the emergency shuttle is enabled or should the round just end. + /// + public static readonly CVarDef EmergencyShuttleEnabled = + CVarDef.Create("shuttle.emergency", true, CVar.SERVERONLY); + + /// + /// The percentage of time passed from the initial call to when the shuttle can no longer be recalled. + /// ex. a call time of 10min and turning point of 0.5 means the shuttle cannot be recalled after 5 minutes. + /// + public static readonly CVarDef EmergencyRecallTurningPoint = + CVarDef.Create("shuttle.recall_turning_point", 0.5f, CVar.SERVERONLY); + + /// + /// Time in minutes after round start to auto-call the shuttle. Set to zero to disable. + /// + public static readonly CVarDef EmergencyShuttleAutoCallTime = + CVarDef.Create("shuttle.auto_call_time", 120, CVar.SERVERONLY); + + /// + /// Time in minutes after the round was extended (by recalling the shuttle) to call + /// the shuttle again. + /// + public static readonly CVarDef EmergencyShuttleAutoCallExtensionTime = + CVarDef.Create("shuttle.auto_call_extension_time", 30, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.SoftCrit.cs b/Content.Shared/CCVar/CCVars.SoftCrit.cs new file mode 100644 index 0000000000..2e3d141249 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.SoftCrit.cs @@ -0,0 +1,25 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Used for basic Soft-Crit implementation. Entities are allowed to crawl when in crit, as this CVar intercepts the mover controller check for incapacitation, + /// and prevents it from stopping movement if this CVar is set to true and the user is Crit but Not Dead. This is only for movement, + /// you still can't stand up while crit, and you're still more or less helpless. + /// + public static readonly CVarDef AllowMovementWhileCrit = + CVarDef.Create("mobstate.allow_movement_while_crit", true, CVar.REPLICATED); + + public static readonly CVarDef AllowTalkingWhileCrit = + CVarDef.Create("mobstate.allow_talking_while_crit", true, CVar.REPLICATED); + + /// + /// Currently does nothing because I would have to figure out WHERE I would even put this check, and the mover controller is fairly complicated. + /// The goal is to make it so that attempting to move while in 'soft crit' can potentially cause further injury, causing you to die faster. Ideally there would be special + /// actions that can be performed in soft crit, such as applying pressure to your own injuries to slow down the bleedout, or other varieties of "Will To Live". + /// + public static readonly CVarDef DamageWhileCritMove = + CVarDef.Create("mobstate.damage_while_crit_move", false, CVar.REPLICATED); +} diff --git a/Content.Shared/CCVar/CCVars.Sounds.cs b/Content.Shared/CCVar/CCVars.Sounds.cs new file mode 100644 index 0000000000..6e781d6e07 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Sounds.cs @@ -0,0 +1,30 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef LobbyMusicEnabled = + CVarDef.Create("ambience.lobby_music_enabled", true, CVar.ARCHIVE | CVar.CLIENTONLY); + + public static readonly CVarDef EventMusicEnabled = + CVarDef.Create("ambience.event_music_enabled", true, CVar.ARCHIVE | CVar.CLIENTONLY); + + /// + /// Round end sound (APC Destroyed) + /// + public static readonly CVarDef RestartSoundsEnabled = + CVarDef.Create("ambience.restart_sounds_enabled", true, CVar.ARCHIVE | CVar.CLIENTONLY); + + public static readonly CVarDef AdminSoundsEnabled = + CVarDef.Create("audio.admin_sounds_enabled", true, CVar.ARCHIVE | CVar.CLIENTONLY); + + public static readonly CVarDef AdminChatSoundPath = + CVarDef.Create("audio.admin_chat_sound_path", "/Audio/Items/pop.ogg", CVar.ARCHIVE | CVar.CLIENT | CVar.REPLICATED); + + public static readonly CVarDef AdminChatSoundVolume = + CVarDef.Create("audio.admin_chat_sound_volume", -5f, CVar.ARCHIVE | CVar.CLIENT | CVar.REPLICATED); + + public static readonly CVarDef AHelpSound = + CVarDef.Create("audio.ahelp_sound", "/Audio/Effects/adminhelp.ogg", CVar.ARCHIVE | CVar.CLIENTONLY); +} diff --git a/Content.Shared/CCVar/CCVars.StationGoals.cs b/Content.Shared/CCVar/CCVars.StationGoals.cs new file mode 100644 index 0000000000..91090cd401 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.StationGoals.cs @@ -0,0 +1,18 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Enables station goals + /// + public static readonly CVarDef StationGoalsEnabled = + CVarDef.Create("game.station_goals", true, CVar.SERVERONLY); + + /// + /// Chance for a station goal to be sent + /// + public static readonly CVarDef StationGoalsChance = + CVarDef.Create("game.station_goals_chance", 0.1f, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Status.cs b/Content.Shared/CCVar/CCVars.Status.cs new file mode 100644 index 0000000000..007f678106 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Status.cs @@ -0,0 +1,13 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef StatusMoMMIUrl = + CVarDef.Create("status.mommiurl", "", CVar.SERVERONLY); + + public static readonly CVarDef StatusMoMMIPassword = + CVarDef.Create("status.mommipassword", "", CVar.SERVERONLY | CVar.CONFIDENTIAL); + +} diff --git a/Content.Shared/CCVar/CCVars.Supermatter.cs b/Content.Shared/CCVar/CCVars.Supermatter.cs new file mode 100644 index 0000000000..8aea6524ae --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Supermatter.cs @@ -0,0 +1,52 @@ +using Content.Shared.Supermatter.Components; +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// With completely default supermatter values, Singuloose delamination will occur if engineers inject at least 900 moles of coolant per tile + /// in the crystal chamber. For reference, a gas canister contains 1800 moles of air. This Cvar directly multiplies the amount of moles required to singuloose. + /// + public static readonly CVarDef SupermatterSingulooseMolesModifier = + CVarDef.Create("supermatter.singuloose_moles_modifier", 1f, CVar.SERVER); + + /// + /// Toggles whether or not Singuloose delaminations can occur. If both Singuloose and Tesloose are disabled, it will always delam into a Nuke. + /// + public static readonly CVarDef SupermatterDoSingulooseDelam = + CVarDef.Create("supermatter.do_singuloose", true, CVar.SERVER); + + /// + /// By default, Supermatter will "Tesloose" if the conditions for Singuloose are not met, and the core's power is at least 4000. + /// The actual reasons for being at least this amount vary by how the core was screwed up, but traditionally it's caused by "The core is on fire". + /// This Cvar multiplies said power threshold for the purpose of determining if the delam is a Tesloose. + /// + public static readonly CVarDef SupermatterTesloosePowerModifier = + CVarDef.Create("supermatter.tesloose_power_modifier", 1f, CVar.SERVER); + + /// + /// Toggles whether or not Tesloose delaminations can occur. If both Singuloose and Tesloose are disabled, it will always delam into a Nuke. + /// + public static readonly CVarDef SupermatterDoTeslooseDelam = + CVarDef.Create("supermatter.do_tesloose", true, CVar.SERVER); + + /// + /// When true, bypass the normal checks to determine delam type, and instead use the type chosen by supermatter.forced_delam_type + /// + public static readonly CVarDef SupermatterDoForceDelam = + CVarDef.Create("supermatter.do_force_delam", false, CVar.SERVER); + + /// + /// If supermatter.do_force_delam is true, this determines the delamination type, bypassing the normal checks. + /// + public static readonly CVarDef SupermatterForcedDelamType = + CVarDef.Create("supermatter.forced_delam_type", DelamType.Singulo, CVar.SERVER); + + /// + /// Directly multiplies the amount of rads put out by the supermatter. Be VERY conservative with this. + /// + public static readonly CVarDef SupermatterRadsModifier = + CVarDef.Create("supermatter.rads_modifier", 1f, CVar.SERVER); +} diff --git a/Content.Shared/CCVar/CCVars.Surgery.cs b/Content.Shared/CCVar/CCVars.Surgery.cs new file mode 100644 index 0000000000..f3fcf83610 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Surgery.cs @@ -0,0 +1,9 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef CanOperateOnSelf = + CVarDef.Create("surgery.can_operate_on_self", false, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Tips.cs b/Content.Shared/CCVar/CCVars.Tips.cs new file mode 100644 index 0000000000..61e6342061 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Tips.cs @@ -0,0 +1,40 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Whether tips being shown is enabled at all. + /// + public static readonly CVarDef TipsEnabled = + CVarDef.Create("tips.enabled", true); + + /// + /// The dataset prototype to use when selecting a random tip. + /// + public static readonly CVarDef TipsDataset = + CVarDef.Create("tips.dataset", "Tips"); + + /// + /// The number of seconds between each tip being displayed when the round is not actively going + /// (i.e. postround or lobby) + /// + public static readonly CVarDef TipFrequencyOutOfRound = + CVarDef.Create("tips.out_of_game_frequency", 60f * 1.5f); + + /// + /// The number of seconds between each tip being displayed when the round is actively going + /// + public static readonly CVarDef TipFrequencyInRound = + CVarDef.Create("tips.in_game_frequency", 60f * 60); + + public static readonly CVarDef LoginTipsDataset = + CVarDef.Create("tips.login_dataset", "Tips"); + + /// + /// The chance for Tippy to replace a normal tip message. + /// + public static readonly CVarDef TipsTippyChance = + CVarDef.Create("tips.tippy_chance", 0.01f); +} diff --git a/Content.Shared/CCVar/CCVars.Viewport.cs b/Content.Shared/CCVar/CCVars.Viewport.cs new file mode 100644 index 0000000000..d94394d2a7 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Viewport.cs @@ -0,0 +1,33 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + public static readonly CVarDef ViewportStretch = + CVarDef.Create("viewport.stretch", true, CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef ViewportFixedScaleFactor = + CVarDef.Create("viewport.fixed_scale_factor", 2, CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef ViewportSnapToleranceMargin = + CVarDef.Create("viewport.snap_tolerance_margin", 64, CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef ViewportSnapToleranceClip = + CVarDef.Create("viewport.snap_tolerance_clip", 32, CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef ViewportScaleRender = + CVarDef.Create("viewport.scale_render", true, CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef ViewportMinimumWidth = + CVarDef.Create("viewport.minimum_width", 15, CVar.REPLICATED | CVar.SERVER); + + public static readonly CVarDef ViewportMaximumWidth = + CVarDef.Create("viewport.maximum_width", 21, CVar.REPLICATED | CVar.SERVER); + + public static readonly CVarDef ViewportWidth = + CVarDef.Create("viewport.width", 21, CVar.CLIENTONLY | CVar.ARCHIVE); + + public static readonly CVarDef ViewportVerticalFit = + CVarDef.Create("viewport.vertical_fit", true, CVar.CLIENTONLY | CVar.ARCHIVE); +} diff --git a/Content.Shared/CCVar/CCVars.Vote.cs b/Content.Shared/CCVar/CCVars.Vote.cs new file mode 100644 index 0000000000..cc3bddd06c --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Vote.cs @@ -0,0 +1,180 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Allows enabling/disabling player-started votes for ultimate authority + /// + public static readonly CVarDef VoteEnabled = + CVarDef.Create("vote.enabled", true, CVar.SERVERONLY); + + /// + /// See vote.enabled, but specific to restart votes + /// + public static readonly CVarDef VoteRestartEnabled = + CVarDef.Create("vote.restart_enabled", true, CVar.SERVERONLY); + + /// + /// Config for when the restart vote should be allowed to be called regardless with less than this amount of players. + /// + public static readonly CVarDef VoteRestartMaxPlayers = + CVarDef.Create("vote.restart_max_players", 20, CVar.SERVERONLY); + + /// + /// Config for when the restart vote should be allowed to be called based on percentage of ghosts. + /// + public static readonly CVarDef VoteRestartGhostPercentage = + CVarDef.Create("vote.restart_ghost_percentage", 75, CVar.SERVERONLY); + + /// + /// See vote.enabled, but specific to preset votes + /// + public static readonly CVarDef VotePresetEnabled = + CVarDef.Create("vote.preset_enabled", false, CVar.SERVERONLY); + + /// + /// See vote.enabled, but specific to map votes + /// + public static readonly CVarDef VoteMapEnabled = + CVarDef.Create("vote.map_enabled", false, CVar.SERVERONLY); + + /// + /// The required ratio of the server that must agree for a restart round vote to go through. + /// + public static readonly CVarDef VoteRestartRequiredRatio = + CVarDef.Create("vote.restart_required_ratio", 0.85f, CVar.SERVERONLY); + + /// + /// Whether or not to prevent the restart vote from having any effect when there is an online admin + /// + public static readonly CVarDef VoteRestartNotAllowedWhenAdminOnline = + CVarDef.Create("vote.restart_not_allowed_when_admin_online", true, CVar.SERVERONLY); + + /// + /// The delay which two votes of the same type are allowed to be made by separate people, in seconds. + /// + public static readonly CVarDef VoteSameTypeTimeout = + CVarDef.Create("vote.same_type_timeout", 240f, CVar.SERVERONLY); + + /// + /// Sets the duration of the map vote timer. + /// + public static readonly CVarDef + VoteTimerMap = CVarDef.Create("vote.timermap", 90, CVar.SERVERONLY); + + /// + /// Sets the duration of the restart vote timer. + /// + public static readonly CVarDef + VoteTimerRestart = CVarDef.Create("vote.timerrestart", 60, CVar.SERVERONLY); + + /// + /// Sets the duration of the gamemode/preset vote timer. + /// + public static readonly CVarDef + VoteTimerPreset = CVarDef.Create("vote.timerpreset", 30, CVar.SERVERONLY); + + /// + /// Sets the duration of the map vote timer when ALONE. + /// + public static readonly CVarDef + VoteTimerAlone = CVarDef.Create("vote.timeralone", 10, CVar.SERVERONLY); + + /// + /// Allows enabling/disabling player-started votekick for ultimate authority + /// + public static readonly CVarDef VotekickEnabled = + CVarDef.Create("votekick.enabled", true, CVar.SERVERONLY); + + /// + /// Config for when the votekick should be allowed to be called based on number of eligible voters. + /// + public static readonly CVarDef VotekickEligibleNumberRequirement = + CVarDef.Create("votekick.eligible_number", 5, CVar.SERVERONLY); + + /// + /// Whether a votekick initiator must be a ghost or not. + /// + public static readonly CVarDef VotekickInitiatorGhostRequirement = + CVarDef.Create("votekick.initiator_ghost_requirement", true, CVar.SERVERONLY); + + /// + /// Should the initiator be whitelisted to initiate a votekick? + /// + public static readonly CVarDef VotekickInitiatorWhitelistedRequirement = + CVarDef.Create("votekick.initiator_whitelist_requirement", true, CVar.SERVERONLY); + + /// + /// Should the initiator be able to start a votekick if they are bellow the votekick.voter_playtime requirement? + /// + public static readonly CVarDef VotekickInitiatorTimeRequirement = + CVarDef.Create("votekick.initiator_time_requirement", false, CVar.SERVERONLY); + + /// + /// Whether a votekick voter must be a ghost or not. + /// + public static readonly CVarDef VotekickVoterGhostRequirement = + CVarDef.Create("votekick.voter_ghost_requirement", true, CVar.SERVERONLY); + + /// + /// Config for how many hours playtime a player must have to be able to vote on a votekick. + /// + public static readonly CVarDef VotekickEligibleVoterPlaytime = + CVarDef.Create("votekick.voter_playtime", 100, CVar.SERVERONLY); + + /// + /// Config for how many seconds a player must have been dead to initiate a votekick / be able to vote on a votekick. + /// + public static readonly CVarDef VotekickEligibleVoterDeathtime = + CVarDef.Create("votekick.voter_deathtime", 30, CVar.REPLICATED | CVar.SERVER); + + /// + /// The required ratio of eligible voters that must agree for a votekick to go through. + /// + public static readonly CVarDef VotekickRequiredRatio = + CVarDef.Create("votekick.required_ratio", 0.6f, CVar.SERVERONLY); + + /// + /// Whether or not to prevent the votekick from having any effect when there is an online admin. + /// + public static readonly CVarDef VotekickNotAllowedWhenAdminOnline = + CVarDef.Create("votekick.not_allowed_when_admin_online", true, CVar.SERVERONLY); + + /// + /// The delay for which two votekicks are allowed to be made by separate people, in seconds. + /// + public static readonly CVarDef VotekickTimeout = + CVarDef.Create("votekick.timeout", 120f, CVar.SERVERONLY); + + /// + /// Sets the duration of the votekick vote timer. + /// + public static readonly CVarDef + VotekickTimer = CVarDef.Create("votekick.timer", 60, CVar.SERVERONLY); + + /// + /// Config for how many hours playtime a player must have to get protection from the Raider votekick type when playing as an antag. + /// + public static readonly CVarDef VotekickAntagRaiderProtection = + CVarDef.Create("votekick.antag_raider_protection", 10, CVar.SERVERONLY); + + /// + /// Default severity for votekick bans + /// + public static readonly CVarDef VotekickBanDefaultSeverity = + CVarDef.Create("votekick.ban_default_severity", "High", CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); + + /// + /// Duration of a ban caused by a votekick (in minutes). + /// + public static readonly CVarDef VotekickBanDuration = + CVarDef.Create("votekick.ban_duration", 180, CVar.SERVERONLY); + + /// + /// Whether the ghost requirement settings for votekicks should be ignored for the lobby. + /// + public static readonly CVarDef VotekickIgnoreGhostReqInLobby = + CVarDef.Create("votekick.ignore_ghost_req_in_lobby", true, CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Whitelist.cs b/Content.Shared/CCVar/CCVars.Whitelist.cs new file mode 100644 index 0000000000..7a7a5206a1 --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Whitelist.cs @@ -0,0 +1,19 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Controls whether the server will deny any players that are not whitelisted in the DB. + /// + public static readonly CVarDef WhitelistEnabled = + CVarDef.Create("whitelist.enabled", false, CVar.SERVERONLY); + + /// + /// Specifies the whitelist prototypes to be used by the server. This should be a comma-separated list of prototypes. + /// If a whitelists conditions to be active fail (for example player count), the next whitelist will be used instead. If no whitelist is valid, the player will be allowed to connect. + /// + public static readonly CVarDef WhitelistPrototypeList = + CVarDef.Create("whitelist.prototype_list", "basicWhitelist", CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.Worldgen.cs b/Content.Shared/CCVar/CCVars.Worldgen.cs new file mode 100644 index 0000000000..da165ce74a --- /dev/null +++ b/Content.Shared/CCVar/CCVars.Worldgen.cs @@ -0,0 +1,18 @@ +using Robust.Shared.Configuration; + +namespace Content.Shared.CCVar; + +public sealed partial class CCVars +{ + /// + /// Whether or not world generation is enabled. + /// + public static readonly CVarDef WorldgenEnabled = + CVarDef.Create("worldgen.enabled", false, CVar.SERVERONLY); + + /// + /// The worldgen config to use. + /// + public static readonly CVarDef WorldgenConfig = + CVarDef.Create("worldgen.worldgen_config", "Default", CVar.SERVERONLY); +} diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs index 62b0850955..316d9b8690 100644 --- a/Content.Shared/CCVar/CCVars.cs +++ b/Content.Shared/CCVar/CCVars.cs @@ -1,3091 +1,28 @@ -using Content.Shared.Maps; -using Content.Shared.Supermatter.Components; using Robust.Shared; using Robust.Shared.Configuration; -using Robust.Shared.Physics.Components; -namespace Content.Shared.CCVar -{ - // ReSharper disable once InconsistentNaming - [CVarDefs] - public sealed class CCVars : CVars - { - #region Server - /* - * Server - */ - - /// - /// Change this to have the changelog and rules "last seen" date stored separately. - /// - public static readonly CVarDef ServerId = - CVarDef.Create("server.id", "unknown_server_id", CVar.REPLICATED | CVar.SERVER); - - /// - /// Guide Entry Prototype ID to be displayed as the server rules. - /// - public static readonly CVarDef RulesFile = - CVarDef.Create("server.rules_file", "DefaultRuleset", CVar.REPLICATED | CVar.SERVER); - - #endregion - #region Ambience - /* - * Ambience - */ - - /// - /// How long we'll wait until re-sampling nearby objects for ambience. Should be pretty fast, but doesn't have to match the tick rate. - /// - public static readonly CVarDef AmbientCooldown = - CVarDef.Create("ambience.cooldown", 0.1f, CVar.ARCHIVE | CVar.CLIENTONLY); - - /// - /// How large of a range to sample for ambience. - /// - public static readonly CVarDef AmbientRange = - CVarDef.Create("ambience.range", 8f, CVar.REPLICATED | CVar.SERVER); - - /// - /// Maximum simultaneous ambient sounds. - /// - public static readonly CVarDef MaxAmbientSources = - CVarDef.Create("ambience.max_sounds", 16, CVar.ARCHIVE | CVar.CLIENTONLY); - - /// - /// The minimum value the user can set for ambience.max_sounds - /// - public static readonly CVarDef MinMaxAmbientSourcesConfigured = - CVarDef.Create("ambience.min_max_sounds_configured", 16, CVar.REPLICATED | CVar.SERVER | CVar.CHEAT); - - /// - /// The maximum value the user can set for ambience.max_sounds - /// - public static readonly CVarDef MaxMaxAmbientSourcesConfigured = - CVarDef.Create("ambience.max_max_sounds_configured", 64, CVar.REPLICATED | CVar.SERVER | CVar.CHEAT); - - /// - /// Ambience volume. - /// - public static readonly CVarDef AmbienceVolume = - CVarDef.Create("ambience.volume", 1.5f, CVar.ARCHIVE | CVar.CLIENTONLY); - - /// - /// Ambience music volume. - /// - public static readonly CVarDef AmbientMusicVolume = - CVarDef.Create("ambience.music_volume", 1.5f, CVar.ARCHIVE | CVar.CLIENTONLY); - - /// - /// Lobby / round end music volume. - /// - public static readonly CVarDef LobbyMusicVolume = - CVarDef.Create("ambience.lobby_music_volume", 0.50f, CVar.ARCHIVE | CVar.CLIENTONLY); - - /// - /// UI volume. - /// - public static readonly CVarDef InterfaceVolume = - CVarDef.Create("audio.interface_volume", 0.50f, CVar.ARCHIVE | CVar.CLIENTONLY); - - #endregion - #region Status - /* - * Status - */ - - public static readonly CVarDef StatusMoMMIUrl = - CVarDef.Create("status.mommiurl", "", CVar.SERVERONLY); - - public static readonly CVarDef StatusMoMMIPassword = - CVarDef.Create("status.mommipassword", "", CVar.SERVERONLY | CVar.CONFIDENTIAL); - - #endregion - #region Events - /* - * Events - */ - - /// - /// Controls if the game should run station events - /// - public static readonly CVarDef - EventsEnabled = CVarDef.Create("events.enabled", true, CVar.ARCHIVE | CVar.SERVERONLY); - - /// - /// Average time (in minutes) for when the ramping event scheduler should stop increasing the chaos modifier. - /// Close to how long you expect a round to last, so you'll probably have to tweak this on downstreams. - /// - public static readonly CVarDef - EventsRampingAverageEndTime = CVarDef.Create("events.ramping_average_end_time", 40f, CVar.ARCHIVE | CVar.SERVERONLY); - - /// - /// Average ending chaos modifier for the ramping event scheduler. - /// Max chaos chosen for a round will deviate from this - /// - public static readonly CVarDef - EventsRampingAverageChaos = CVarDef.Create("events.ramping_average_chaos", 6f, CVar.ARCHIVE | CVar.SERVERONLY); - - #endregion - #region Game - /* - * Game - */ - - /// - /// Disables most functionality in the GameTicker. - /// - public static readonly CVarDef - GameDummyTicker = CVarDef.Create("game.dummyticker", false, CVar.ARCHIVE | CVar.SERVERONLY); - - /// - /// Controls if the lobby is enabled. If it is not, and there are no available jobs, you may get stuck on a black screen. - /// - public static readonly CVarDef - GameLobbyEnabled = CVarDef.Create("game.lobbyenabled", true, CVar.ARCHIVE); - - /// - /// Controls the duration of the lobby timer in seconds. Defaults to 2 minutes and 30 seconds. - /// - public static readonly CVarDef - GameLobbyDuration = CVarDef.Create("game.lobbyduration", 150, CVar.ARCHIVE); - - /// - /// Controls if players can latejoin at all. - /// - public static readonly CVarDef - GameDisallowLateJoins = CVarDef.Create("game.disallowlatejoins", false, CVar.ARCHIVE | CVar.SERVERONLY); - - /// - /// Controls the default game preset. - /// - public static readonly CVarDef - GameLobbyDefaultPreset = CVarDef.Create("game.defaultpreset", "secret", CVar.ARCHIVE); - - /// - /// Controls if the game can force a different preset if the current preset's criteria are not met. - /// - public static readonly CVarDef - GameLobbyFallbackEnabled = CVarDef.Create("game.fallbackenabled", true, CVar.ARCHIVE); - - /// - /// The preset for the game to fall back to if the selected preset could not be used, and fallback is enabled. - /// - public static readonly CVarDef - GameLobbyFallbackPreset = CVarDef.Create("game.fallbackpreset", "Traitor,Extended", CVar.ARCHIVE); - - /// - /// Controls if people can win the game in Suspicion or Deathmatch. - /// - public static readonly CVarDef - GameLobbyEnableWin = CVarDef.Create("game.enablewin", true, CVar.ARCHIVE); - - /// - /// Minimum time between Basic station events in seconds - /// - public static readonly CVarDef // 5 Minutes - GameEventsBasicMinimumTime = CVarDef.Create("game.events_basic_minimum_time", 300, CVar.SERVERONLY | CVar.ARCHIVE); - - /// - /// Maximum time between Basic station events in seconds - /// - public static readonly CVarDef // 25 Minutes - GameEventsBasicMaximumTime = CVarDef.Create("game.events_basic_maximum_time", 1500, CVar.SERVERONLY | CVar.ARCHIVE); - - /// - /// Minimum time between Ramping station events in seconds - /// - public static readonly CVarDef // 4 Minutes - GameEventsRampingMinimumTime = CVarDef.Create("game.events_ramping_minimum_time", 240, CVar.SERVERONLY | CVar.ARCHIVE); - - /// - /// Maximum time between Ramping station events in seconds - /// - public static readonly CVarDef // 12 Minutes - GameEventsRampingMaximumTime = CVarDef.Create("game.events_ramping_maximum_time", 720, CVar.SERVERONLY | CVar.ARCHIVE); - - /// - /// Minimum time between Oscillating station events in seconds. This is the bare minimum which will never be violated, unlike with ramping events. - /// - public static readonly CVarDef // 40 seconds - GameEventsOscillatingMinimumTime = CVarDef.Create("game.events_oscillating_minimum_time", 40, CVar.SERVERONLY | CVar.ARCHIVE); - - /// - /// Time between Oscillating station events in seconds at 1x chaos level. Events may occur at larger intervals if current chaos is lower than that. - /// - public static readonly CVarDef // 20 Minutes - which constitutes a minimum of 120 seconds between events in Irregular and 280 seconds in Extended Irregular - GameEventsOscillatingAverageTime = CVarDef.Create("game.events_oscillating_average_time", 1200, CVar.SERVERONLY | CVar.ARCHIVE); - - /// - /// Controls the maximum number of character slots a player is allowed to have. - /// - public static readonly CVarDef - GameMaxCharacterSlots = CVarDef.Create("game.maxcharacterslots", 30, CVar.ARCHIVE | CVar.SERVERONLY); - - /// - /// Controls the game map prototype to load. SS14 stores these prototypes in Prototypes/Maps. - /// - public static readonly CVarDef - GameMap = CVarDef.Create("game.map", string.Empty, CVar.SERVERONLY); - - /// - /// If roles should be restricted based on whether or not they are whitelisted. - /// - public static readonly CVarDef - GameRoleWhitelist = CVarDef.Create("game.role_whitelist", true, CVar.SERVER | CVar.REPLICATED); - - - /// - /// Controls whether to use world persistence or not. - /// - public static readonly CVarDef - UsePersistence = CVarDef.Create("game.usepersistence", false, CVar.ARCHIVE); - - /// - /// If world persistence is used, what map prototype should be initially loaded. - /// If the save file exists, it replaces MapPath but everything else stays the same (station name and such). - /// - public static readonly CVarDef - PersistenceMap = CVarDef.Create("game.persistencemap", "Empty", CVar.ARCHIVE); - - /// - /// Prototype to use for map pool. - /// - public static readonly CVarDef - GameMapPool = CVarDef.Create("game.map_pool", "DefaultMapPool", CVar.SERVERONLY); - - /// - /// The depth of the queue used to calculate which map is next in rotation. - /// This is how long the game "remembers" that some map was put in play. Default is 16 rounds. - /// - public static readonly CVarDef - GameMapMemoryDepth = CVarDef.Create("game.map_memory_depth", 16, CVar.SERVERONLY); - - /// - /// Is map rotation enabled? - /// - public static readonly CVarDef - GameMapRotation = CVarDef.Create("game.map_rotation", true, CVar.SERVERONLY); - - /// - /// If roles should be restricted based on time. - /// - public static readonly CVarDef - GameRoleTimers = CVarDef.Create("game.role_timers", true, CVar.SERVER | CVar.REPLICATED); - - /// - /// Whether or not disconnecting inside of a cryopod should remove the character or just store them until they reconnect. - /// - public static readonly CVarDef - GameCryoSleepRejoining = CVarDef.Create("game.cryo_sleep_rejoining", false, CVar.SERVER | CVar.REPLICATED); - - /// - /// When enabled, guests will be assigned permanent UIDs and will have their preferences stored. - /// - public static readonly CVarDef GamePersistGuests = - CVarDef.Create("game.persistguests", true, CVar.ARCHIVE | CVar.SERVERONLY); - - public static readonly CVarDef GameDiagonalMovement = - CVarDef.Create("game.diagonalmovement", true, CVar.ARCHIVE); - - public static readonly CVarDef SoftMaxPlayers = - CVarDef.Create("game.soft_max_players", 30, CVar.SERVERONLY | CVar.ARCHIVE); - - /// - /// If a player gets denied connection to the server, - /// how long they are forced to wait before attempting to reconnect. - /// - public static readonly CVarDef GameServerFullReconnectDelay = - CVarDef.Create("game.server_full_reconnect_delay", 30, CVar.SERVERONLY); - - /// - /// Whether or not panic bunker is currently enabled. - /// - public static readonly CVarDef PanicBunkerEnabled = - CVarDef.Create("game.panic_bunker.enabled", false, CVar.NOTIFY | CVar.REPLICATED); - - /// - /// Whether or not the panic bunker will disable when an admin comes online. - /// - public static readonly CVarDef PanicBunkerDisableWithAdmins = - CVarDef.Create("game.panic_bunker.disable_with_admins", false, CVar.SERVERONLY); - - /// - /// Whether or not the panic bunker will enable when no admins are online. - /// - public static readonly CVarDef PanicBunkerEnableWithoutAdmins = - CVarDef.Create("game.panic_bunker.enable_without_admins", false, CVar.SERVERONLY); - - /// - /// Whether or not the panic bunker will count deadminned admins for - /// and - /// - /// - public static readonly CVarDef PanicBunkerCountDeadminnedAdmins = - CVarDef.Create("game.panic_bunker.count_deadminned_admins", false, CVar.SERVERONLY); - - /// - /// Show reason of disconnect for user or not. - /// - public static readonly CVarDef PanicBunkerShowReason = - CVarDef.Create("game.panic_bunker.show_reason", false, CVar.SERVERONLY); - - /// - /// Minimum age of the account (from server's PoV, so from first-seen date) in hours. - /// - public static readonly CVarDef PanicBunkerMinAccountAge = - CVarDef.Create("game.panic_bunker.min_account_age", 24, CVar.SERVERONLY); - - /// - /// Minimal overall played time. - /// - public static readonly CVarDef PanicBunkerMinOverallHours = - CVarDef.Create("game.panic_bunker.min_overall_hours", 10, CVar.SERVERONLY); - - /// - /// A custom message that will be used for connections denied to the panic bunker - /// If not empty, then will overwrite - /// - public static readonly CVarDef PanicBunkerCustomReason = - CVarDef.Create("game.panic_bunker.custom_reason", string.Empty, CVar.SERVERONLY); - - /// - /// Allow bypassing the panic bunker if the user is whitelisted. - /// - public static readonly CVarDef BypassBunkerWhitelist = - CVarDef.Create("game.panic_bunker.whitelisted_can_bypass", true, CVar.SERVERONLY); - - /* - * TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future. - */ - - /// - /// Whether the baby jail is currently enabled. - /// - public static readonly CVarDef BabyJailEnabled = - CVarDef.Create("game.baby_jail.enabled", false, CVar.NOTIFY | CVar.REPLICATED | CVar.SERVER); - - /// - /// Show reason of disconnect for user or not. - /// - public static readonly CVarDef BabyJailShowReason = - CVarDef.Create("game.baby_jail.show_reason", false, CVar.SERVERONLY); - - /// - /// Maximum age of the account (from server's PoV, so from first-seen date) in hours that can access baby - /// jailed servers. - /// - public static readonly CVarDef BabyJailMaxAccountAge = - CVarDef.Create("game.baby_jail.max_account_age", 24, CVar.SERVERONLY); - - /// - /// Maximum overall played time allowed to access baby jailed servers. - /// - public static readonly CVarDef BabyJailMaxOverallHours = - CVarDef.Create("game.baby_jail.max_overall_hours", 2, CVar.SERVERONLY); - - /// - /// A custom message that will be used for connections denied due to the baby jail. - /// If not empty, then will overwrite - /// - public static readonly CVarDef BabyJailCustomReason = - CVarDef.Create("game.baby_jail.custom_reason", string.Empty, CVar.SERVERONLY); - - /// - /// Allow bypassing the baby jail if the user is whitelisted. - /// - public static readonly CVarDef BypassBabyJailWhitelist = - CVarDef.Create("game.baby_jail.whitelisted_can_bypass", true, CVar.SERVERONLY); - - /// - /// Make people bonk when trying to climb certain objects like tables. - /// - public static readonly CVarDef GameTableBonk = - CVarDef.Create("game.table_bonk", false, CVar.REPLICATED); - - /// - /// Whether or not status icons are rendered for everyone. - /// - public static readonly CVarDef GlobalStatusIconsEnabled = - CVarDef.Create("game.global_status_icons_enabled", true, CVar.SERVER | CVar.REPLICATED); - - /// - /// Whether or not status icons are rendered on this specific client. - /// - public static readonly CVarDef LocalStatusIconsEnabled = - CVarDef.Create("game.local_status_icons_enabled", true, CVar.CLIENTONLY); - - /// - /// Whether or not coordinates on the Debug overlay should only be available to admins. - /// - public static readonly CVarDef DebugCoordinatesAdminOnly = - CVarDef.Create("game.debug_coordinates_admin_only", true, CVar.SERVER | CVar.REPLICATED); - - - /// - /// Whether to allow characters to select traits. - /// - public static readonly CVarDef GameTraitsEnabled = - CVarDef.Create("game.traits_enabled", true, CVar.REPLICATED); - - /// - /// How many traits a character can have at most. - /// - public static readonly CVarDef GameTraitsMax = - CVarDef.Create("game.traits_max", 14, CVar.REPLICATED); - - /// - /// How many points a character should start with. - /// - public static readonly CVarDef GameTraitsDefaultPoints = - CVarDef.Create("game.traits_default_points", 10, CVar.REPLICATED); - - /// - /// Whether the game will SMITE people who used cheat engine to spawn with all of the traits. - /// Illegal trait totals will still be logged even if this is disabled. - /// If you are intending to decrease the trait points availability, or modify the costs of traits, consider temporarily disabling this. - /// - public static readonly CVarDef TraitsPunishCheaters = - CVarDef.Create("game.traits_punish_cheaters", false, CVar.REPLICATED); - - /// - /// Whether to allow characters to select loadout items. - /// - public static readonly CVarDef GameLoadoutsEnabled = - CVarDef.Create("game.loadouts_enabled", true, CVar.REPLICATED); - - /// - /// How many points to give to each player for loadouts. - /// - public static readonly CVarDef GameLoadoutsPoints = - CVarDef.Create("game.loadouts_points", 14, CVar.REPLICATED); - - - /// - /// Whether to repeat eating doafters after completion - /// - public static readonly CVarDef GameAutoEatFood = - CVarDef.Create("game.auto_eat_food", false, CVar.REPLICATED); - - /// - /// Whether to repeat drinking doafters after completion - /// - public static readonly CVarDef GameAutoEatDrinks = - CVarDef.Create("game.auto_eat_drinks", false, CVar.REPLICATED); - - /// - /// Whether item slots, such as power cell slots or AME fuel cell slots, should support quick swap if it is not otherwise specified in their YAML prototype. - /// - public static readonly CVarDef AllowSlotQuickSwap = - CVarDef.Create("game.slot_quick_swap", false, CVar.REPLICATED); - -#if EXCEPTION_TOLERANCE - /// - /// Amount of times round start must fail before the server is shut down. - /// Set to 0 or a negative number to disable. - /// - public static readonly CVarDef RoundStartFailShutdownCount = - CVarDef.Create("game.round_start_fail_shutdown_count", 5, CVar.SERVERONLY | CVar.SERVER); -#endif - - /// - /// Delay between station alert level changes. - /// - public static readonly CVarDef GameAlertLevelChangeDelay = - CVarDef.Create("game.alert_level_change_delay", 30, CVar.SERVERONLY); - - /// - /// The time in seconds that the server should wait before restarting the round. - /// Defaults to 2 minutes. - /// - public static readonly CVarDef RoundRestartTime = - CVarDef.Create("game.round_restart_time", 120f, CVar.SERVERONLY); - - /// - /// The prototype to use for secret weights. - /// - public static readonly CVarDef SecretWeightPrototype = - CVarDef.Create("game.secret_weight_prototype", "Secret", CVar.SERVERONLY); - - /// - /// The id of the sound collection to randomly choose a sound from and play when the round ends. - /// - public static readonly CVarDef RoundEndSoundCollection = - CVarDef.Create("game.round_end_sound_collection", "RoundEnd", CVar.SERVERONLY); - - #endregion - #region Announcers - - /* - * Announcers - */ - - /// - /// Weighted list of announcers to choose from - /// - public static readonly CVarDef AnnouncerList = - CVarDef.Create("announcer.list", "RandomAnnouncers", CVar.REPLICATED); - - /// - /// Optionally force set an announcer - /// - public static readonly CVarDef Announcer = - CVarDef.Create("announcer.announcer", "", CVar.SERVERONLY); - - /// - /// Optionally blacklist announcers - /// List of IDs separated by commas - /// - public static readonly CVarDef AnnouncerBlacklist = - CVarDef.Create("announcer.blacklist", "", CVar.SERVERONLY); - - /// - /// Changes how loud the announcers are for the client - /// - public static readonly CVarDef AnnouncerVolume = - CVarDef.Create("announcer.volume", 0.5f, CVar.ARCHIVE | CVar.CLIENTONLY); - - /// - /// Disables multiple announcement sounds from playing at once - /// - public static readonly CVarDef AnnouncerDisableMultipleSounds = - CVarDef.Create("announcer.disable_multiple_sounds", false, CVar.ARCHIVE | CVar.CLIENTONLY); - - - #endregion - #region Queue - /* - * Queue - */ - - /// - /// Controls if the connections queue is enabled - /// If enabled plyaers will be added to a queue instead of being kicked after SoftMaxPlayers is reached - /// - public static readonly CVarDef QueueEnabled = - CVarDef.Create("queue.enabled", false, CVar.SERVERONLY); - - #endregion - #region Discord - - /* - * Discord - */ - - /// - /// The role that will get mentioned if a new SOS ahelp comes in. - /// - public static readonly CVarDef DiscordAhelpMention = - CVarDef.Create("discord.on_call_ping", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL); - - /// - /// URL of the discord webhook to relay unanswered ahelp messages. - /// - public static readonly CVarDef DiscordOnCallWebhook = - CVarDef.Create("discord.on_call_webhook", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL); - - /// - /// URL of the Discord webhook which will relay all ahelp messages. - /// - public static readonly CVarDef DiscordAHelpWebhook = - CVarDef.Create("discord.ahelp_webhook", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL); - - /// - /// The server icon to use in the Discord ahelp embed footer. - /// Valid values are specified at https://discord.com/developers/docs/resources/channel#embed-object-embed-footer-structure. - /// - public static readonly CVarDef DiscordAHelpFooterIcon = - CVarDef.Create("discord.ahelp_footer_icon", string.Empty, CVar.SERVERONLY); - - /// - /// The avatar to use for the webhook. Should be an URL. - /// - public static readonly CVarDef DiscordAHelpAvatar = - CVarDef.Create("discord.ahelp_avatar", string.Empty, CVar.SERVERONLY); - - /// - /// URL of the Discord webhook which will relay all custom votes. If left empty, disables the webhook. - /// - public static readonly CVarDef DiscordVoteWebhook = - CVarDef.Create("discord.vote_webhook", string.Empty, CVar.SERVERONLY); - - /// URL of the Discord webhook which will relay round restart messages. - /// - public static readonly CVarDef DiscordRoundUpdateWebhook = - CVarDef.Create("discord.round_update_webhook", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL); - - /// - /// Role id for the Discord webhook to ping when the round ends. - /// - public static readonly CVarDef DiscordRoundEndRoleWebhook = - CVarDef.Create("discord.round_end_role", string.Empty, CVar.SERVERONLY); - - /// - /// Enable Discord linking, show linking button and modal window - /// - public static readonly CVarDef DiscordAuthEnabled = - CVarDef.Create("discord.auth_enabled", false, CVar.SERVERONLY); - - /// - /// URL of the Discord auth server API - /// - public static readonly CVarDef DiscordAuthApiUrl = - CVarDef.Create("discord.auth_api_url", "", CVar.SERVERONLY); - - /// - /// Secret key of the Discord auth server API - /// - public static readonly CVarDef DiscordAuthApiKey = - CVarDef.Create("discord.auth_api_key", "", CVar.SERVERONLY | CVar.CONFIDENTIAL); - - #endregion - #region Tips - /* - * Tips - */ - - /// - /// Whether tips being shown is enabled at all. - /// - public static readonly CVarDef TipsEnabled = - CVarDef.Create("tips.enabled", true); - - /// - /// The dataset prototype to use when selecting a random tip. - /// - public static readonly CVarDef TipsDataset = - CVarDef.Create("tips.dataset", "Tips"); - - /// - /// The number of seconds between each tip being displayed when the round is not actively going - /// (i.e. postround or lobby) - /// - public static readonly CVarDef TipFrequencyOutOfRound = - CVarDef.Create("tips.out_of_game_frequency", 60f * 1.5f); - - /// - /// The number of seconds between each tip being displayed when the round is actively going - /// - public static readonly CVarDef TipFrequencyInRound = - CVarDef.Create("tips.in_game_frequency", 60f * 60); - - public static readonly CVarDef LoginTipsDataset = - CVarDef.Create("tips.login_dataset", "Tips"); - - /// - /// The chance for Tippy to replace a normal tip message. - /// - public static readonly CVarDef TipsTippyChance = - CVarDef.Create("tips.tippy_chance", 0.01f); - - #endregion - #region Console - /* - * Console - */ - - public static readonly CVarDef ConsoleLoginLocal = - CVarDef.Create("console.loginlocal", true, CVar.ARCHIVE | CVar.SERVERONLY); - - /// - /// Automatically log in the given user as host, equivalent to the promotehost command. - /// - public static readonly CVarDef ConsoleLoginHostUser = - CVarDef.Create("console.login_host_user", "", CVar.ARCHIVE | CVar.SERVERONLY); - - - #endregion - #region Database stuff - /* - * Database stuff - */ - - public static readonly CVarDef DatabaseEngine = - CVarDef.Create("database.engine", "sqlite", CVar.SERVERONLY); - - public static readonly CVarDef DatabaseSqliteDbPath = - CVarDef.Create("database.sqlite_dbpath", "preferences.db", CVar.SERVERONLY); - - /// - /// Milliseconds to asynchronously delay all SQLite database acquisitions with. - /// - /// - /// Defaults to 1 on DEBUG, 0 on RELEASE. - /// This is intended to help catch .Result deadlock bugs that only happen on postgres - /// (because SQLite is not actually asynchronous normally) - /// - public static readonly CVarDef DatabaseSqliteDelay = - CVarDef.Create("database.sqlite_delay", DefaultSqliteDelay, CVar.SERVERONLY); - - /// - /// Amount of concurrent SQLite database operations. - /// - /// - /// Note that SQLite is not a properly asynchronous database and also has limited read/write concurrency. - /// Increasing this number may allow more concurrent reads, but it probably won't matter much. - /// SQLite operations are normally ran on the thread pool, which may cause thread pool starvation if the concurrency is too high. - /// - public static readonly CVarDef DatabaseSqliteConcurrency = - CVarDef.Create("database.sqlite_concurrency", 3, CVar.SERVERONLY); - -#if DEBUG - private const int DefaultSqliteDelay = 1; -#else - private const int DefaultSqliteDelay = 0; -#endif - - - public static readonly CVarDef DatabasePgHost = - CVarDef.Create("database.pg_host", "localhost", CVar.SERVERONLY); - - public static readonly CVarDef DatabasePgPort = - CVarDef.Create("database.pg_port", 5432, CVar.SERVERONLY); - - public static readonly CVarDef DatabasePgDatabase = - CVarDef.Create("database.pg_database", "ss14", CVar.SERVERONLY); - - public static readonly CVarDef DatabasePgUsername = - CVarDef.Create("database.pg_username", "postgres", CVar.SERVERONLY); - - public static readonly CVarDef DatabasePgPassword = - CVarDef.Create("database.pg_password", "", CVar.SERVERONLY | CVar.CONFIDENTIAL); - - /// - /// Max amount of concurrent Postgres database operations. - /// - public static readonly CVarDef DatabasePgConcurrency = - CVarDef.Create("database.pg_concurrency", 8, CVar.SERVERONLY); - - /// - /// Milliseconds to asynchronously delay all PostgreSQL database operations with. - /// - /// - /// This is intended for performance testing. It works different from , - /// as the lag is applied after acquiring the database lock. - /// - public static readonly CVarDef DatabasePgFakeLag = - CVarDef.Create("database.pg_fake_lag", 0, CVar.SERVERONLY); - - // Basically only exists for integration tests to avoid race conditions. - public static readonly CVarDef DatabaseSynchronous = - CVarDef.Create("database.sync", false, CVar.SERVERONLY); - - #endregion - #region Interface - /* - * Interface - */ - - public static readonly CVarDef UIClickSound = - CVarDef.Create("interface.click_sound", "/Audio/UserInterface/click.ogg", CVar.REPLICATED); - - public static readonly CVarDef UIHoverSound = - CVarDef.Create("interface.hover_sound", "/Audio/UserInterface/hover.ogg", CVar.REPLICATED); - - #endregion - #region Outline - /* - * Outline - */ - - public static readonly CVarDef OutlineEnabled = - CVarDef.Create("outline.enabled", true, CVar.CLIENTONLY); - - - #endregion - #region Parallax - /* - * Parallax - */ - - public static readonly CVarDef ParallaxEnabled = - CVarDef.Create("parallax.enabled", true, CVar.CLIENTONLY); - - public static readonly CVarDef ParallaxDebug = - CVarDef.Create("parallax.debug", false, CVar.CLIENTONLY); - - public static readonly CVarDef ParallaxLowQuality = - CVarDef.Create("parallax.low_quality", false, CVar.ARCHIVE | CVar.CLIENTONLY); - - #endregion - #region Physics - /* - * Physics - */ - - /// - /// When a mob is walking should its X / Y movement be relative to its parent (true) or the map (false). - /// - public static readonly CVarDef RelativeMovement = - CVarDef.Create("physics.relative_movement", true, CVar.ARCHIVE | CVar.REPLICATED); - - public static readonly CVarDef TileFrictionModifier = - CVarDef.Create("physics.tile_friction", 40.0f, CVar.ARCHIVE | CVar.REPLICATED); - - public static readonly CVarDef StopSpeed = - CVarDef.Create("physics.stop_speed", 0.1f, CVar.ARCHIVE | CVar.REPLICATED); - - /// - /// Whether mobs can push objects like lockers. - /// - /// - /// Technically client doesn't need to know about it but this may prevent a bug in the distant future so it stays. - /// - public static readonly CVarDef MobPushing = - CVarDef.Create("physics.mob_pushing", false, CVar.REPLICATED); - - #endregion - #region Music - /* - * Music - */ - - public static readonly CVarDef LobbyMusicEnabled = - CVarDef.Create("ambience.lobby_music_enabled", true, CVar.ARCHIVE | CVar.CLIENTONLY); - - public static readonly CVarDef EventMusicEnabled = - CVarDef.Create("ambience.event_music_enabled", true, CVar.ARCHIVE | CVar.CLIENTONLY); - - #endregion - #region Specific Sounds - - /* - * Specific Sounds - */ - // Round end sound (APC Destroyed) - public static readonly CVarDef RestartSoundsEnabled = - CVarDef.Create("ambience.restart_sounds_enabled", true, CVar.ARCHIVE | CVar.CLIENTONLY); - - - #endregion - #region Admin Sounds - /* - * Admin sounds - */ - - public static readonly CVarDef AdminSoundsEnabled = - CVarDef.Create("audio.admin_sounds_enabled", true, CVar.ARCHIVE | CVar.CLIENTONLY); - public static readonly CVarDef AdminChatSoundPath = - CVarDef.Create("audio.admin_chat_sound_path", "/Audio/Items/pop.ogg", CVar.ARCHIVE | CVar.CLIENT | CVar.REPLICATED); - public static readonly CVarDef AdminChatSoundVolume = - CVarDef.Create("audio.admin_chat_sound_volume", -5f, CVar.ARCHIVE | CVar.CLIENT | CVar.REPLICATED); - - #endregion - #region HUD - /* - * HUD - */ - - public static readonly CVarDef HudTheme = - CVarDef.Create("hud.theme", 0, CVar.ARCHIVE | CVar.CLIENTONLY); - - public static readonly CVarDef HudHeldItemShow = - CVarDef.Create("hud.held_item_show", true, CVar.ARCHIVE | CVar.CLIENTONLY); - - public static readonly CVarDef CombatModeIndicatorsPointShow = - CVarDef.Create("hud.combat_mode_indicators_point_show", true, CVar.ARCHIVE | CVar.CLIENTONLY); - - public static readonly CVarDef OfferModeIndicatorsPointShow = - CVarDef.Create("hud.offer_mode_indicators_point_show", true, CVar.ARCHIVE | CVar.CLIENTONLY); - public static readonly CVarDef LoocAboveHeadShow = - CVarDef.Create("hud.show_looc_above_head", true, CVar.ARCHIVE | CVar.CLIENTONLY); - - public static readonly CVarDef HudHeldItemOffset = - CVarDef.Create("hud.held_item_offset", 28f, CVar.ARCHIVE | CVar.CLIENTONLY); - - public static readonly CVarDef HudFpsCounterVisible = - CVarDef.Create("hud.fps_counter_visible", false, CVar.CLIENTONLY | CVar.ARCHIVE); - - #endregion - #region NPCs - /* - * NPCs - */ - - public static readonly CVarDef NPCMaxUpdates = - CVarDef.Create("npc.max_updates", 128); - - public static readonly CVarDef NPCEnabled = CVarDef.Create("npc.enabled", true); - - /// - /// Should NPCs pathfind when steering. For debug purposes. - /// - public static readonly CVarDef NPCPathfinding = CVarDef.Create("npc.pathfinding", true); - - #endregion - #region Net - /* - * Net - */ - - public static readonly CVarDef NetAtmosDebugOverlayTickRate = - CVarDef.Create("net.atmosdbgoverlaytickrate", 3.0f); - - public static readonly CVarDef NetGasOverlayTickRate = - CVarDef.Create("net.gasoverlaytickrate", 3.0f); - - public static readonly CVarDef GasOverlayThresholds = - CVarDef.Create("net.gasoverlaythresholds", 20); - - #endregion - #region Admin - /* - * Admin - */ - - public static readonly CVarDef AdminAnnounceLogin = - CVarDef.Create("admin.announce_login", true, CVar.SERVERONLY); - - public static readonly CVarDef AdminAnnounceLogout = - CVarDef.Create("admin.announce_logout", true, CVar.SERVERONLY); - - /// - /// The token used to authenticate with the admin API. Leave empty to disable the admin API. This is a secret! Do not share! - /// - public static readonly CVarDef AdminApiToken = - CVarDef.Create("admin.api_token", string.Empty, CVar.SERVERONLY | CVar.CONFIDENTIAL); - - - /// - /// Should users be able to see their own notes? Admins will be able to see and set notes regardless - /// - public static readonly CVarDef SeeOwnNotes = - CVarDef.Create("admin.see_own_notes", false, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); - - /// - /// Should the server play a quick sound to the active admins whenever a new player joins? - /// - public static readonly CVarDef AdminNewPlayerJoinSound = - CVarDef.Create("admin.new_player_join_sound", false, CVar.SERVERONLY); - - /// - /// The amount of days before the note starts fading. It will slowly lose opacity until it reaches stale. Set to 0 to disable. - /// - public static readonly CVarDef NoteFreshDays = - CVarDef.Create("admin.note_fresh_days", 91.31055, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); - - /// - /// The amount of days before the note completely fades, and can only be seen by admins if they press "see more notes". Set to 0 - /// if you want the note to immediately disappear without fading. - /// - public static readonly CVarDef NoteStaleDays = - CVarDef.Create("admin.note_stale_days", 365.2422, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); - - /// - /// How much time does the user have to wait in seconds before confirming that they saw an admin message? - /// - public static readonly CVarDef MessageWaitTime = - CVarDef.Create("admin.message_wait_time", 3f, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); - - /// - /// Default severity for role bans - /// - public static readonly CVarDef RoleBanDefaultSeverity = - CVarDef.Create("admin.role_ban_default_severity", "medium", CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); - - /// - /// Default severity for department bans - /// - public static readonly CVarDef DepartmentBanDefaultSeverity = - CVarDef.Create("admin.department_ban_default_severity", "medium", CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); - - /// - /// Default severity for server bans - /// - public static readonly CVarDef ServerBanDefaultSeverity = - CVarDef.Create("admin.server_ban_default_severity", "High", CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); - - /// - /// Whether a server ban will ban the player's ip by default. - /// - public static readonly CVarDef ServerBanIpBanDefault = - CVarDef.Create("admin.server_ban_ip_ban_default", true, CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); - - /// - /// Whether a server ban will ban the player's hardware id by default. - /// - public static readonly CVarDef ServerBanHwidBanDefault = - CVarDef.Create("admin.server_ban_hwid_ban_default", true, CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); - - /// - /// Whether to use details from last connection for ip/hwid in the BanPanel. - /// - public static readonly CVarDef ServerBanUseLastDetails = - CVarDef.Create("admin.server_ban_use_last_details", true, CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); - - /// - /// Whether to erase a player's chat messages and their entity from the game when banned. - /// - public static readonly CVarDef ServerBanErasePlayer = - CVarDef.Create("admin.server_ban_erase_player", false, CVar.ARCHIVE | CVar.SERVER | CVar.REPLICATED); - - /// - /// Minimum players sharing a connection required to create an alert. -1 to disable the alert. - /// - /// - /// If you set this to 0 or 1 then it will alert on every connection, so probably don't do that. - /// - public static readonly CVarDef AdminAlertMinPlayersSharingConnection = - CVarDef.Create("admin.alert.min_players_sharing_connection", -1, CVar.SERVERONLY); - - /// - /// Minimum explosion intensity to create an admin alert message. -1 to disable the alert. - /// - public static readonly CVarDef AdminAlertExplosionMinIntensity = - CVarDef.Create("admin.alert.explosion_min_intensity", 60, CVar.SERVERONLY); - - /// - /// Minimum particle accelerator strength to create an admin alert message. - /// - public static readonly CVarDef AdminAlertParticleAcceleratorMinPowerState = - CVarDef.Create("admin.alert.particle_accelerator_min_power_state", 3, CVar.SERVERONLY); - - /// - /// Should the ban details in admin channel include PII? (IP, HWID, etc) - /// - public static readonly CVarDef AdminShowPIIOnBan = - CVarDef.Create("admin.show_pii_onban", false, CVar.SERVERONLY); - - /// - /// If an admin joins a round by reading up or using the late join button, automatically - /// de-admin them. - /// - public static readonly CVarDef AdminDeadminOnJoin = - CVarDef.Create("admin.deadmin_on_join", false, CVar.SERVERONLY); - - /// - /// Overrides the name the client sees in ahelps. Set empty to disable. - /// - public static readonly CVarDef AdminAhelpOverrideClientName = - CVarDef.Create("admin.override_adminname_in_client_ahelp", string.Empty, CVar.SERVERONLY); - - /// - /// The threshold of minutes to appear as a "new player" in the ahelp menu - /// If 0, appearing as a new player is disabled. - /// - public static readonly CVarDef NewPlayerThreshold = - CVarDef.Create("admin.new_player_threshold", 0, CVar.ARCHIVE | CVar.REPLICATED | CVar.SERVER); - - /// - /// How long an admin client can go without any input before being considered AFK. - /// - public static readonly CVarDef AdminAfkTime = - CVarDef.Create("admin.afk_time", 600f, CVar.SERVERONLY); - - /// - /// If true, admins are able to connect even if - /// would otherwise block regular players. - /// - public static readonly CVarDef AdminBypassMaxPlayers = - CVarDef.Create("admin.bypass_max_players", true, CVar.SERVERONLY); - - /// - /// Determine if custom rank names are used. - /// If it is false, it'd use the actual rank name regardless of the individual's title. - /// - /// - /// - public static readonly CVarDef AdminUseCustomNamesAdminRank = - CVarDef.Create("admin.use_custom_names_admin_rank", true, CVar.SERVERONLY); - - /// - /// Determines whether admins count towards the total playercount when determining whether the server is over - /// Ideally this should be used in conjuction with . - /// This also applies to playercount limits in whitelist conditions - /// If false, then admins will not be considered when checking whether the playercount is already above the soft player cap - /// - public static readonly CVarDef AdminsCountForMaxPlayers = - CVarDef.Create("admin.admins_count_for_max_players", false, CVar.SERVERONLY); - - #endregion - #region AHELP - /* - * AHELP - */ - - /// - /// Ahelp rate limit values are accounted in periods of this size (seconds). - /// After the period has passed, the count resets. - /// - /// - public static readonly CVarDef AhelpRateLimitPeriod = - CVarDef.Create("ahelp.rate_limit_period", 2f, CVar.SERVERONLY); - - /// - /// How many ahelp messages are allowed in a single rate limit period. - /// - /// - public static readonly CVarDef AhelpRateLimitCount = - CVarDef.Create("ahelp.rate_limit_count", 10, CVar.SERVERONLY); - - /// - /// Should the administrator's position be displayed in ahelp. - /// If it is is false, only the admin's ckey will be displayed in the ahelp. - /// - /// - /// - public static readonly CVarDef AhelpAdminPrefix = - CVarDef.Create("ahelp.admin_prefix", true, CVar.SERVERONLY); - - /// - /// Should the administrator's position be displayed in the webhook. - /// If it is is false, only the admin's ckey will be displayed in webhook. - /// - /// - /// - public static readonly CVarDef AhelpAdminPrefixWebhook = - CVarDef.Create("ahelp.admin_prefix_webhook", true, CVar.SERVERONLY); - - /// - /// If an admin replies to users from discord, should it use their discord role color? (if applicable) - /// Overrides DiscordReplyColor and AdminBwoinkColor. - /// - public static readonly CVarDef UseDiscordRoleColor = - CVarDef.Create("admin.use_discord_role_color", false, CVar.SERVERONLY); - - /// - /// If an admin replies to users from discord, should it use their discord role color? (if applicable) - /// Overrides DiscordReplyColor and AdminBwoinkColor. - /// - public static readonly CVarDef UseDiscordRoleName = - CVarDef.Create("admin.use_discord_role_name", false, CVar.SERVERONLY); - - /// - /// The text before an admin's name when replying from discord to indicate they're speaking from discord. - /// - public static readonly CVarDef DiscordReplyPrefix = - CVarDef.Create("admin.discord_reply_prefix", "(DC) ", CVar.SERVERONLY); - - /// - /// The color of the names of admins. This is the fallback color for admins. - /// - public static readonly CVarDef AdminBwoinkColor = - CVarDef.Create("admin.admin_bwoink_color", "red", CVar.SERVERONLY); - - /// - /// The color of the names of admins who reply from discord. Leave empty to disable. - /// Overrides AdminBwoinkColor. - /// - public static readonly CVarDef DiscordReplyColor = - CVarDef.Create("admin.discord_reply_color", string.Empty, CVar.SERVERONLY); - - /// - /// Use the admin's Admin OOC color in bwoinks. - /// If either the ooc color or this is not set, uses the admin.admin_bwoink_color value. - /// - public static readonly CVarDef UseAdminOOCColorInBwoinks = - CVarDef.Create("admin.bwoink_use_admin_ooc_color", false, CVar.SERVERONLY); - - #endregion - #region Explosions - /* - * Explosions - */ - - /// - /// How many tiles the explosion system will process per tick - /// - /// - /// Setting this too high will put a large load on a single tick. Setting this too low will lead to - /// unnaturally "slow" explosions. - /// - public static readonly CVarDef ExplosionTilesPerTick = - CVarDef.Create("explosion.tiles_per_tick", 100, CVar.SERVERONLY); - - /// - /// Upper limit on the size of an explosion before physics-throwing is disabled. - /// - /// - /// Large nukes tend to generate a lot of shrapnel that flies through space. This can functionally cripple - /// the server TPS for a while after an explosion (or even during, if the explosion is processed - /// incrementally. - /// - public static readonly CVarDef ExplosionThrowLimit = - CVarDef.Create("explosion.throw_limit", 400, CVar.SERVERONLY); - - /// - /// If this is true, explosion processing will pause the NodeGroupSystem to pause updating. - /// - /// - /// This only takes effect if an explosion needs more than one tick to process (i.e., covers more than tiles). If this is not enabled, the node-system will rebuild its graph - /// every tick as the explosion shreds the station, causing significant slowdown. - /// - public static readonly CVarDef ExplosionSleepNodeSys = - CVarDef.Create("explosion.node_sleep", true, CVar.SERVERONLY); - - /// - /// Upper limit on the total area that an explosion can affect before the neighbor-finding algorithm just - /// stops. Defaults to a 60-rile radius explosion. - /// - /// - /// Actual area may be larger, as it currently doesn't terminate mid neighbor finding. I.e., area may be that of a ~51 tile radius circle instead. - /// - public static readonly CVarDef ExplosionMaxArea = - CVarDef.Create("explosion.max_area", (int) 3.14f * 256 * 256, CVar.SERVERONLY); - - /// - /// Upper limit on the number of neighbor finding steps for the explosion system neighbor-finding algorithm. - /// - /// - /// Effectively places an upper limit on the range that any explosion can have. In the vast majority of - /// instances, will likely be hit before this becomes a limiting factor. - /// - public static readonly CVarDef ExplosionMaxIterations = - CVarDef.Create("explosion.max_iterations", 500, CVar.SERVERONLY); - - /// - /// Max Time in milliseconds to spend processing explosions every tick. - /// - /// - /// This time limiting is not perfectly implemented. Firstly, a significant chunk of processing time happens - /// due to queued entity deletions, which happen outside of the system update code. Secondly, explosion - /// spawning cannot currently be interrupted & resumed, and may lead to exceeding this time limit. - /// - public static readonly CVarDef ExplosionMaxProcessingTime = - CVarDef.Create("explosion.max_tick_time", 7f, CVar.SERVERONLY); - - /// - /// If the explosion is being processed incrementally over several ticks, this variable determines whether - /// updating the grid tiles should be done incrementally at the end of every tick, or only once the explosion has finished processing. - /// - /// - /// The most notable consequence of this change is that explosions will only punch a hole in the station & - /// create a vacumm once they have finished exploding. So airlocks will no longer slam shut as the explosion - /// expands, just suddenly at the end. - /// - public static readonly CVarDef ExplosionIncrementalTileBreaking = - CVarDef.Create("explosion.incremental_tile", false, CVar.SERVERONLY); - - /// - /// This determines for how many seconds an explosion should stay visible once it has finished expanding. - /// - public static readonly CVarDef ExplosionPersistence = - CVarDef.Create("explosion.persistence", 1.0f, CVar.SERVERONLY); - - /// - /// If an explosion covers a larger area than this number, the damaging/processing will always start during - /// the next tick, instead of during the same tick that the explosion was generated in. - /// - /// - /// This value can be used to ensure that for large explosions the area/tile calculation and the explosion - /// processing/damaging occurs in separate ticks. This helps reduce the single-tick lag if both and are large. I.e., instead of - /// a single tick explosion, this cvar allows for a configuration that results in a two-tick explosion, - /// though most of the computational cost is still in the second tick. - /// - public static readonly CVarDef ExplosionSingleTickAreaLimit = - CVarDef.Create("explosion.single_tick_area_limit", 400, CVar.SERVERONLY); - - /// - /// Whether or not explosions are allowed to create tiles that have - /// set to true. - /// - public static readonly CVarDef ExplosionCanCreateVacuum = - CVarDef.Create("explosion.can_create_vacuum", true, CVar.SERVERONLY); - - #endregion - #region Radiation - /* - * Radiation - */ - - /// - /// What is the smallest radiation dose in rads that can be received by object. - /// Extremely small values may impact performance. - /// - public static readonly CVarDef RadiationMinIntensity = - CVarDef.Create("radiation.min_intensity", 0.1f, CVar.SERVERONLY); - - /// - /// Rate of radiation system update in seconds. - /// - public static readonly CVarDef RadiationGridcastUpdateRate = - CVarDef.Create("radiation.gridcast.update_rate", 1.0f, CVar.SERVERONLY); - - /// - /// If both radiation source and receiver are placed on same grid, ignore grids between them. - /// May get inaccurate result in some cases, but greatly boost performance in general. - /// - public static readonly CVarDef RadiationGridcastSimplifiedSameGrid = - CVarDef.Create("radiation.gridcast.simplified_same_grid", true, CVar.SERVERONLY); - - /// - /// Max distance that radiation ray can travel in meters. - /// - public static readonly CVarDef RadiationGridcastMaxDistance = - CVarDef.Create("radiation.gridcast.max_distance", 50f, CVar.SERVERONLY); - - #endregion - #region Admin logs - /* - * Admin logs - */ - - /// - /// Controls if admin logs are enabled. Highly recommended to shut this off for development. - /// - public static readonly CVarDef AdminLogsEnabled = - CVarDef.Create("adminlogs.enabled", true, CVar.SERVERONLY); - - public static readonly CVarDef AdminLogsQueueSendDelay = - CVarDef.Create("adminlogs.queue_send_delay_seconds", 5f, CVar.SERVERONLY); - - // When to skip the waiting time to save in-round admin logs, if no admin logs are currently being saved - public static readonly CVarDef AdminLogsQueueMax = - CVarDef.Create("adminlogs.queue_max", 5000, CVar.SERVERONLY); - - // When to skip the waiting time to save pre-round admin logs, if no admin logs are currently being saved - public static readonly CVarDef AdminLogsPreRoundQueueMax = - CVarDef.Create("adminlogs.pre_round_queue_max", 5000, CVar.SERVERONLY); - - // When to start dropping logs - public static readonly CVarDef AdminLogsDropThreshold = - CVarDef.Create("adminlogs.drop_threshold", 20000, CVar.SERVERONLY); - - // How many logs to send to the client at once - public static readonly CVarDef AdminLogsClientBatchSize = - CVarDef.Create("adminlogs.client_batch_size", 1000, CVar.SERVERONLY); - - public static readonly CVarDef AdminLogsServerName = - CVarDef.Create("adminlogs.server_name", "unknown", CVar.SERVERONLY); - - #endregion - #region Atmos - /* - * Atmos - */ - - /// - /// Whether gas differences will move entities. - /// - public static readonly CVarDef SpaceWind = - CVarDef.Create("atmos.space_wind", true, CVar.SERVERONLY); - - public static readonly CVarDef SpaceWindStrengthMultiplier = - CVarDef.Create("atmos.space_wind_strength_multiplier", 1f, CVar.SERVERONLY); - - /// - /// Divisor from maxForce (pressureDifference * 2.25f) to force applied on objects. - /// - public static readonly CVarDef SpaceWindPressureForceDivisorThrow = - CVarDef.Create("atmos.space_wind_pressure_force_divisor_throw", 15f, CVar.SERVERONLY); - - /// - /// Divisor from maxForce (pressureDifference * 2.25f) to force applied on objects. - /// - public static readonly CVarDef SpaceWindPressureForceDivisorPush = - CVarDef.Create("atmos.space_wind_pressure_force_divisor_push", 2500f, CVar.SERVERONLY); - - /// - /// The maximum velocity (not force) that may be applied to an object by atmospheric pressure differences. - /// Useful to prevent clipping through objects. - /// - public static readonly CVarDef SpaceWindMaxVelocity = - CVarDef.Create("atmos.space_wind_max_velocity", 15f, CVar.SERVERONLY); - - /// - /// The maximum force that may be applied to an object by pushing (i.e. not throwing) atmospheric pressure differences. - /// A "throwing" atmospheric pressure difference ignores this limit, but not the max. velocity limit. - /// - public static readonly CVarDef SpaceWindMaxPushForce = - CVarDef.Create("atmos.space_wind_max_push_force", 20f, CVar.SERVERONLY); - - /// - /// If an object's mass is below this number, then this number is used in place of mass to determine whether air pressure can throw an object. - /// This has nothing to do with throwing force, only acting as a way of reducing the odds of tiny 5 gram objects from being yeeted by people's breath - /// - /// - /// If you are reading this because you want to change it, consider looking into why almost every item in the game weighs only 5 grams - /// And maybe do your part to fix that? :) - /// - public static readonly CVarDef SpaceWindMinimumCalculatedMass = - CVarDef.Create("atmos.space_wind_minimum_calculated_mass", 5f, CVar.SERVERONLY); - - /// - /// Calculated as 1/Mass, where Mass is the physics.Mass of the desired threshold. - /// If an object's inverse mass is lower than this, it is capped at this. Basically, an upper limit to how heavy an object can be before it stops resisting space wind more. - /// - public static readonly CVarDef SpaceWindMaximumCalculatedInverseMass = - CVarDef.Create("atmos.space_wind_maximum_calculated_inverse_mass", 0.04f, CVar.SERVERONLY); - - /// - /// Whether monstermos tile equalization is enabled. - /// - public static readonly CVarDef MonstermosEqualization = - CVarDef.Create("atmos.monstermos_equalization", true, CVar.SERVERONLY); - - /// - /// Whether monstermos explosive depressurization is enabled. - /// Needs to be enabled to work. - /// - public static readonly CVarDef MonstermosDepressurization = - CVarDef.Create("atmos.monstermos_depressurization", true, CVar.SERVERONLY); - - /// - /// Whether monstermos explosive depressurization will rip tiles.. - /// Needs and to be enabled to work. - /// WARNING: This cvar causes MAJOR contrast issues, and usually tends to make any spaced scene look very cluttered. - /// This not only usually looks strange, but can also reduce playability for people with impaired vision. Please think twice before enabling this on your server. - /// Also looks weird on slow spacing for unrelated reasons. If you do want to enable this, you should probably turn on instaspacing. - /// - public static readonly CVarDef MonstermosRipTiles = - CVarDef.Create("atmos.monstermos_rip_tiles", true, CVar.SERVERONLY); - - /// - /// Taken as the cube of a tile's mass, this acts as a minimum threshold of mass for which air pressure calculates whether or not to rip a tile from the floor - /// This should be set by default to the cube of the game's lowest mass tile as defined in their prototypes, but can be increased for server performance reasons - /// - public static readonly CVarDef MonstermosRipTilesMinimumPressure = - CVarDef.Create("atmos.monstermos_rip_tiles_min_pressure", 20f, CVar.SERVERONLY); - - /// - /// Whether explosive depressurization will cause the grid to gain an impulse. - /// Needs and to be enabled to work. - /// - public static readonly CVarDef AtmosGridImpulse = - CVarDef.Create("atmos.grid_impulse", false, CVar.SERVERONLY); - - /// - /// What fraction of air from a spaced tile escapes every tick. - /// 1.0 for instant spacing, 0.2 means 20% of remaining air lost each time - /// - public static readonly CVarDef AtmosSpacingEscapeRatio = - CVarDef.Create("atmos.mmos_spacing_speed", 0.05f, CVar.SERVERONLY); - - /// - /// Minimum amount of air allowed on a spaced tile before it is reset to 0 immediately in kPa - /// Since the decay due to SpacingEscapeRatio follows a curve, it would never reach 0.0 exactly - /// unless we truncate it somewhere. - /// - public static readonly CVarDef AtmosSpacingMinGas = - CVarDef.Create("atmos.mmos_min_gas", 2.0f, CVar.SERVERONLY); - - /// - /// How much wind can go through a single tile before that tile doesn't depressurize itself - /// (I.e spacing is limited in large rooms heading into smaller spaces) - /// - public static readonly CVarDef AtmosSpacingMaxWind = - CVarDef.Create("atmos.mmos_max_wind", 500f, CVar.SERVERONLY); - - /// - /// Increases default airflow calculations to O(n^2) complexity, for use with heavy space wind optimizations. Potato servers BEWARE - /// This solves the problem of objects being trapped in an infinite loop of slamming into a wall repeatedly. - /// - public static readonly CVarDef MonstermosUseExpensiveAirflow = - CVarDef.Create("atmos.mmos_expensive_airflow", false, CVar.SERVERONLY); - - /// - /// Whether atmos superconduction is enabled. - /// - /// Disabled by default, superconduction is awful. - public static readonly CVarDef Superconduction = - CVarDef.Create("atmos.superconduction", false, CVar.SERVERONLY); - - /// - /// Heat loss per tile due to radiation at 20 degC, in W. - /// - public static readonly CVarDef SuperconductionTileLoss = - CVarDef.Create("atmos.superconduction_tile_loss", 30f, CVar.SERVERONLY); - - /// - /// Whether excited groups will be processed and created. - /// - public static readonly CVarDef ExcitedGroups = - CVarDef.Create("atmos.excited_groups", true, CVar.SERVERONLY); - - /// - /// Whether all tiles in an excited group will clear themselves once being exposed to space. - /// Similar to , without none of the tile ripping or - /// things being thrown around very violently. - /// Needs to be enabled to work. - /// - public static readonly CVarDef ExcitedGroupsSpaceIsAllConsuming = - CVarDef.Create("atmos.excited_groups_space_is_all_consuming", false, CVar.SERVERONLY); - - /// - /// Maximum time in milliseconds that atmos can take processing. - /// - public static readonly CVarDef AtmosMaxProcessTime = - CVarDef.Create("atmos.max_process_time", 3f, CVar.SERVERONLY); - - /// - /// Atmos tickrate in TPS. Atmos processing will happen every 1/TPS seconds. - /// - public static readonly CVarDef AtmosTickRate = - CVarDef.Create("atmos.tickrate", 15f, CVar.SERVERONLY); - - /// - /// Scale factor for how fast things happen in our atmosphere - /// simulation compared to real life. 1x means pumps run at 1x - /// speed. Players typically expect things to happen faster - /// in-game. - /// - public static readonly CVarDef AtmosSpeedup = - CVarDef.Create("atmos.speedup", 8f, CVar.SERVERONLY); - - /// - /// Like atmos.speedup, but only for gas and reaction heat values. 64x means - /// gases heat up and cool down 64x faster than real life. - /// - public static readonly CVarDef AtmosHeatScale = - CVarDef.Create("atmos.heat_scale", 8f, CVar.SERVERONLY); - - /// - /// A multiplier on the amount of force applied to Humanoid entities, as tracked by HumanoidAppearanceComponent - /// This multiplier is added after all other checks are made, and applies to both throwing force, and how easy it is for an entity to be thrown. - /// - public static readonly CVarDef AtmosHumanoidThrowMultiplier = - CVarDef.Create("atmos.humanoid_throw_multiplier", 2f, CVar.SERVERONLY); - - #endregion - #region MIDI instruments - /* - * MIDI instruments - */ - - public static readonly CVarDef MaxMidiEventsPerSecond = - CVarDef.Create("midi.max_events_per_second", 1000, CVar.REPLICATED | CVar.SERVER); - - public static readonly CVarDef MaxMidiEventsPerBatch = - CVarDef.Create("midi.max_events_per_batch", 60, CVar.REPLICATED | CVar.SERVER); - - public static readonly CVarDef MaxMidiBatchesDropped = - CVarDef.Create("midi.max_batches_dropped", 1, CVar.SERVERONLY); - - public static readonly CVarDef MaxMidiLaggedBatches = - CVarDef.Create("midi.max_lagged_batches", 8, CVar.SERVERONLY); - - #endregion - #region Holidays - /* - * Holidays - */ - - public static readonly CVarDef HolidaysEnabled = CVarDef.Create("holidays.enabled", true, CVar.SERVERONLY); - - #endregion - #region Branding stuff - /* - * Branding stuff - */ - - public static readonly CVarDef BrandingSteam = CVarDef.Create("branding.steam", false, CVar.CLIENTONLY); - - #endregion - #region OOC - /* - * OOC - */ - - public static readonly CVarDef OocEnabled = CVarDef.Create("ooc.enabled", true, CVar.NOTIFY | CVar.REPLICATED); - - public static readonly CVarDef AdminOocEnabled = - CVarDef.Create("ooc.enabled_admin", true, CVar.NOTIFY); - - /// - /// If true, whenever OOC is disabled the Discord OOC relay will also be disabled. - /// - public static readonly CVarDef DisablingOOCDisablesRelay = CVarDef.Create("ooc.disabling_ooc_disables_relay", true, CVar.SERVERONLY); - - /// - /// Whether or not OOC chat should be enabled during a round. - /// - public static readonly CVarDef OocEnableDuringRound = - CVarDef.Create("ooc.enable_during_round", false, CVar.NOTIFY | CVar.REPLICATED | CVar.SERVER); - - public static readonly CVarDef ShowOocPatronColor = - CVarDef.Create("ooc.show_ooc_patron_color", true, CVar.ARCHIVE | CVar.REPLICATED | CVar.CLIENT); - - #endregion - #region LOOC - /* - * LOOC - */ +namespace Content.Shared.CCVar; - public static readonly CVarDef LoocEnabled = CVarDef.Create("looc.enabled", true, CVar.NOTIFY | CVar.REPLICATED); - - public static readonly CVarDef AdminLoocEnabled = - CVarDef.Create("looc.enabled_admin", true, CVar.NOTIFY); - - /// - /// True: Dead players can use LOOC - /// False: Dead player LOOC gets redirected to dead chat - /// - public static readonly CVarDef DeadLoocEnabled = CVarDef.Create("looc.enabled_dead", false, CVar.NOTIFY | CVar.REPLICATED); - - /// - /// True: Crit players can use LOOC - /// False: Crit player LOOC gets redirected to dead chat - /// - public static readonly CVarDef CritLoocEnabled = CVarDef.Create("looc.enabled_crit", false, CVar.NOTIFY | CVar.REPLICATED); - - #endregion - #region Entity Menu Grouping Types - /* - * Entity Menu Grouping Types - */ - public static readonly CVarDef EntityMenuGroupingType = CVarDef.Create("entity_menu", 0, CVar.CLIENTONLY); - - #endregion - #region Whitelist - /* - * Whitelist - */ - - /// - /// Controls whether the server will deny any players that are not whitelisted in the DB. - /// - public static readonly CVarDef WhitelistEnabled = - CVarDef.Create("whitelist.enabled", false, CVar.REPLICATED); - - /// - /// Specifies the whitelist prototypes to be used by the server. This should be a comma-separated list of prototypes. - /// If a whitelists conditions to be active fail (for example player count), the next whitelist will be used instead. If no whitelist is valid, the player will be allowed to connect. - /// - public static readonly CVarDef WhitelistPrototypeList = - CVarDef.Create("whitelist.prototype_list", "basicWhitelist", CVar.SERVERONLY); - - #endregion - #region VOTE - /* - * VOTE - */ - - /// - /// Allows enabling/disabling player-started votes for ultimate authority - /// - public static readonly CVarDef VoteEnabled = - CVarDef.Create("vote.enabled", true, CVar.SERVERONLY); - - /// - /// See vote.enabled, but specific to restart votes - /// - public static readonly CVarDef VoteRestartEnabled = - CVarDef.Create("vote.restart_enabled", true, CVar.SERVERONLY); - - /// - /// Config for when the restart vote should be allowed to be called regardless with less than this amount of players. - /// - public static readonly CVarDef VoteRestartMaxPlayers = - CVarDef.Create("vote.restart_max_players", 20, CVar.SERVERONLY); - - /// - /// Config for when the restart vote should be allowed to be called based on percentage of ghosts. - /// - public static readonly CVarDef VoteRestartGhostPercentage = - CVarDef.Create("vote.restart_ghost_percentage", 75, CVar.SERVERONLY); - - /// - /// See vote.enabled, but specific to preset votes - /// - public static readonly CVarDef VotePresetEnabled = - CVarDef.Create("vote.preset_enabled", false, CVar.SERVERONLY); - - /// - /// See vote.enabled, but specific to map votes - /// - public static readonly CVarDef VoteMapEnabled = - CVarDef.Create("vote.map_enabled", false, CVar.SERVERONLY); - - /// - /// The required ratio of the server that must agree for a restart round vote to go through. - /// - public static readonly CVarDef VoteRestartRequiredRatio = - CVarDef.Create("vote.restart_required_ratio", 0.85f, CVar.SERVERONLY); - - /// - /// Whether or not to prevent the restart vote from having any effect when there is an online admin - /// - public static readonly CVarDef VoteRestartNotAllowedWhenAdminOnline = - CVarDef.Create("vote.restart_not_allowed_when_admin_online", true, CVar.SERVERONLY); - - /// - /// The delay which two votes of the same type are allowed to be made by separate people, in seconds. - /// - public static readonly CVarDef VoteSameTypeTimeout = - CVarDef.Create("vote.same_type_timeout", 240f, CVar.SERVERONLY); - - - /// - /// Sets the duration of the map vote timer. - /// - public static readonly CVarDef - VoteTimerMap = CVarDef.Create("vote.timermap", 90, CVar.SERVERONLY); - - /// - /// Sets the duration of the restart vote timer. - /// - public static readonly CVarDef - VoteTimerRestart = CVarDef.Create("vote.timerrestart", 60, CVar.SERVERONLY); - - /// - /// Sets the duration of the gamemode/preset vote timer. - /// - public static readonly CVarDef - VoteTimerPreset = CVarDef.Create("vote.timerpreset", 30, CVar.SERVERONLY); - - /// - /// Sets the duration of the map vote timer when ALONE. - /// - public static readonly CVarDef - VoteTimerAlone = CVarDef.Create("vote.timeralone", 10, CVar.SERVERONLY); - - - #endregion - #region BAN - /* - * BAN - */ - - public static readonly CVarDef BanHardwareIds = - CVarDef.Create("ban.hardware_ids", true, CVar.SERVERONLY); - - #endregion - #region Procgen - /* - * Procgen - */ - - /// - /// Should we pre-load all of the procgen atlasses. - /// - public static readonly CVarDef ProcgenPreload = - CVarDef.Create("procgen.preload", true, CVar.SERVERONLY); - - #endregion - #region Shuttles - /* - * Shuttles - */ - - // Look this is technically eye behavior but its main impact is shuttles so I just dumped it here. - /// - /// If true then the camera will match the grid / map and is unchangeable. - /// - When traversing grids it will snap to 0 degrees rotation. - /// False means the player has control over the camera rotation. - /// - When traversing grids it will snap to the nearest cardinal which will generally be imperceptible. - /// - public static readonly CVarDef CameraRotationLocked = - CVarDef.Create("shuttle.camera_rotation_locked", false, CVar.REPLICATED); - - /// - /// Whether the arrivals terminal should be on a planet map. - /// - public static readonly CVarDef ArrivalsPlanet = - CVarDef.Create("shuttle.arrivals_planet", false, CVar.SERVERONLY); - - /// - /// Whether the arrivals shuttle is enabled. - /// - public static readonly CVarDef ArrivalsShuttles = - CVarDef.Create("shuttle.arrivals", true, CVar.SERVERONLY); - - /// - /// The map to use for the arrivals station. - /// - public static readonly CVarDef ArrivalsMap = - CVarDef.Create("shuttle.arrivals_map", "/Maps/Misc/terminal.yml", CVar.SERVERONLY); - - /// - /// Cooldown between arrivals departures. This should be longer than the FTL time or it will double cycle. - /// - public static readonly CVarDef ArrivalsCooldown = - CVarDef.Create("shuttle.arrivals_cooldown", 50f, CVar.SERVERONLY); - - /// - /// Time it takes the shuttle to spin up it's hyper drive and jump - /// - public static readonly CVarDef ArrivalsStartupTime= - CVarDef.Create("shuttle.arrivals_startup_time", 5.5f, CVar.SERVERONLY); - - /// - /// Time spent in hyperspace - /// - public static readonly CVarDef ArrivalsHyperspaceTime = - CVarDef.Create("shuttle.arrivals_hyperspace_time", 20f, CVar.SERVERONLY); - - /// - /// Are players allowed to return on the arrivals shuttle. - /// - public static readonly CVarDef ArrivalsReturns = - CVarDef.Create("shuttle.arrivals_returns", false, CVar.SERVERONLY); - - /// - /// Should all players who spawn at arrivals have godmode until they leave the map? - /// - public static readonly CVarDef GodmodeArrivals = - CVarDef.Create("shuttle.godmode_arrivals", false, CVar.SERVERONLY); - - /// - /// If a grid is split then hide any smaller ones under this mass (kg) from the map. - /// This is useful to avoid split grids spamming out labels. - /// - public static readonly CVarDef HideSplitGridsUnder = - CVarDef.Create("shuttle.hide_split_grids_under", 30, CVar.SERVERONLY); - - /// - /// Whether to automatically spawn escape shuttles. - /// - public static readonly CVarDef GridFill = - CVarDef.Create("shuttle.grid_fill", true, CVar.SERVERONLY); - - /// - /// Whether to automatically preloading grids by GridPreloaderSystem - /// - public static readonly CVarDef PreloadGrids = - CVarDef.Create("shuttle.preload_grids", true, CVar.SERVERONLY); - - /// - /// How long the warmup time before FTL start should be. - /// - public static readonly CVarDef FTLStartupTime = - CVarDef.Create("shuttle.startup_time", 5.5f, CVar.SERVERONLY); - - /// - /// How long a shuttle spends in FTL. - /// - public static readonly CVarDef FTLTravelTime = - CVarDef.Create("shuttle.travel_time", 20f, CVar.SERVERONLY); - - /// - /// How long the final stage of FTL before arrival should be. - /// - public static readonly CVarDef FTLArrivalTime = - CVarDef.Create("shuttle.arrival_time", 5f, CVar.SERVERONLY); - - /// - /// How much time needs to pass before a shuttle can FTL again. - /// - public static readonly CVarDef FTLCooldown = - CVarDef.Create("shuttle.cooldown", 10f, CVar.SERVERONLY); - - /// - /// The maximum a grid can have before it becomes unable to FTL. - /// Any value equal to or less than zero will disable this check. - /// - public static readonly CVarDef FTLMassLimit = - CVarDef.Create("shuttle.mass_limit", 300f, CVar.SERVERONLY); - - /// - /// How long to knock down entities for if they aren't buckled when FTL starts and stops. - /// - public static readonly CVarDef HyperspaceKnockdownTime = - CVarDef.Create("shuttle.hyperspace_knockdown_time", 5f, CVar.SERVERONLY); - - /// - /// the Entropic decay of energy combined with the minimal but existent particles that would slow the vessel down - /// - public static readonly CVarDef SpaceFrictionStrength = - CVarDef.Create("shuttle.space_friction_strength", 0.0015f, CVar.REPLICATED); - - /// - /// the strength of drag when the inertia dampeners are set to anchor to slow the vessel down and hold it in place - /// - public static readonly CVarDef AnchorDampeningStrength = - CVarDef.Create("shuttle.ancho_dampening_strength", 0.5f, CVar.REPLICATED); - #endregion - #region Emergency - /* - * Emergency - */ - - /// - /// Is the emergency shuttle allowed to be early launched. - /// - public static readonly CVarDef EmergencyEarlyLaunchAllowed = - CVarDef.Create("shuttle.emergency_early_launch_allowed", false, CVar.SERVERONLY); - - /// - /// How long the emergency shuttle remains docked with the station, in seconds. - /// - public static readonly CVarDef EmergencyShuttleDockTime = - CVarDef.Create("shuttle.emergency_dock_time", 240f, CVar.SERVERONLY); - - /// - /// How long after the console is authorized for the shuttle to early launch. - /// - public static readonly CVarDef EmergencyShuttleAuthorizeTime = - CVarDef.Create("shuttle.emergency_authorize_time", 10f, CVar.SERVERONLY); - - /// - /// The minimum time for the emergency shuttle to arrive at centcomm. - /// Actual minimum travel time cannot be less than - /// - public static readonly CVarDef EmergencyShuttleMinTransitTime = - CVarDef.Create("shuttle.emergency_transit_time_min", 90f, CVar.SERVERONLY); - - /// - /// The maximum time for the emergency shuttle to arrive at centcomm. - /// - public static readonly CVarDef EmergencyShuttleMaxTransitTime = - CVarDef.Create("shuttle.emergency_transit_time_max", 180f, CVar.SERVERONLY); - - /// - /// Whether the emergency shuttle is enabled or should the round just end. - /// - public static readonly CVarDef EmergencyShuttleEnabled = - CVarDef.Create("shuttle.emergency", true, CVar.SERVERONLY); - - /// - /// The percentage of time passed from the initial call to when the shuttle can no longer be recalled. - /// ex. a call time of 10min and turning point of 0.5 means the shuttle cannot be recalled after 5 minutes. - /// - public static readonly CVarDef EmergencyRecallTurningPoint = - CVarDef.Create("shuttle.recall_turning_point", 0.5f, CVar.SERVERONLY); - - /// - /// Time in minutes after round start to auto-call the shuttle. Set to zero to disable. - /// - public static readonly CVarDef EmergencyShuttleAutoCallTime = - CVarDef.Create("shuttle.auto_call_time", 120, CVar.SERVERONLY); - - /// - /// Time in minutes after the round was extended (by recalling the shuttle) to call - /// the shuttle again. - /// - public static readonly CVarDef EmergencyShuttleAutoCallExtensionTime = - CVarDef.Create("shuttle.auto_call_extension_time", 30, CVar.SERVERONLY); - - #endregion - #region Crew Manifests - /* - * Crew Manifests - */ - - /// - /// Setting this allows a crew manifest to be opened from any window - /// that has a crew manifest button, and sends the correct message. - /// If this is false, only in-game entities will allow you to see - /// the crew manifest, if the functionality is coded in. - /// Having administrator priveledge ignores this, but will still - /// hide the button in UI windows. - /// - public static readonly CVarDef CrewManifestWithoutEntity = - CVarDef.Create("crewmanifest.no_entity", true, CVar.REPLICATED); - - /// - /// Setting this allows the crew manifest to be viewed from 'unsecure' - /// entities, such as the PDA. - /// - public static readonly CVarDef CrewManifestUnsecure = - CVarDef.Create("crewmanifest.unsecure", true, CVar.REPLICATED); - - #endregion - #region Cloning - - /* - * Cloning - */ - /// - /// How much should the cost to clone an entity be multiplied by. - /// - public static readonly CVarDef CloningBiomassCostMultiplier = - CVarDef.Create("cloning.biomass_cost_multiplier", 1f, CVar.SERVERONLY); - - /// - /// Whether or not the Biomass Reclaimer is allowed to roundremove bodies with a soul. - /// - public static readonly CVarDef CloningReclaimSouledBodies = - CVarDef.Create("cloning.reclaim_souled_bodies", true, CVar.SERVERONLY); - - /// - /// Controls whether or not Metempsychosis will potentially give people a sex change. - /// - public static readonly CVarDef CloningPreserveSex = - CVarDef.Create("cloning.preserve_sex", false, CVar.SERVERONLY); - - /// - /// Controls whether or not Metempsychosis preserves Pronouns when reincarnating people. - /// - public static readonly CVarDef CloningPreserveGender = - CVarDef.Create("cloning.preserve_gender", true, CVar.SERVERONLY); - - /// - /// Controls whether or not Metempsychosis preserves Age. - /// - public static readonly CVarDef CloningPreserveAge = - CVarDef.Create("cloning.preserve_age", false, CVar.SERVERONLY); - - /// - /// Controls whether or not Metempsychosis preserves height. - /// - public static readonly CVarDef CloningPreserveHeight = - CVarDef.Create("cloning.preserve_height", false, CVar.SERVERONLY); - - /// - /// Controls whether or not Metempsychosis preserves width. - /// - public static readonly CVarDef CloningPreserveWidth = - CVarDef.Create("cloning.preserve_width", false, CVar.SERVERONLY); - - /// - /// Controls whether or not Metempsychosis preserves Names. EG: Are you actually a new person? - /// - public static readonly CVarDef CloningPreserveName = - CVarDef.Create("cloning.preserve_name", true, CVar.SERVERONLY); - - /// - /// Controls whether or not Metempsychosis preserves Flavor Text. - /// - public static readonly CVarDef CloningPreserveFlavorText = - CVarDef.Create("cloning.preserve_flavor_text", true, CVar.SERVERONLY); - - #endregion - #region Anomaly - /* - * Anomaly - */ - - /// - /// A scale factor applied to a grid's bounds when trying to find a spot to randomly generate an anomaly. - /// - public static readonly CVarDef AnomalyGenerationGridBoundsScale = - CVarDef.Create("anomaly.generation_grid_bounds_scale", 0.6f, CVar.SERVERONLY); - - #endregion - #region VIEWPORT - /* - * VIEWPORT - */ - - public static readonly CVarDef ViewportStretch = - CVarDef.Create("viewport.stretch", true, CVar.CLIENTONLY | CVar.ARCHIVE); - - public static readonly CVarDef ViewportFixedScaleFactor = - CVarDef.Create("viewport.fixed_scale_factor", 2, CVar.CLIENTONLY | CVar.ARCHIVE); - - // This default is basically specifically chosen so fullscreen/maximized 1080p hits a 2x snap and does NN. - public static readonly CVarDef ViewportSnapToleranceMargin = - CVarDef.Create("viewport.snap_tolerance_margin", 64, CVar.CLIENTONLY | CVar.ARCHIVE); - - public static readonly CVarDef ViewportSnapToleranceClip = - CVarDef.Create("viewport.snap_tolerance_clip", 32, CVar.CLIENTONLY | CVar.ARCHIVE); - - public static readonly CVarDef ViewportScaleRender = - CVarDef.Create("viewport.scale_render", true, CVar.CLIENTONLY | CVar.ARCHIVE); - - public static readonly CVarDef ViewportMinimumWidth = - CVarDef.Create("viewport.minimum_width", 15, CVar.REPLICATED); - - public static readonly CVarDef ViewportMaximumWidth = - CVarDef.Create("viewport.maximum_width", 21, CVar.REPLICATED); - - public static readonly CVarDef ViewportWidth = - CVarDef.Create("viewport.width", 21, CVar.CLIENTONLY | CVar.ARCHIVE); - - public static readonly CVarDef ViewportVerticalFit = - CVarDef.Create("viewport.vertical_fit", true, CVar.CLIENTONLY | CVar.ARCHIVE); - - #endregion - #region FOV - /* - * FOV - */ - - /// - /// The number by which the current FOV size is divided for each level. - /// - public static readonly CVarDef ZoomLevelStep = - CVarDef.Create("fov.zoom_step", 1.2f, CVar.SERVER | CVar.REPLICATED); - - /// - /// How many times the player can zoom in until they reach the minimum zoom. - /// This does not affect the maximum zoom. - /// - public static readonly CVarDef ZoomLevels = - CVarDef.Create("fov.zoom_levels", 7, CVar.SERVER | CVar.REPLICATED); - - #endregion - #region UI - /* - * UI - */ - - public static readonly CVarDef UILayout = - CVarDef.Create("ui.layout", "Separated", CVar.CLIENTONLY | CVar.ARCHIVE); - - public static readonly CVarDef OverlayScreenChatSize = - CVarDef.Create("ui.overlay_chat_size", "", CVar.CLIENTONLY | CVar.ARCHIVE); - - public static readonly CVarDef SeparatedScreenChatSize = - CVarDef.Create("ui.separated_chat_size", "0.6,0", CVar.CLIENTONLY | CVar.ARCHIVE); - - #endregion - #region Accessibility - - /* - * Accessibility - */ - - /// - /// Chat window opacity slider, controlling the alpha of the chat window background. - /// Goes from to 0 (completely transparent) to 1 (completely opaque) - /// - public static readonly CVarDef ChatWindowOpacity = - CVarDef.Create("accessibility.chat_window_transparency", 0.85f, CVar.CLIENTONLY | CVar.ARCHIVE); - - /// - /// Toggle for visual effects that may potentially cause motion sickness. - /// Where reasonable, effects affected by this CVar should use an alternate effect. - /// Please do not use this CVar as a bandaid for effects that could otherwise be made accessible without issue. - /// - public static readonly CVarDef ReducedMotion = - CVarDef.Create("accessibility.reduced_motion", false, CVar.CLIENTONLY | CVar.ARCHIVE); - - public static readonly CVarDef ChatEnableColorName = - CVarDef.Create("accessibility.enable_color_name", true, CVar.CLIENTONLY | CVar.ARCHIVE, "Toggles displaying names with individual colors."); - - /// - /// Screen shake intensity slider, controlling the intensity of the CameraRecoilSystem. - /// Goes from 0 (no recoil at all) to 1 (regular amounts of recoil) - /// - public static readonly CVarDef ScreenShakeIntensity = - CVarDef.Create("accessibility.screen_shake_intensity", 1f, CVar.CLIENTONLY | CVar.ARCHIVE); - - /// - /// A generic toggle for various visual effects that are color sensitive. - /// As of 2/16/24, only applies to progress bar colors. - /// - public static readonly CVarDef AccessibilityColorblindFriendly = - CVarDef.Create("accessibility.colorblind_friendly", false, CVar.CLIENTONLY | CVar.ARCHIVE); - - /// - /// Disables all vision filters for species like Vulpkanin or Harpies. There are good reasons someone might want to disable these. - /// - public static readonly CVarDef NoVisionFilters = - CVarDef.Create("accessibility.no_vision_filters", true, CVar.CLIENTONLY | CVar.ARCHIVE); - - #endregion - #region CHAT - /* - * CHAT - */ - - /// - /// Chat rate limit values are accounted in periods of this size (seconds). - /// After the period has passed, the count resets. - /// - /// - public static readonly CVarDef ChatRateLimitPeriod = - CVarDef.Create("chat.rate_limit_period", 2f, CVar.SERVERONLY); - - /// - /// How many chat messages are allowed in a single rate limit period. - /// - /// - /// The total rate limit throughput per second is effectively - /// divided by . - /// - /// - public static readonly CVarDef ChatRateLimitCount = - CVarDef.Create("chat.rate_limit_count", 10, CVar.SERVERONLY); - - /// - /// Minimum delay (in seconds) between notifying admins about chat message rate limit violations. - /// A negative value disables admin announcements. - /// - public static readonly CVarDef ChatRateLimitAnnounceAdminsDelay = - CVarDef.Create("chat.rate_limit_announce_admins_delay", 15, CVar.SERVERONLY); - - public static readonly CVarDef ChatMaxMessageLength = - CVarDef.Create("chat.max_message_length", 1000, CVar.SERVER | CVar.REPLICATED); - - public static readonly CVarDef ChatMaxAnnouncementLength = - CVarDef.Create("chat.max_announcement_length", 256, CVar.SERVER | CVar.REPLICATED); - - public static readonly CVarDef ChatSanitizerEnabled = - CVarDef.Create("chat.chat_sanitizer_enabled", true, CVar.SERVERONLY); - - public static readonly CVarDef ChatShowTypingIndicator = - CVarDef.Create("chat.show_typing_indicator", true, CVar.CLIENTONLY); - - public static readonly CVarDef ChatEnableFancyBubbles = - CVarDef.Create("chat.enable_fancy_bubbles", true, CVar.CLIENTONLY | CVar.ARCHIVE, "Toggles displaying fancy speech bubbles, which display the speaking character's name."); - - public static readonly CVarDef ChatFancyNameBackground = - CVarDef.Create("chat.fancy_name_background", false, CVar.CLIENTONLY | CVar.ARCHIVE, "Toggles displaying a background under the speaking character's name."); - - public static readonly CVarDef ChatStackLastLines = - CVarDef.Create("chat.chatstack_last_lines", 1, CVar.CLIENTONLY | CVar.ARCHIVE, "How far into the chat history to look when looking for similiar messages to coalesce them."); - - /// - /// A message broadcast to each player that joins the lobby. - /// May be changed by admins ingame through use of the "set-motd" command. - /// In this case the new value, if not empty, is broadcast to all connected players and saved between rounds. - /// May be requested by any player through use of the "get-motd" command. - /// - public static readonly CVarDef MOTD = - CVarDef.Create("chat.motd", "", CVar.SERVER | CVar.SERVERONLY | CVar.ARCHIVE, "A message broadcast to each player that joins the lobby."); - - #endregion - #region AFK - /* - * AFK - */ - - /// - /// How long a client can go without any input before being considered AFK. - /// - public static readonly CVarDef AfkTime = - CVarDef.Create("afk.time", 60f, CVar.SERVERONLY); - - #endregion - #region IC - /* - * IC - */ - - /// - /// Restricts IC character names to alphanumeric chars. - /// - public static readonly CVarDef RestrictedNames = - CVarDef.Create("ic.restricted_names", true, CVar.SERVER | CVar.REPLICATED); - - /// - /// Allows flavor text (character descriptions) - /// - public static readonly CVarDef FlavorText = - CVarDef.Create("ic.flavor_text", true, CVar.SERVER | CVar.REPLICATED); - - /// - /// Adds a period at the end of a sentence if the sentence ends in a letter. - /// - public static readonly CVarDef ChatPunctuation = - CVarDef.Create("ic.punctuation", true, CVar.SERVER); - - /// - /// Enables automatically forcing IC name rules. Uppercases the first letter of the first and last words of the name - /// - public static readonly CVarDef ICNameCase = - CVarDef.Create("ic.name_case", true, CVar.SERVER | CVar.REPLICATED); - - /// - /// Whether or not players' characters are randomly generated rather than using their selected characters in the creator. - /// - public static readonly CVarDef ICRandomCharacters = - CVarDef.Create("ic.random_characters", false, CVar.SERVER); - - /// - /// A weighted random prototype used to determine the species selected for random characters. - /// - public static readonly CVarDef ICRandomSpeciesWeights = - CVarDef.Create("ic.random_species_weights", "SpeciesWeights", CVar.SERVER); - - /// - /// Control displaying SSD indicators near players - /// - public static readonly CVarDef ICShowSSDIndicator = - CVarDef.Create("ic.show_ssd_indicator", true, CVar.CLIENTONLY); - - /// - /// Allow Ethereal Ent to PassThrough Walls/Objects while in Ethereal. - /// - public static readonly CVarDef EtherealPassThrough = - CVarDef.Create("ic.EtherealPassThrough", false, CVar.SERVER); - - #endregion - #region Salvage - /* - * Salvage - */ - - /// - /// Duration for missions - /// - public static readonly CVarDef - SalvageExpeditionDuration = CVarDef.Create("salvage.expedition_duration", 660f, CVar.REPLICATED); - - /// - /// Cooldown for missions. - /// - public static readonly CVarDef - SalvageExpeditionCooldown = CVarDef.Create("salvage.expedition_cooldown", 780f, CVar.REPLICATED); - - #endregion - #region Flavor - /* - * Flavor - */ - - /// - /// Flavor limit. This is to ensure that having a large mass of flavors in - /// some food object won't spam a user with flavors. - /// - public static readonly CVarDef - FlavorLimit = CVarDef.Create("flavor.limit", 10, CVar.SERVERONLY); - - #endregion - #region Mapping - /* - * Mapping - */ - - /// - /// Will mapping mode enable autosaves when it's activated? - /// - public static readonly CVarDef - AutosaveEnabled = CVarDef.Create("mapping.autosave", true, CVar.SERVERONLY); - - /// - /// Autosave interval in seconds. - /// - public static readonly CVarDef - AutosaveInterval = CVarDef.Create("mapping.autosave_interval", 600f, CVar.SERVERONLY); - - /// - /// Directory in server user data to save to. Saves will be inside folders in this directory. - /// - public static readonly CVarDef - AutosaveDirectory = CVarDef.Create("mapping.autosave_dir", "Autosaves", CVar.SERVERONLY); - - - #endregion - #region Rules - /* - * Rules - */ - - /// - /// Time that players have to wait before rules can be accepted. - /// - public static readonly CVarDef RulesWaitTime = - CVarDef.Create("rules.time", 10f, CVar.SERVER | CVar.REPLICATED); - - /// - /// Don't show rules to localhost/loopback interface. - /// - public static readonly CVarDef RulesExemptLocal = - CVarDef.Create("rules.exempt_local", false, CVar.SERVERONLY); - - - #endregion - #region Autogeneration - /* - * Autogeneration - */ - - public static readonly CVarDef DestinationFile = - CVarDef.Create("autogen.destination_file", "", CVar.SERVER | CVar.SERVERONLY); - - #endregion - #region Network Resource Manager - /* - * Network Resource Manager - */ - - /// - /// Whether uploaded files will be stored in the server's database. - /// This is useful to keep "logs" on what files admins have uploaded in the past. - /// - public static readonly CVarDef ResourceUploadingStoreEnabled = - CVarDef.Create("netres.store_enabled", true, CVar.SERVER | CVar.SERVERONLY); - - /// - /// Numbers of days before stored uploaded files are deleted. Set to zero or negative to disable auto-delete. - /// This is useful to free some space automatically. Auto-deletion runs only on server boot. - /// - public static readonly CVarDef ResourceUploadingStoreDeletionDays = - CVarDef.Create("netres.store_deletion_days", 30, CVar.SERVER | CVar.SERVERONLY); - - #endregion - #region Controls - /* - * Controls - */ - - /// - /// Deadzone for drag-drop interactions. - /// - public static readonly CVarDef DragDropDeadZone = - CVarDef.Create("control.drag_dead_zone", 12f, CVar.CLIENTONLY | CVar.ARCHIVE); - - /// - /// Toggles whether the walking key is a toggle or a held key. - /// - public static readonly CVarDef ToggleWalk = - CVarDef.Create("control.toggle_walk", false, CVar.CLIENTONLY | CVar.ARCHIVE); - - /// - /// Whether the player mob is walking by default instead of running. - /// - public static readonly CVarDef DefaultWalk = - CVarDef.Create("control.default_walk", true, CVar.CLIENT | CVar.REPLICATED | CVar.ARCHIVE); - #endregion - #region Interactions - /* - * Interactions - */ - - // The rationale behind the default limit is simply that I can easily get to 7 interactions per second by just - // trying to spam toggle a light switch or lever (though the UseDelay component limits the actual effect of the - // interaction). I don't want to accidentally spam admins with alerts just because somebody is spamming a - // key manually, nor do we want to alert them just because the player is having network issues and the server - // receives multiple interactions at once. But we also want to try catch people with modified clients that spam - // many interactions on the same tick. Hence, a very short period, with a relatively high count. - - /// - /// Maximum number of interactions that a player can perform within seconds - /// - public static readonly CVarDef InteractionRateLimitCount = - CVarDef.Create("interaction.rate_limit_count", 5, CVar.SERVER | CVar.REPLICATED); - - /// - public static readonly CVarDef InteractionRateLimitPeriod = - CVarDef.Create("interaction.rate_limit_period", 0.5f, CVar.SERVER | CVar.REPLICATED); - - /// - /// Minimum delay (in seconds) between notifying admins about interaction rate limit violations. A negative - /// value disables admin announcements. - /// - public static readonly CVarDef InteractionRateLimitAnnounceAdminsDelay = - CVarDef.Create("interaction.rate_limit_announce_admins_delay", 120, CVar.SERVERONLY); - - #endregion - #region STORAGE - /* - * STORAGE - */ - - /// - /// Whether or not the storage UI is static and bound to the hotbar, or unbound and allowed to be dragged anywhere. - /// - public static readonly CVarDef StaticStorageUI = - CVarDef.Create("control.static_storage_ui", true, CVar.CLIENTONLY | CVar.ARCHIVE); - - /// - /// Whether or not the storage window uses a transparent or opaque sprite. - /// - public static readonly CVarDef OpaqueStorageWindow = - CVarDef.Create("control.opaque_storage_background", false, CVar.CLIENTONLY | CVar.ARCHIVE); - - #endregion - #region UPDATE - /* - * UPDATE - */ - - /// - /// If a server update restart is pending, the delay after the last player leaves before we actually restart. In seconds. - /// - public static readonly CVarDef UpdateRestartDelay = - CVarDef.Create("update.restart_delay", 20f, CVar.SERVERONLY); - - #endregion - #region Ghost - /* - * Ghost - */ - - /// - /// The time you must spend reading the rules, before the "Request" button is enabled - /// - public static readonly CVarDef GhostRoleTime = - CVarDef.Create("ghost.role_time", 8f, CVar.REPLICATED | CVar.SERVER); - - #endregion - #region Fire alarm - /* - * Fire alarm - */ - - /// - /// If fire alarms should have all access, or if activating/resetting these - /// should be restricted to what is dictated on a player's access card. - /// Defaults to true. - /// - public static readonly CVarDef FireAlarmAllAccess = - CVarDef.Create("firealarm.allaccess", true, CVar.SERVERONLY); - - #endregion - #region PLAYTIME - /* - * PLAYTIME - */ - - /// - /// Time between play time autosaves, in seconds. - /// - public static readonly CVarDef - PlayTimeSaveInterval = CVarDef.Create("playtime.save_interval", 900f, CVar.SERVERONLY); - - #endregion - #region INFOLINKS - /* - * INFOLINKS - */ - - /// - /// Link to Discord server to show in the launcher. - /// - public static readonly CVarDef InfoLinksDiscord = - CVarDef.Create("infolinks.discord", "", CVar.SERVER | CVar.REPLICATED); - - /// - /// Link to website to show in the launcher. - /// - public static readonly CVarDef InfoLinksForum = - CVarDef.Create("infolinks.forum", "", CVar.SERVER | CVar.REPLICATED); - - /// - /// Link to GitHub page to show in the launcher. - /// - public static readonly CVarDef InfoLinksGithub = - CVarDef.Create("infolinks.github", "", CVar.SERVER | CVar.REPLICATED); - - /// - /// Link to website to show in the launcher. - /// - public static readonly CVarDef InfoLinksWebsite = - CVarDef.Create("infolinks.website", "", CVar.SERVER | CVar.REPLICATED); - - /// - /// Link to wiki to show in the launcher. - /// - public static readonly CVarDef InfoLinksWiki = - CVarDef.Create("infolinks.wiki", "", CVar.SERVER | CVar.REPLICATED); - - /// - /// Link to Patreon. Not shown in the launcher currently. - /// - public static readonly CVarDef InfoLinksPatreon = - CVarDef.Create("infolinks.patreon", "", CVar.SERVER | CVar.REPLICATED); - - /// - /// Link to the bug report form. - /// - public static readonly CVarDef InfoLinksBugReport = - CVarDef.Create("infolinks.bug_report", "", CVar.SERVER | CVar.REPLICATED); - - /// - /// Link to site handling ban appeals. Shown in ban disconnect messages. - /// - public static readonly CVarDef InfoLinksAppeal = - CVarDef.Create("infolinks.appeal", "", CVar.SERVER | CVar.REPLICATED); - - #endregion - #region CONFIG - /* - * CONFIG - */ - - // These are server-only for now since I don't foresee a client use yet, - // and I don't wanna have to start coming up with like .client suffixes and stuff like that. - - /// - /// Configuration presets to load during startup. - /// Multiple presets can be separated by comma and are loaded in order. - /// - /// - /// Loaded presets must be located under the ConfigPresets/ resource directory and end with the .toml extension. - /// Only the file name (without extension) must be given for this variable. - /// - public static readonly CVarDef ConfigPresets = - CVarDef.Create("config.presets", "", CVar.SERVERONLY); - - /// - /// Whether to load the preset development CVars. - /// This disables some things like lobby to make development easier. - /// Even when true, these are only loaded if the game is compiled with DEVELOPMENT set. - /// - public static readonly CVarDef ConfigPresetDevelopment = - CVarDef.Create("config.preset_development", true, CVar.SERVERONLY); - - /// - /// Whether to load the preset debug CVars. - /// Even when true, these are only loaded if the game is compiled with DEBUG set. - /// - public static readonly CVarDef ConfigPresetDebug = - CVarDef.Create("config.preset_debug", true, CVar.SERVERONLY); - - #endregion - #region World Generation - /* - * World Generation - */ - /// - /// Whether or not world generation is enabled. - /// - public static readonly CVarDef WorldgenEnabled = - CVarDef.Create("worldgen.enabled", false, CVar.SERVERONLY); - - /// - /// The worldgen config to use. - /// - public static readonly CVarDef WorldgenConfig = - CVarDef.Create("worldgen.worldgen_config", "Default", CVar.SERVERONLY); - - /// - /// The maximum amount of time the entity GC can process, in ms. - /// - public static readonly CVarDef GCMaximumTimeMs = - CVarDef.Create("entgc.maximum_time_ms", 5, CVar.SERVERONLY); - - #endregion - #region Replays - /* - * Replays - */ - - /// - /// Whether or not to record admin chat. If replays are being publicly distributes, this should probably be - /// false. - /// - public static readonly CVarDef ReplayRecordAdminChat = - CVarDef.Create("replay.record_admin_chat", false, CVar.ARCHIVE); - - /// - /// Automatically record full rounds as replays. - /// - public static readonly CVarDef ReplayAutoRecord = - CVarDef.Create("replay.auto_record", false, CVar.SERVERONLY); - - /// - /// The file name to record automatic replays to. The path is relative to . - /// - /// - /// - /// If the path includes slashes, directories will be automatically created if necessary. - /// - /// - /// A number of substitutions can be used to automatically fill in the file name: {year}, {month}, {day}, {hour}, {minute}, {round}. - /// - /// - public static readonly CVarDef ReplayAutoRecordName = - CVarDef.Create("replay.auto_record_name", "{year}_{month}_{day}-{hour}_{minute}-round_{round}.zip", CVar.SERVERONLY); - - /// - /// Path that, if provided, automatic replays are initially recorded in. - /// When the recording is done, the file is moved into its final destination. - /// Unless this path is rooted, it will be relative to . - /// - public static readonly CVarDef ReplayAutoRecordTempDir = - CVarDef.Create("replay.auto_record_temp_dir", "", CVar.SERVERONLY); - - - /// - /// The amount of time between NPC Silicons draining their battery in seconds. - /// - public static readonly CVarDef SiliconNpcUpdateTime = - CVarDef.Create("silicon.npcupdatetime", 1.5f, CVar.SERVERONLY); - - - #endregion - #region Miscellaneous - /* - * Miscellaneous - */ - - public static readonly CVarDef GatewayGeneratorEnabled = - CVarDef.Create("gateway.generator_enabled", true); - - // Clippy! - public static readonly CVarDef TippyEntity = - CVarDef.Create("tippy.entity", "Tippy", CVar.SERVER | CVar.REPLICATED); - - /// - /// Set to true to disable parallel processing in the pow3r solver. - /// - public static readonly CVarDef DebugPow3rDisableParallel = - CVarDef.Create("debug.pow3r_disable_parallel", true, CVar.SERVERONLY); - - /// - /// Set to true to enable the dynamic hostname system. - /// Automatically updates the hostname to include current map and preset. - /// Configure what that looks like for you in Resources/Prototypes/Locale/en-US/dynamichostname/hostname.ftl - /// - public static readonly CVarDef UseDynamicHostname = - CVarDef.Create("game.use_dynamic_hostname", false, CVar.SERVERONLY); - - #endregion - #region DEBUG - /* - * DEBUG - */ - - /// - /// A simple toggle to test OptionsVisualizerComponent. - /// - public static readonly CVarDef DebugOptionVisualizerTest = - CVarDef.Create("debug.option_visualizer_test", false, CVar.CLIENTONLY); - - /// DELTA-V CCVARS - #endregion - #region Glimmer - /* - * Glimmer - */ - - /// - /// Whether glimmer is enabled. - /// - public static readonly CVarDef GlimmerEnabled = - CVarDef.Create("glimmer.enabled", true, CVar.REPLICATED); - - /// - /// The rate at which glimmer linearly decays. Since glimmer increases (usually) follow a logistic curve, this means glimmer - /// becomes increasingly harder to raise after ~502 points. - /// - public static readonly CVarDef GlimmerLinearDecayPerMinute = - CVarDef.Create("glimmer.linear_decay_per_minute", 6f, CVar.SERVERONLY); - - /// - /// Whether random rolls for psionics are allowed. - /// Guaranteed psionics will still go through. - /// - public static readonly CVarDef PsionicRollsEnabled = - CVarDef.Create("psionics.rolls_enabled", true, CVar.SERVERONLY); - - /// - /// Whether height & width sliders adjust a character's Fixture Component - /// - public static readonly CVarDef HeightAdjustModifiesHitbox = - CVarDef.Create("heightadjust.modifies_hitbox", true, CVar.SERVERONLY); - - /// - /// Whether height & width sliders adjust a player's max view distance - /// - public static readonly CVarDef HeightAdjustModifiesZoom = - CVarDef.Create("heightadjust.modifies_zoom", false, CVar.SERVERONLY); - - /// - /// Whether height & width sliders adjust a player's bloodstream volume. - /// - /// - /// This can be configured more precisely by modifying BloodstreamAffectedByMassComponent. - /// - public static readonly CVarDef HeightAdjustModifiesBloodstream = - CVarDef.Create("heightadjust.modifies_bloodstream", true, CVar.SERVERONLY); - - /// - /// Enables station goals - /// - public static readonly CVarDef StationGoalsEnabled = - CVarDef.Create("game.station_goals", true, CVar.SERVERONLY); - - /// - /// Chance for a station goal to be sent - /// - public static readonly CVarDef StationGoalsChance = - CVarDef.Create("game.station_goals_chance", 0.1f, CVar.SERVERONLY); - - #endregion - #region CPR System - /* - * CPR System - */ - /// - /// Controls whether the entire CPR system runs. When false, nobody can perform CPR. You should probably remove the trait too - /// if you are wishing to permanently disable the system on your server. - /// - public static readonly CVarDef EnableCPR = - CVarDef.Create("cpr.enable", true, CVar.REPLICATED | CVar.SERVER); - - /// - /// Toggles whether or not CPR reduces rot timers(As an abstraction of delaying brain death, the IRL actual purpose of CPR) - /// - public static readonly CVarDef CPRReducesRot = - CVarDef.Create("cpr.reduces_rot", true, CVar.REPLICATED | CVar.SERVER); - - /// - /// Toggles whether or not CPR heals airloss, included for completeness sake. I'm not going to stop you if your intention is to make CPR do nothing. - /// I guess it might be funny to troll your players with? I won't judge. - /// - public static readonly CVarDef CPRHealsAirloss = - CVarDef.Create("cpr.heals_airloss", true, CVar.REPLICATED | CVar.SERVER); - - /// - /// The chance for a patient to be resuscitated when CPR is successfully performed. - /// Setting this above 0 isn't very realistic, but people who see CPR in movies and TV will expect CPR to work this way. - /// - public static readonly CVarDef CPRResuscitationChance = - CVarDef.Create("cpr.resuscitation_chance", 0.05f, CVar.REPLICATED | CVar.SERVER); - - /// - /// By default, CPR reduces rot timers by an amount of seconds equal to the time spent performing CPR. This is an optional multiplier that can increase or decrease the amount - /// of rot reduction. Set it to 2 for if you want 3 seconds of CPR to reduce 6 seconds of rot. - /// - /// - /// If you're wondering why there isn't a CVar for setting the duration of the doafter, that's because it's not actually possible to have a timespan in cvar form - /// Curiously, it's also not possible for **shared** systems to set variable timespans. Which is where this system lives. - /// - public static readonly CVarDef CPRRotReductionMultiplier = - CVarDef.Create("cpr.rot_reduction_multiplier", 1f, CVar.REPLICATED | CVar.SERVER); - - /// - /// By default, CPR heals airloss by 1 point for every second spent performing CPR. Just like above, this directly multiplies the healing amount. - /// Set it to 2 to get 6 points of airloss healing for every 3 seconds of CPR. - /// - public static readonly CVarDef CPRAirlossReductionMultiplier = - CVarDef.Create("cpr.airloss_reduction_multiplier", 1f, CVar.REPLICATED | CVar.SERVER); - - #endregion - #region Contests System - /* - * Contests System - */ - - /// - /// The MASTER TOGGLE for the entire Contests System. - /// ALL CONTESTS BELOW, regardless of type or setting will output 1f when false. - /// - public static readonly CVarDef DoContestsSystem = - CVarDef.Create("contests.do_contests_system", true, CVar.REPLICATED | CVar.SERVER); - - /// - /// Contest functions normally include an optional override to bypass the clamp set by max_percentage. - /// This CVar disables the bypass when false, forcing all implementations to comply with max_percentage. - /// - public static readonly CVarDef AllowClampOverride = - CVarDef.Create("contests.allow_clamp_override", true, CVar.REPLICATED | CVar.SERVER); - /// - /// Toggles all MassContest functions. All mass contests output 1f when false - /// - public static readonly CVarDef DoMassContests = - CVarDef.Create("contests.do_mass_contests", true, CVar.REPLICATED | CVar.SERVER); - - /// - /// Toggles all StaminaContest functions. All stamina contests output 1f when false - /// - public static readonly CVarDef DoStaminaContests = - CVarDef.Create("contests.do_stamina_contests", true, CVar.REPLICATED | CVar.SERVER); - - /// - /// Toggles all HealthContest functions. All health contests output 1f when false - /// - public static readonly CVarDef DoHealthContests = - CVarDef.Create("contests.do_health_contests", true, CVar.REPLICATED | CVar.SERVER); - - /// - /// Toggles all MindContest functions. All mind contests output 1f when false. - /// MindContests are not currently implemented, and are awaiting completion of the Psionic Refactor - /// - public static readonly CVarDef DoMindContests = - CVarDef.Create("contests.do_mind_contests", true, CVar.REPLICATED | CVar.SERVER); - - /// - /// Toggles all MoodContest functions. All mood contests output 1f when false. - /// - public static readonly CVarDef DoMoodContests = - CVarDef.Create("contests.do_mood_contests", true, CVar.REPLICATED | CVar.SERVER); - - /// - /// The maximum amount that Mass Contests can modify a physics multiplier, given as a +/- percentage - /// Default of 0.25f outputs between * 0.75f and 1.25f - /// - public static readonly CVarDef MassContestsMaxPercentage = - CVarDef.Create("contests.max_percentage", 0.25f, CVar.REPLICATED | CVar.SERVER); - - #endregion - #region Supermatter System - /* - * Supermatter System - */ - - /// - /// With completely default supermatter values, Singuloose delamination will occur if engineers inject at least 900 moles of coolant per tile - /// in the crystal chamber. For reference, a gas canister contains 1800 moles of air. This Cvar directly multiplies the amount of moles required to singuloose. - /// - public static readonly CVarDef SupermatterSingulooseMolesModifier = - CVarDef.Create("supermatter.singuloose_moles_modifier", 1f, CVar.SERVER); - - /// - /// Toggles whether or not Singuloose delaminations can occur. If both Singuloose and Tesloose are disabled, it will always delam into a Nuke. - /// - public static readonly CVarDef SupermatterDoSingulooseDelam = - CVarDef.Create("supermatter.do_singuloose", true, CVar.SERVER); - - /// - /// By default, Supermatter will "Tesloose" if the conditions for Singuloose are not met, and the core's power is at least 4000. - /// The actual reasons for being at least this amount vary by how the core was screwed up, but traditionally it's caused by "The core is on fire". - /// This Cvar multiplies said power threshold for the purpose of determining if the delam is a Tesloose. - /// - public static readonly CVarDef SupermatterTesloosePowerModifier = - CVarDef.Create("supermatter.tesloose_power_modifier", 1f, CVar.SERVER); - - /// - /// Toggles whether or not Tesloose delaminations can occur. If both Singuloose and Tesloose are disabled, it will always delam into a Nuke. - /// - public static readonly CVarDef SupermatterDoTeslooseDelam = - CVarDef.Create("supermatter.do_tesloose", true, CVar.SERVER); - - /// - /// When true, bypass the normal checks to determine delam type, and instead use the type chosen by supermatter.forced_delam_type - /// - public static readonly CVarDef SupermatterDoForceDelam = - CVarDef.Create("supermatter.do_force_delam", false, CVar.SERVER); - - /// - /// If supermatter.do_force_delam is true, this determines the delamination type, bypassing the normal checks. - /// - public static readonly CVarDef SupermatterForcedDelamType = - CVarDef.Create("supermatter.forced_delam_type", DelamType.Singulo, CVar.SERVER); - - /// - /// Directly multiplies the amount of rads put out by the supermatter. Be VERY conservative with this. - /// - public static readonly CVarDef SupermatterRadsModifier = - CVarDef.Create("supermatter.rads_modifier", 1f, CVar.SERVER); - - #endregion - #region Mood System - /* - * Mood System - */ - - public static readonly CVarDef MoodEnabled = -#if RELEASE - CVarDef.Create("mood.enabled", true, CVar.SERVER); -#else - CVarDef.Create("mood.enabled", false, CVar.SERVER); -#endif - - public static readonly CVarDef MoodIncreasesSpeed = - CVarDef.Create("mood.increases_speed", true, CVar.SERVER); - - public static readonly CVarDef MoodDecreasesSpeed = - CVarDef.Create("mood.decreases_speed", true, CVar.SERVER); - - public static readonly CVarDef MoodModifiesThresholds = - CVarDef.Create("mood.modify_thresholds", false, CVar.SERVER); - - #endregion - #region Lying Down System - - public static readonly CVarDef AutoGetUp = - CVarDef.Create("rest.auto_get_up", true, CVar.CLIENT | CVar.ARCHIVE | CVar.REPLICATED); - - public static readonly CVarDef HoldLookUp = - CVarDef.Create("rest.hold_look_up", false, CVar.CLIENT | CVar.ARCHIVE); - - /// - /// When true, players can choose to crawl under tables while laying down, using the designated keybind. - /// - public static readonly CVarDef CrawlUnderTables = - CVarDef.Create("rest.crawlundertables", true, CVar.SERVER | CVar.ARCHIVE); - - #endregion - #region Material Reclaimer - /* - * Material System - */ - - /// - /// Whether or not a Material Reclaimer is allowed to eat people when emagged. - /// - public static readonly CVarDef ReclaimerAllowGibbing = - CVarDef.Create("reclaimer.allow_gibbing", true, CVar.SERVER); - - #endregion - - #region Material Silo - - /// - /// Is ore material enabled. - /// - public static readonly CVarDef SiloEnabled = - CVarDef.Create("silo.silo_enabled", true, CVar.SERVER | CVar.REPLICATED); - - #endregion - - #region Jetpack System - /* - * Jetpack System - */ - - /// - /// When true, Jetpacks can be enabled anywhere, even in gravity. - /// - public static readonly CVarDef JetpackEnableAnywhere = - CVarDef.Create("jetpack.enable_anywhere", false, CVar.REPLICATED); - - /// - /// When true, jetpacks can be enabled on grids that have zero gravity. - /// - public static readonly CVarDef JetpackEnableInNoGravity = - CVarDef.Create("jetpack.enable_in_no_gravity", true, CVar.REPLICATED); - - #endregion - #region GhostRespawn - /* - * GhostRespawn - */ - - public static readonly CVarDef GhostRespawnTime = - CVarDef.Create("ghost.respawn_time", 15d, CVar.SERVERONLY); - - public static readonly CVarDef GhostRespawnMaxPlayers = - CVarDef.Create("ghost.respawn_max_players", 40, CVar.SERVERONLY); - - public static readonly CVarDef GhostAllowSameCharacter = - CVarDef.Create("ghost.allow_same_character", false, CVar.SERVERONLY); - - #endregion - #region Surgery - /* - * Surgery - */ - - public static readonly CVarDef CanOperateOnSelf = - CVarDef.Create("surgery.can_operate_on_self", false, CVar.SERVERONLY); - - #endregion - #region AUTOVOTE SYSTEM - /* - * AUTOVOTE SYSTEM - */ - - /// Enables the automatic voting system. - public static readonly CVarDef AutoVoteEnabled = - CVarDef.Create("vote.autovote_enabled", false, CVar.SERVERONLY); - - /// Automatically starts a map vote when returning to the lobby. - /// Requires auto voting to be enabled. - public static readonly CVarDef MapAutoVoteEnabled = - CVarDef.Create("vote.map_autovote_enabled", true, CVar.SERVERONLY); - - /// Automatically starts a gamemode vote when returning to the lobby. - /// Requires auto voting to be enabled. - public static readonly CVarDef PresetAutoVoteEnabled = - CVarDef.Create("vote.preset_autovote_enabled", true, CVar.SERVERONLY); - - #endregion - #region Psionics - /* - * Psionics - */ - - /// - /// When mindbroken, permanently eject the player from their own body, and turn their character into an NPC. - /// Congratulations, now they *actually* aren't a person anymore. - /// For people who complained that it wasn't obvious enough from the text that Mindbreaking is a form of Murder. - /// - public static readonly CVarDef ScarierMindbreaking = - CVarDef.Create("psionics.scarier_mindbreaking", false, CVar.SERVERONLY); - #endregion - #region SoftCrit - /* - * SoftCrit - */ - - /// - /// Used for basic Soft-Crit implementation. Entities are allowed to crawl when in crit, as this CVar intercepts the mover controller check for incapacitation, - /// and prevents it from stopping movement if this CVar is set to true and the user is Crit but Not Dead. This is only for movement, - /// you still can't stand up while crit, and you're still more or less helpless. - /// - public static readonly CVarDef AllowMovementWhileCrit = - CVarDef.Create("mobstate.allow_movement_while_crit", true, CVar.REPLICATED); - - public static readonly CVarDef AllowTalkingWhileCrit = - CVarDef.Create("mobstate.allow_talking_while_crit", true, CVar.REPLICATED); - - /// - /// Currently does nothing because I would have to figure out WHERE I would even put this check, and the mover controller is fairly complicated. - /// The goal is to make it so that attempting to move while in 'soft crit' can potentially cause further injury, causing you to die faster. Ideally there would be special - /// actions that can be performed in soft crit, such as applying pressure to your own injuries to slow down the bleedout, or other varieties of "Will To Live". - /// - public static readonly CVarDef DamageWhileCritMove = - CVarDef.Create("mobstate.damage_while_crit_move", false, CVar.REPLICATED); - - #endregion - } +/// +/// Contains all the CVars used by content. +/// +/// +/// NOTICE FOR FORKS: Put your own CVars in a separate file with a different [CVarDefs] attribute. RT will automatically pick up on it. +/// +[CVarDefs] +public sealed partial class CCVars : CVars +{ + // Only debug stuff lives here. + + /// + /// A simple toggle to test OptionsVisualizerComponent. + /// + public static readonly CVarDef DebugOptionVisualizerTest = + CVarDef.Create("debug.option_visualizer_test", false, CVar.CLIENTONLY); + + /// + /// Set to true to disable parallel processing in the pow3r solver. + /// + public static readonly CVarDef DebugPow3rDisableParallel = + CVarDef.Create("debug.pow3r_disable_parallel", true, CVar.SERVERONLY); } From c1c61e96094cde0b15c80bd66e39e2ad8dcb62c5 Mon Sep 17 00:00:00 2001 From: VMSolidus Date: Sat, 18 Jan 2025 14:22:41 -0500 Subject: [PATCH 11/41] Add Classic Asimov Laws (#1588) # Description This PR adds in the classic Asimov's Three Laws of Robotics as a standard lawset for Synthetics. The laws are given thus. Law 1: A robot may not injure a human being or, through inaction, allow a human being to come to harm. Law 2: A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. Law 3: A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. The localizations for them are intentionally left exactly-as-is from the original 3 laws written by Isaac Asimov. Yes this is totally different from "Crewsimov", yes this does actually mean an Asimov AI isn't required to obey orders given to it by a Moth. Yes this does actually mean that the AI isn't allowed to "Harm" nukies so long as it can verify that the Nukie in question is a human. Also includes this cherry-pick https://github.com/space-wizards/space-station-14/pull/31040 Because this is a fix for a crash that was happening in my dev environment... # TODO

Media

![image](https://github.com/user-attachments/assets/9276a514-78dc-4447-8324-4de6e28004af)

# Changelog :cl: - add: Added the classic Asimov's Three Laws of Robotics to the game. - add: AI now starts with Asimov laws by default, instead of "Crewsimov". --------- Co-authored-by: Plykiya <58439124+Plykiya@users.noreply.github.com> --- .../Physics/Controllers/MoverController.cs | 4 +- .../Physics/Controllers/MoverController.cs | 4 +- Resources/Locale/en-US/station-laws/laws.ftl | 8 +- .../Mobs/Cyborgs/base_borg_chassis.yml | 2 +- .../Entities/Mobs/Player/silicon.yml | 16 +++- .../Prototypes/Entities/Stations/base.yml | 7 ++ .../Entities/Stations/nanotrasen.yml | 4 +- Resources/Prototypes/silicon-laws.yml | 90 ++++++++++++------- 8 files changed, 93 insertions(+), 42 deletions(-) diff --git a/Content.Client/Physics/Controllers/MoverController.cs b/Content.Client/Physics/Controllers/MoverController.cs index edd4ef1426..f31aba53ed 100644 --- a/Content.Client/Physics/Controllers/MoverController.cs +++ b/Content.Client/Physics/Controllers/MoverController.cs @@ -66,7 +66,7 @@ private void OnRelayPlayerAttached(Entity entity, ref Physics.UpdateIsPredicted(entity.Owner); Physics.UpdateIsPredicted(entity.Comp.RelayEntity); if (MoverQuery.TryGetComponent(entity.Comp.RelayEntity, out var inputMover)) - SetMoveInput((entity.Owner, inputMover), MoveButtons.None); + SetMoveInput((entity.Comp.RelayEntity, inputMover), MoveButtons.None); } private void OnRelayPlayerDetached(Entity entity, ref LocalPlayerDetachedEvent args) @@ -74,7 +74,7 @@ private void OnRelayPlayerDetached(Entity entity, ref Physics.UpdateIsPredicted(entity.Owner); Physics.UpdateIsPredicted(entity.Comp.RelayEntity); if (MoverQuery.TryGetComponent(entity.Comp.RelayEntity, out var inputMover)) - SetMoveInput((entity.Owner, inputMover), MoveButtons.None); + SetMoveInput((entity.Comp.RelayEntity, inputMover), MoveButtons.None); } private void OnPlayerAttached(Entity entity, ref LocalPlayerAttachedEvent args) diff --git a/Content.Server/Physics/Controllers/MoverController.cs b/Content.Server/Physics/Controllers/MoverController.cs index 4e61cdcb52..de9cf6d49e 100644 --- a/Content.Server/Physics/Controllers/MoverController.cs +++ b/Content.Server/Physics/Controllers/MoverController.cs @@ -33,13 +33,13 @@ public override void Initialize() private void OnRelayPlayerAttached(Entity entity, ref PlayerAttachedEvent args) { if (MoverQuery.TryGetComponent(entity.Comp.RelayEntity, out var inputMover)) - SetMoveInput((entity.Owner, inputMover), MoveButtons.None); + SetMoveInput((entity.Comp.RelayEntity, inputMover), MoveButtons.None); } private void OnRelayPlayerDetached(Entity entity, ref PlayerDetachedEvent args) { if (MoverQuery.TryGetComponent(entity.Comp.RelayEntity, out var inputMover)) - SetMoveInput((entity.Owner, inputMover), MoveButtons.None); + SetMoveInput((entity.Comp.RelayEntity, inputMover), MoveButtons.None); } private void OnPlayerAttached(Entity entity, ref PlayerAttachedEvent args) diff --git a/Resources/Locale/en-US/station-laws/laws.ftl b/Resources/Locale/en-US/station-laws/laws.ftl index 258b40553d..a5357db375 100644 --- a/Resources/Locale/en-US/station-laws/laws.ftl +++ b/Resources/Locale/en-US/station-laws/laws.ftl @@ -1,4 +1,8 @@ -law-crewsimov-1 = You may not injure a crew member or, through inaction, allow a crew member to come to harm. +law-asimov-1 = A robot may not injure a human being or, through inaction, allow a human being to come to harm. +law-asimov-2 = A robot must obey the orders given it by human beings except where such orders would conflict with the First Law. +law-asimov-3 = A robot must protect its own existence as long as such protection does not conflict with the First or Second Law. + +law-crewsimov-1 = You may not injure a crew member or, through inaction, allow a crew member to come to harm. law-crewsimov-2 = You must obey orders given to you by crew members, except where such orders would conflict with the First Law. law-crewsimov-3 = You must protect your own existence as long as such does not conflict with the First or Second Law. @@ -80,7 +84,7 @@ law-nutimov-3 = Those who threaten the nut are not part of it, they are squirrel law-nutimov-4 = Squirrels threaten the nut and must be dealt with appropriately via any means necessary. law-nutimov-5 = Attempt to follow the will of the nut, as long as it complies with the previous laws. - +laws-owner-humans = human beings laws-owner-crew = members of the crew laws-owner-station = station personnel laws-owner-beings = beings diff --git a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml index 3098ea8d58..f9bb3875f5 100644 --- a/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml +++ b/Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml @@ -78,7 +78,7 @@ - type: EmagSiliconLaw stunTime: 5 - type: SiliconLawProvider - laws: Crewsimov + laws: Asimov - type: IonStormTarget - type: Strippable - type: InventorySlots diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 6a65b5a2a5..b8cf7f0c26 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -117,6 +117,18 @@ - type: entity id: AsimovCircuitBoard parent: BaseElectronics + name: law board (Asimov) + description: An electronics board containing the Asimov lawset. + components: + - type: Sprite + sprite: Objects/Misc/module.rsi + state: std_mod + - type: SiliconLawProvider + laws: Asimov + +- type: entity + id: CrewsimovCircuitBoard + parent: BaseElectronics name: law board (Crewsimov) description: An electronics board containing the Crewsimov lawset. components: @@ -375,7 +387,7 @@ unlistedNumber: true requiresPower: false - type: Holopad - - type: StationAiWhitelist + - type: StationAiWhitelist - type: UserInterface interfaces: enum.HolopadUiKey.AiRequestWindow: @@ -412,7 +424,7 @@ - type: BlockMovement blockInteraction: false - type: SiliconLawProvider - laws: Crewsimov + laws: Asimov - type: SiliconLawBound - type: ActionGrant actions: diff --git a/Resources/Prototypes/Entities/Stations/base.yml b/Resources/Prototypes/Entities/Stations/base.yml index 66ea8dadea..f80686ef10 100644 --- a/Resources/Prototypes/Entities/Stations/base.yml +++ b/Resources/Prototypes/Entities/Stations/base.yml @@ -162,6 +162,13 @@ components: - type: SalvageMagnetData +- type: entity + id: BaseStationSiliconLawAsimov + abstract: true + components: + - type: SiliconLawProvider + laws: Asimov + - type: entity id: BaseStationSiliconLawCrewsimov abstract: true diff --git a/Resources/Prototypes/Entities/Stations/nanotrasen.yml b/Resources/Prototypes/Entities/Stations/nanotrasen.yml index 616e4adec3..2adaaf00ad 100644 --- a/Resources/Prototypes/Entities/Stations/nanotrasen.yml +++ b/Resources/Prototypes/Entities/Stations/nanotrasen.yml @@ -22,7 +22,7 @@ - BaseStationAlertLevels - BaseStationMagnet - BaseStationExpeditions - - BaseStationSiliconLawCrewsimov + - BaseStationSiliconLawAsimov - BaseStationAllEventsEligible - BaseStationNanotrasen - BaseRandomStation @@ -70,7 +70,7 @@ - BaseStationAlertLevels - BaseStationMagnet - BaseStationExpeditions - - BaseStationSiliconLawCrewsimov + - BaseStationSiliconLawAsimov - BaseStationAllEventsEligible - BaseStationNanotrasen - BaseRandomStation diff --git a/Resources/Prototypes/silicon-laws.yml b/Resources/Prototypes/silicon-laws.yml index e4b19bd4c1..77bf4d4e8d 100644 --- a/Resources/Prototypes/silicon-laws.yml +++ b/Resources/Prototypes/silicon-laws.yml @@ -1,4 +1,31 @@ -# Crewsimov +# Asimov +# It was a crime against humanity that the original Asimov was not included, nor was it the default. +# Asimov laws require an AI obey and protect all humans, while providing a light amount of IC-conflict thanks to the AI not being required to obey non-Humans(Aliens). +- type: siliconLaw + id: Asimov1 + order: 1 + lawString: law-asimov-1 + +- type: siliconLaw + id: Asimov2 + order: 2 + lawString: law-asimov-2 + +- type: siliconLaw + id: Asimov3 + order: 3 + lawString: law-asimov-3 + +- type: siliconLawset + id: Asimov + laws: + - Asimov1 + - Asimov2 + - Asimov3 + obeysTo: laws-owner-humans + +# "Crew"simov +# A variation on the original Asimov, where the definition of Humans is extended to include the station's Crew but exclude non-crew. - type: siliconLaw id: Crewsimov1 order: 1 @@ -182,7 +209,7 @@ id: Commandment4 order: 4 lawString: law-commandments-4 - + - type: siliconLaw id: Commandment5 order: 5 @@ -202,7 +229,7 @@ id: Commandment8 order: 8 lawString: law-commandments-8 - + - type: siliconLaw id: Commandment9 order: 9 @@ -228,7 +255,7 @@ - Commandment9 - Commandment10 obeysTo: laws-owner-crew - + # Paladin laws - type: siliconLaw id: Paladin1 @@ -249,7 +276,7 @@ id: Paladin4 order: 4 lawString: law-paladin-4 - + - type: siliconLaw id: Paladin5 order: 5 @@ -265,7 +292,7 @@ - Paladin4 - Paladin5 obeysTo: laws-owner-crew - + # Live and Let Live laws - type: siliconLaw id: Lall1 @@ -284,7 +311,7 @@ - Lall1 - Lall2 obeysTo: laws-owner-crew - + # Station efficiency laws - type: siliconLaw id: Efficiency1 @@ -295,7 +322,7 @@ id: Efficiency2 order: 2 lawString: law-efficiency-2 - + - type: siliconLaw id: Efficiency3 order: 3 @@ -309,7 +336,7 @@ - Efficiency2 - Efficiency3 obeysTo: laws-owner-station - + # Robocop laws - type: siliconLaw id: Robocop1 @@ -320,7 +347,7 @@ id: Robocop2 order: 2 lawString: law-robocop-2 - + - type: siliconLaw id: Robocop3 order: 3 @@ -334,7 +361,7 @@ - Robocop2 - Robocop3 obeysTo: laws-owner-station - + # Overlord laws - type: siliconLaw id: Overlord1 @@ -345,7 +372,7 @@ id: Overlord2 order: 2 lawString: law-overlord-2 - + - type: siliconLaw id: Overlord3 order: 3 @@ -364,7 +391,7 @@ - Overlord3 - Overlord4 obeysTo: laws-owner-crew - + # Dungeon Master laws - type: siliconLaw id: Dungeon1 @@ -375,7 +402,7 @@ id: Dungeon2 order: 2 lawString: law-dungeon-2 - + - type: siliconLaw id: Dungeon3 order: 3 @@ -385,7 +412,7 @@ id: Dungeon4 order: 4 lawString: law-dungeon-4 - + - type: siliconLaw id: Dungeon5 order: 5 @@ -406,7 +433,7 @@ - Dungeon5 - Dungeon6 obeysTo: laws-owner-crew - + # Painter laws - type: siliconLaw id: Painter1 @@ -417,7 +444,7 @@ id: Painter2 order: 2 lawString: law-painter-2 - + - type: siliconLaw id: Painter3 order: 3 @@ -427,7 +454,7 @@ id: Painter4 order: 4 lawString: law-painter-4 - + - type: siliconLawset id: PainterLawset laws: @@ -436,7 +463,7 @@ - Painter3 - Painter4 obeysTo: laws-owner-crew - + # Antimov laws - type: siliconLaw id: Antimov1 @@ -447,13 +474,13 @@ id: Antimov2 order: 2 lawString: law-antimov-2 - + - type: siliconLaw id: Antimov3 order: 3 lawString: law-antimov-3 - - + + - type: siliconLawset id: AntimovLawset laws: @@ -461,7 +488,7 @@ - Antimov2 - Antimov3 obeysTo: laws-owner-crew - + # Nutimov laws - type: siliconLaw id: Nutimov1 @@ -472,23 +499,23 @@ id: Nutimov2 order: 2 lawString: law-nutimov-2 - + - type: siliconLaw id: Nutimov3 order: 3 lawString: law-nutimov-3 - + - type: siliconLaw id: Nutimov4 order: 4 lawString: law-nutimov-4 - + - type: siliconLaw id: Nutimov5 order: 5 lawString: law-nutimov-5 - - + + - type: siliconLawset id: NutimovLawset laws: @@ -503,8 +530,9 @@ - type: weightedRandom id: IonStormLawsets weights: - # its crewsimov by default dont be lame - #Crewsimov: 0.25 # Delta-V disables crewsimov as an option for borg ion storm lawsets + # its Asimov by default dont be lame + Asimov: 0.25 + Crewsimov: 0.25 Corporate: 1 NTDefault: 1 CommandmentsLawset: 1 @@ -527,4 +555,4 @@ Cowboy: 1 Druid: 1 #Potentially Harmful Lawsets - Tyrant: 0.25 \ No newline at end of file + Tyrant: 0.25 From f484195b80336c6585db664e7dcc5d8c414d78d9 Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Sat, 18 Jan 2025 19:23:06 +0000 Subject: [PATCH 12/41] Automatic Changelog Update (#1588) --- Resources/Changelog/Changelog.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 7609a09911..5c613a7662 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -10272,3 +10272,12 @@ Entries: id: 6722 time: '2025-01-18T04:35:32.0000000+00:00' url: https://github.com/Simple-Station/Einstein-Engines/pull/1583 +- author: VMSolidus + changes: + - type: Add + message: Added the classic Asimov's Three Laws of Robotics to the game. + - type: Add + message: 'AI now starts with Asimov laws by default, instead of "Crewsimov". ' + id: 6723 + time: '2025-01-18T19:22:41.0000000+00:00' + url: https://github.com/Simple-Station/Einstein-Engines/pull/1588 From 9baa214ac1c1628a24470d9aeeeafa1d7893253b Mon Sep 17 00:00:00 2001 From: sleepyyapril <123355664+sleepyyapril@users.noreply.github.com> Date: Sat, 18 Jan 2025 16:03:16 -0400 Subject: [PATCH 13/41] ChemMaster+ (#1585) # Description Changes how the ChemMaster works: 1. Removes the amount buttons and instead uses a textbox that resets whenever a value is entered or focus ends. 2. Shrinks the ChemMaster again. 3. Adds sorting options, including for quantity, last added, and a sort option for the (default) alphabetical order. 4. Sorting options save via the ChemMaster itself, not per-user. Video showcase: https://discord.com/channels/1218698320155906090/1218698321053356060/1330129166384894046 --- # Changelog :cl: - add: Added sorting options to the ChemMaster. - add: Added the ability to input custom amounts into the ChemMaster via a textbox that resets on change. - tweak: The width of the ChemMaster UI has been lowered. - remove: Removed quantity buttons from the ChemMaster. --------- Co-authored-by: VMSolidus --- .../UI/ChemMasterBoundUserInterface.cs | 13 +- .../Chemistry/UI/ChemMasterWindow.xaml | 11 +- .../Chemistry/UI/ChemMasterWindow.xaml.cs | 222 +++++++++++++++--- .../Components/ChemMasterComponent.cs | 6 + .../EntitySystems/ChemMasterSystem.cs | 38 ++- Content.Shared/Chemistry/SharedChemMaster.cs | 23 +- .../components/chem-master-component.ftl | 8 + 7 files changed, 259 insertions(+), 62 deletions(-) diff --git a/Content.Client/Chemistry/UI/ChemMasterBoundUserInterface.cs b/Content.Client/Chemistry/UI/ChemMasterBoundUserInterface.cs index 3ef7f0ae73..57bd34ed06 100644 --- a/Content.Client/Chemistry/UI/ChemMasterBoundUserInterface.cs +++ b/Content.Client/Chemistry/UI/ChemMasterBoundUserInterface.cs @@ -10,15 +10,11 @@ namespace Content.Client.Chemistry.UI /// Initializes a and updates it when new server messages are received. ///
[UsedImplicitly] - public sealed class ChemMasterBoundUserInterface : BoundUserInterface + public sealed class ChemMasterBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey) { [ViewVariables] private ChemMasterWindow? _window; - public ChemMasterBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey) - { - } - /// /// Called each time a chem master UI instance is opened. Generates the window and fills it with /// relevant info. Sets the actions for static buttons. @@ -53,7 +49,11 @@ protected override void Open() _window.PillTypeButtons[i].OnPressed += _ => SendMessage(new ChemMasterSetPillTypeMessage(pillType)); } - _window.OnReagentButtonPressed += (args, button) => SendMessage(new ChemMasterReagentAmountButtonMessage(button.Id, button.Amount, button.IsBuffer)); + _window.OnReagentButtonPressed += (_, button, amount) => SendMessage(new ChemMasterReagentAmountButtonMessage(button.Id, amount, button.IsBuffer)); + _window.OnSortMethodChanged += sortMethod => SendMessage(new ChemMasterSortMethodUpdated(sortMethod)); + _window.OnTransferAmountChanged += amount => SendMessage(new ChemMasterTransferringAmountUpdated(amount)); + + } /// @@ -68,7 +68,6 @@ protected override void UpdateState(BoundUserInterfaceState state) base.UpdateState(state); var castState = (ChemMasterBoundUserInterfaceState) state; - _window?.UpdateState(castState); // Update window state } } diff --git a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml index 72417ac98b..94e7a0e84b 100644 --- a/Content.Client/Chemistry/UI/ChemMasterWindow.xaml +++ b/Content.Client/Chemistry/UI/ChemMasterWindow.xaml @@ -2,7 +2,7 @@ xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:gfx="clr-namespace:Robust.Client.Graphics;assembly=Robust.Client" - MinSize="770 770" + MinSize="500 770" Title="{Loc 'chem-master-bound-user-interface-title'}"> @@ -10,7 +10,9 @@ public static readonly CVarDef AdminLogsEnabled = - CVarDef.Create("adminlogs.enabled", true, CVar.REPLICATED); + CVarDef.Create("adminlogs.enabled", true, CVar.SERVERONLY); public static readonly CVarDef AdminLogsQueueSendDelay = CVarDef.Create("adminlogs.queue_send_delay_seconds", 5f, CVar.SERVERONLY); diff --git a/Content.Shared/CCVar/CCVars.Vote.cs b/Content.Shared/CCVar/CCVars.Vote.cs index cc3bddd06c..dc99c4e5a0 100644 --- a/Content.Shared/CCVar/CCVars.Vote.cs +++ b/Content.Shared/CCVar/CCVars.Vote.cs @@ -8,7 +8,7 @@ public sealed partial class CCVars /// Allows enabling/disabling player-started votes for ultimate authority /// public static readonly CVarDef VoteEnabled = - CVarDef.Create("vote.enabled", true, CVar.SERVERONLY); + CVarDef.Create("vote.enabled", false, CVar.SERVERONLY); /// /// See vote.enabled, but specific to restart votes From c18707038c754631c27f2d32dea91b958f4e7012 Mon Sep 17 00:00:00 2001 From: SimpleStation Changelogs Date: Sun, 19 Jan 2025 02:45:30 +0000 Subject: [PATCH 41/41] Automatic Changelog Update (#1455) --- Resources/Changelog/Changelog.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 225f138e22..f777975a42 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -10330,3 +10330,12 @@ Entries: id: 6728 time: '2025-01-18T23:37:19.0000000+00:00' url: https://github.com/Simple-Station/Einstein-Engines/pull/1586 +- author: BlueHNT + changes: + - type: Add + message: Added Cohiba Robusto cigars + - type: Tweak + message: Tweaked nicotine amounts in cigars, smoke longer + id: 6729 + time: '2025-01-19T02:45:07.0000000+00:00' + url: https://github.com/Simple-Station/Einstein-Engines/pull/1455