diff --git a/Content.Server/_CP14/Demiplane/CP14DemiplanSystem.Generation.cs b/Content.Server/_CP14/Demiplane/CP14DemiplanSystem.Generation.cs index 026f7c40d2..3a7cc2c1a8 100644 --- a/Content.Server/_CP14/Demiplane/CP14DemiplanSystem.Generation.cs +++ b/Content.Server/_CP14/Demiplane/CP14DemiplanSystem.Generation.cs @@ -241,14 +241,20 @@ public sealed partial class CP14DemiplaneSystem //Tier filter if (passed) { + var innerPassed = false; foreach (var tier in modifier.Tiers) { - if (!generator.Comp.TiersContent.ContainsKey(tier)) + if (generator.Comp.TiersContent.ContainsKey(tier)) { - passed = false; + innerPassed = true; break; } } + + if (!innerPassed) + { + passed = false; + } } // Tier weight filter @@ -257,7 +263,8 @@ public sealed partial class CP14DemiplaneSystem var maxProb = 0f; foreach (var tier in modifier.Tiers) { - maxProb = Math.Max(maxProb, generator.Comp.TiersContent[tier]); + if (generator.Comp.TiersContent.ContainsKey(tier)) + maxProb = Math.Max(maxProb, generator.Comp.TiersContent[tier]); } if (!_random.Prob(maxProb)) diff --git a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellConsumeMana.cs b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellConsumeMana.cs index a88062fc93..2672ee7b66 100644 --- a/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellConsumeMana.cs +++ b/Content.Shared/_CP14/MagicSpell/Spells/CP14SpellConsumeMana.cs @@ -13,7 +13,7 @@ public sealed partial class CP14SpellConsumeManaEffect : CP14SpellEffect public bool Safe = false; [DataField] - public float LossMultiplier = 0.8f; + public float LossMultiplier = 1.0f; public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args) { diff --git a/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.Access.cs b/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.Access.cs index 605ffa9861..062811a248 100644 --- a/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.Access.cs +++ b/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.Access.cs @@ -42,6 +42,9 @@ public sealed partial class CP14SpellStorageSystem private void OnClothingAddedAttune(Entity ent, ref AddedAttuneToMindEvent args) { + if (!ent.Comp.Wearing) + return; + if (!TryComp(ent, out var spellStorage)) return; @@ -51,7 +54,7 @@ public sealed partial class CP14SpellStorageSystem if (!TryComp(ent, out var clothing)) return; - if (clothing.InSlot is null || Transform(ent).ParentUid != args.User) + if (Transform(ent).ParentUid != args.User) return; TryGrantAccess((ent, spellStorage), args.User.Value); @@ -59,6 +62,8 @@ public sealed partial class CP14SpellStorageSystem private void OnClothingEquipped(Entity ent, ref ClothingGotEquippedEvent args) { + ent.Comp.Wearing = true; + if (!TryComp(ent, out var spellStorage)) return; @@ -67,7 +72,8 @@ public sealed partial class CP14SpellStorageSystem private void OnClothingUnequipped(Entity ent, ref ClothingGotUnequippedEvent args) { + ent.Comp.Wearing = false; + _actions.RemoveProvidedActions(args.Wearer, ent); } - } diff --git a/Content.Shared/_CP14/MagicSpellStorage/Components/CP14SpellStorageAccessWearingComponent.cs b/Content.Shared/_CP14/MagicSpellStorage/Components/CP14SpellStorageAccessWearingComponent.cs index c1ecd74ae1..e507de20a2 100644 --- a/Content.Shared/_CP14/MagicSpellStorage/Components/CP14SpellStorageAccessWearingComponent.cs +++ b/Content.Shared/_CP14/MagicSpellStorage/Components/CP14SpellStorageAccessWearingComponent.cs @@ -6,4 +6,6 @@ namespace Content.Shared._CP14.MagicSpellStorage.Components; [RegisterComponent, Access(typeof(CP14SpellStorageSystem))] public sealed partial class CP14SpellStorageAccessWearingComponent : Component { + [DataField] + public bool Wearing; } diff --git a/Resources/Prototypes/_CP14/Catalog/Fills/crates.yml b/Resources/Prototypes/_CP14/Catalog/Fills/crates.yml index ca74cc8fe1..97d1a93241 100644 --- a/Resources/Prototypes/_CP14/Catalog/Fills/crates.yml +++ b/Resources/Prototypes/_CP14/Catalog/Fills/crates.yml @@ -56,6 +56,20 @@ - id: CP14BaseMop - id: CP14ModularIronPickaxe - id: CP14ModularIronSickle + - !type:GroupSelector + children: + - id: CP14Candle + - id: CP14CandleRed + - id: CP14CandleBlue + - id: CP14CandleBlack + - id: CP14CandleGreen + - id: CP14CandlePurple + - id: CP14CandleSmall + - id: CP14CandleRedSmall + - id: CP14CandleBlueSmall + - id: CP14CandleBlackSmall + - id: CP14CandleGreenSmall + - id: CP14CandlePurpleSmall - !type:GroupSelector children: - id: CP14CrystalLampBlueEmpty diff --git a/Resources/Prototypes/_CP14/DayCycle/cycles.yml b/Resources/Prototypes/_CP14/DayCycle/cycles.yml new file mode 100644 index 0000000000..b7f4bc7f12 --- /dev/null +++ b/Resources/Prototypes/_CP14/DayCycle/cycles.yml @@ -0,0 +1,33 @@ +- type: CP14DayCycle # + id: Default + timeEntries: + - color: '#754A4A' #Dawn + duration: 145 + - color: '#E0BA87' # + duration: 145 + - color: '#BFEEFF' #Day + duration: 145 + - color: '#385163' #Evening + duration: 145 + period: Night + - color: '#060D12' #Night + duration: 80 + period: Night + - color: '#000000' #BLACK NIGHT + duration: 160 + period: Night + - color: '#120906' #Night + duration: 80 + period: Night + +- type: CP14DayCycle + id: CP14DemiplaneEternalDay + timeEntries: + - color: '#754A4A' #Dawn + duration: 145 + - color: '#E0BA87' # + duration: 145 + - color: '#BFEEFF' #Day + duration: 145 + - color: '#385163' #Evening + duration: 145 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/DayCycle/periods.yml b/Resources/Prototypes/_CP14/DayCycle/periods.yml index 2844a9090d..237ab4de38 100644 --- a/Resources/Prototypes/_CP14/DayCycle/periods.yml +++ b/Resources/Prototypes/_CP14/DayCycle/periods.yml @@ -12,25 +12,4 @@ - type: CP14DayCyclePeriod id: Evening - name: cp14-daycycle-evening - -- type: CP14DayCycle # - id: Default - timeEntries: - - duration: 145 - color: '#754A4A' #Dawn - - duration: 145 - color: '#E0BA87' # - - duration: 145 - color: '#BFEEFF' #Day - - period: Night - duration: 145 - color: '#385163' #Evening - - period: Night - duration: 80 - color: '#060D12' #Night - - period: Night - duration: 160 - color: '#000000' #BLACK NIGHT - - duration: 80 - color: '#120906' #Night \ No newline at end of file + name: cp14-daycycle-evening \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_gift.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_gift.yml index 8b1efe5153..f01176a766 100644 --- a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_gift.yml +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Meta/T0_mana_gift.yml @@ -7,7 +7,7 @@ sprite: _CP14/Effects/Magic/spells_icons.rsi state: mana_gift - type: CP14MagicEffectManaCost - manaCost: 12 + manaCost: 10 canModifyManacost: false - type: CP14MagicEffect magicType: Meta diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml index 65c3cd3f18..bc78432513 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml @@ -47,7 +47,7 @@ - id: CP14SpellScrollFlashLight - id: CP14SpellScrollWaterCreation - id: CP14SpellScrollPlantGrowth - - id: CP14EnergyCrystalSmall + - id: CP14EnergyCrystalSmallEmpty - id: CP14BaseSharpeningStone - id: CP14GlassShard - id: CP14Paper @@ -71,7 +71,7 @@ - id: CP14VialTinyLumiMushroom - id: CP14SilverCoin5 - id: CP14BaseLockpick - - id: CP14EnergyCrystalMedium + - id: CP14EnergyCrystalMediumEmpty - id: CP14DemiplaneKeyT1 weight: 2 - id: CP14DemiplaneKeyT2 @@ -124,7 +124,7 @@ - id: CP14SpellScrollFireball - id: CP14SpellScrollBeerCreation weight: 0.2 - - id: CP14EnergyCrystalMedium + - id: CP14EnergyCrystalMediumEmpty # Rare - !type:GroupSelector weight: 25 diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/demiplane_rifts.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/demiplane_rifts.yml index 59895419cc..571e660fa5 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/demiplane_rifts.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/demiplane_rifts.yml @@ -70,8 +70,6 @@ - id: CP14MobUndeadZombieGearEasy1 - id: CP14MobUndeadZombieGearEasy2 - id: CP14MobUndeadZombieGearEasy3 - - id: CP14MobUndeadZombieGearMedium1 - - id: CP14MobUndeadZombieGearMedium2 - type: entity parent: CP14BaseMobGroupSpawner diff --git a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml index 25994882e8..1c4f463059 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/mobs.yml @@ -22,11 +22,6 @@ - id: CP14MobUndeadZombieGearEasy1 - id: CP14MobUndeadZombieGearEasy2 - id: CP14MobUndeadZombieGearEasy3 - - !type:GroupSelector - weight: 30 - children: - - id: CP14MobUndeadZombieGearMedium1 - - id: CP14MobUndeadZombieGearMedium2 # Animal diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/zombie.yml b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/zombie.yml index 3409a31499..d41870d0b8 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/NPC/zombie.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/NPC/zombie.yml @@ -42,22 +42,4 @@ categories: [ HideSpawnMenu ] components: - type: Loadout - prototypes: [ CP14MobUndeadEasy3 ] - -- type: entity - id: CP14MobUndeadZombieGearMedium1 - parent: CP14MobUndeadZombie - suffix: Zombie. Medium - categories: [ HideSpawnMenu ] - components: - - type: Loadout - prototypes: [ CP14MobUndeadMedium1 ] - -- type: entity - id: CP14MobUndeadZombieGearMedium2 - parent: CP14MobUndeadZombie - suffix: Zombie. Medium - categories: [ HideSpawnMenu ] - components: - - type: Loadout - prototypes: [ CP14MobUndeadMedium2 ] \ No newline at end of file + prototypes: [ CP14MobUndeadEasy3 ] \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/guidebooks.yml b/Resources/Prototypes/_CP14/Entities/Objects/guidebooks.yml index fa6f428343..9ef52b7c44 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/guidebooks.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/guidebooks.yml @@ -6,18 +6,13 @@ categories: [ ForkFiltered ] components: - type: Sprite - sprite: _CP14/Objects/Misc/books.rsi layers: - state: paper - - state: cover_red - map: [ "cover" ] - - state: edging_gold - map: [ "edging" ] - - state: icon_image - map: [ "icon" ] - - state: bookmark_red - map: [ "bookmark" ] - + - state: cover_base + color: "#871619" + - state: decor_wingette + color: "#a3181d" + - state: icon_law - type: GuideHelp guides: - CP14_RU_Imperial_Laws diff --git a/Resources/Prototypes/_CP14/Loadouts/Misc/undead_startinggear.yml b/Resources/Prototypes/_CP14/Loadouts/Misc/undead_startinggear.yml index 0ce27c6103..1ded128f40 100644 --- a/Resources/Prototypes/_CP14/Loadouts/Misc/undead_startinggear.yml +++ b/Resources/Prototypes/_CP14/Loadouts/Misc/undead_startinggear.yml @@ -16,21 +16,6 @@ shoes: CP14ClothingShoesSandals mask: CP14ClothingMaskSinner -- type: startingGear - id: CP14MobUndeadMedium1 - equipment: - cloak: CP14ClothingCloakCuirass - shirt: CP14ClothingShirtCottonRed - pants: CP14ClothingPantsTrouserWhite - -- type: startingGear - id: CP14MobUndeadMedium2 - equipment: - cloak: CP14ClothingCloakCuirass - shirt: CP14ClothingShirtCottonRed - pants: CP14ClothingPantsTrouserWhite - head: CP14ClothingHeadBeretRed - - type: startingGear id: CP14MobSkeleton equipment: diff --git a/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/MapLight/mapLight.yml b/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/MapLight/mapLight.yml index 994df56e72..f4c3fb9e36 100644 --- a/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/MapLight/mapLight.yml +++ b/Resources/Prototypes/_CP14/Procedural/Demiplane/Modifiers/MapLight/mapLight.yml @@ -11,17 +11,6 @@ - type: MapLight ambientLightColor: "#000000" -- type: cp14DemiplaneModifier - id: MapLightCycleDefault - tiers: - - 1 - - 2 - - 3 - categories: - MapLight: 1 - components: - - type: CP14DayCycle - - type: cp14DemiplaneModifier id: MapLightDarkRed tiers: @@ -43,8 +32,6 @@ - type: MapLight ambientLightColor: "#09010f" -# Open sky time entries - - type: cp14DemiplaneModifier id: MapLightDarkNight tiers: @@ -53,64 +40,37 @@ - 3 categories: MapLight: 1 - requiredTags: - - CP14DemiplaneOpenSky components: - type: MapLight ambientLightColor: "#010714" -- type: cp14DemiplaneModifier - id: MapLightDawn - tiers: - - 1 - - 2 - - 3 - categories: - MapLight: 1 - requiredTags: - - CP14DemiplaneOpenSky - components: - - type: MapLight - ambientLightColor: "#754A4A" +# Open sky time entries - type: cp14DemiplaneModifier - id: MapLightMidday + id: MapLightCycleDefault tiers: - 1 - 2 - 3 categories: MapLight: 1 + generationWeight: 2 requiredTags: - CP14DemiplaneOpenSky components: - - type: MapLight - ambientLightColor: "#E0BA87" + - type: CP14DayCycle - type: cp14DemiplaneModifier - id: MapLightMidday2 + id: MapLightCycleDay tiers: - 1 - 2 - 3 categories: MapLight: 1 + generationWeight: 2 requiredTags: - CP14DemiplaneOpenSky components: - - type: MapLight - ambientLightColor: "#BFEEFF" - -- type: cp14DemiplaneModifier - id: MapLightEvening - tiers: - - 1 - - 2 - - 3 - categories: - MapLight: 1 - requiredTags: - - CP14DemiplaneOpenSky - components: - - type: MapLight - ambientLightColor: "#385163" \ No newline at end of file + - type: CP14DayCycle + cycleProto: CP14DemiplaneEternalDay \ No newline at end of file