diff --git a/Content.Server/_CP14/Chemistry/ReagentEffect/CP14PlantResourceModify.cs b/Content.Server/_CP14/Chemistry/ReagentEffect/CP14PlantResourceModify.cs new file mode 100644 index 0000000000..e16b4a6ae6 --- /dev/null +++ b/Content.Server/_CP14/Chemistry/ReagentEffect/CP14PlantResourceModify.cs @@ -0,0 +1,47 @@ +using System.Text; +using Content.Shared._CP14.Farming; +using Content.Shared.EntityEffects; +using JetBrains.Annotations; +using Robust.Shared.Prototypes; + +namespace Content.Server._CP14.Chemistry.ReagentEffect; + +[UsedImplicitly] +[DataDefinition] +public sealed partial class CP14PlantResourceModify : EntityEffect +{ + [DataField] + public float Energy = 0f; + + [DataField] + public float Resourse = 0f; + + protected override string? ReagentEffectGuidebookText(IPrototypeManager prototype, IEntitySystemManager entSys) + { + var sb = new StringBuilder(); + if (Energy != 0) + sb.Append(Loc.GetString(Energy > 0 ? "cp14-reagent-effect-guidebook-plant-add-energy" : "cp14-reagent-effect-guidebook-plant-remove-energy", ("amount", Energy), ("chance", Probability))); + if (Resourse != 0) + sb.Append(Loc.GetString(Resourse > 0 ? "cp14-reagent-effect-guidebook-plant-add-resource" : "cp14-reagent-effect-guidebook-plant-remove-resource", ("amount", Resourse), ("chance", Probability))); + + return sb.ToString(); + } + + public override void Effect(EntityEffectBaseArgs args) + { + var scale = 1f; + + if (args is EntityEffectReagentArgs reagentArgs) + { + scale = reagentArgs.Quantity.Float() * reagentArgs.Scale.Float(); + } + + if (!args.EntityManager.TryGetComponent(args.TargetEntity, out var plantComp)) + return; + + var plantSystem = args.EntityManager.System(); + + plantSystem.AffectEnergy((args.TargetEntity, plantComp), Energy * scale); + plantSystem.AffectResource((args.TargetEntity, plantComp), Resourse * scale); + } +} diff --git a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Draw.cs b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Draw.cs index 5622ab0a79..a386cbb772 100644 --- a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Draw.cs +++ b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Draw.cs @@ -1,24 +1,16 @@ -using System.Numerics; using Content.Server._CP14.MagicEnergy.Components; +using Content.Shared._CP14.DayCycle; using Content.Shared._CP14.MagicEnergy.Components; namespace Content.Server._CP14.MagicEnergy; public partial class CP14MagicEnergySystem { + [Dependency] private readonly CP14SharedDayCycleSystem _dayCycle = default!; + private void InitializeDraw() { SubscribeLocalEvent(OnDrawMapInit); - SubscribeLocalEvent(OnRandomRangeMapInit); - } - - private void OnRandomRangeMapInit(Entity random, ref MapInitEvent args) - { - if (!TryComp(random, out var draw)) - return; - - draw.Energy = _random.NextFloat(random.Comp.MinDraw, random.Comp.MaxDraw); - draw.Range = _random.NextFloat(random.Comp.MinRange, random.Comp.MaxRange); } private void OnDrawMapInit(Entity ent, ref MapInitEvent args) @@ -30,7 +22,6 @@ public partial class CP14MagicEnergySystem { UpdateEnergyContainer(); UpdateEnergyCrystalSlot(); - UpdateEnergyRadiusDraw(); } private void UpdateEnergyContainer() @@ -38,12 +29,26 @@ public partial class CP14MagicEnergySystem var query = EntityQueryEnumerator(); while (query.MoveNext(out var uid, out var draw, out var magicContainer)) { + if (!draw.Enable) + continue; + if (draw.NextUpdateTime >= _gameTiming.CurTime) continue; draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay); - ChangeEnergy(uid, magicContainer, draw.Energy, safe: draw.Safe); + ChangeEnergy(uid, magicContainer, draw.Energy, draw.Safe); + } + + var query2 = EntityQueryEnumerator(); + while (query2.MoveNext(out var uid, out var draw, out var magicContainer)) + { + if (draw.NextUpdateTime >= _gameTiming.CurTime) + continue; + + draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay); + + ChangeEnergy(uid, magicContainer, _dayCycle.TryDaylightThere(uid) ? draw.DaylightEnergy : draw.DarknessEnergy, true); } } @@ -66,28 +71,4 @@ public partial class CP14MagicEnergySystem ChangeEnergy(energyEnt.Value, energyComp, draw.Energy, draw.Safe); } } - - private void UpdateEnergyRadiusDraw() - { - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var uid, out var draw)) - { - if (!draw.Enable) - continue; - - if (draw.NextUpdateTime >= _gameTiming.CurTime) - continue; - - draw.NextUpdateTime = _gameTiming.CurTime + TimeSpan.FromSeconds(draw.Delay); - - var containers = _lookup.GetEntitiesInRange(Transform(uid).Coordinates, draw.Range); - foreach (var container in containers) - { - var distance = Vector2.Distance(_transform.GetWorldPosition(uid), _transform.GetWorldPosition(container)); - var energyDraw = draw.Energy * (1 - distance / draw.Range); - - ChangeEnergy(container, container.Comp, energyDraw, true); - } - } - } } diff --git a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs index 2246ef1370..c0e0faef06 100644 --- a/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs +++ b/Content.Server/_CP14/MagicEnergy/CP14MagicEnergySystem.Scanner.cs @@ -17,8 +17,6 @@ public partial class CP14MagicEnergySystem SubscribeLocalEvent(OnExamined); SubscribeLocalEvent(OnMagicScanAttempt); SubscribeLocalEvent>((e, c, ev) => OnMagicScanAttempt(e, c, ev.Args)); - - SubscribeLocalEvent(OnAuraScannerUseInHand); } private void OnMagicScanAttempt(EntityUid uid, CP14MagicEnergyScannerComponent component, CP14MagicEnergyScanEvent args) @@ -42,22 +40,4 @@ public partial class CP14MagicEnergySystem args.PushMarkup(GetEnergyExaminedText(ent, magicContainer)); } - - private void OnAuraScannerUseInHand(Entity scanner, ref UseInHandEvent args) - { - FixedPoint2 sumDraw = 0f; - var query = EntityQueryEnumerator(); - while (query.MoveNext(out var auraUid, out var node, out var xform)) - { - if (xform.MapUid != Transform(scanner).MapUid) - continue; - - var distance = Vector2.Distance(_transform.GetWorldPosition(auraUid), _transform.GetWorldPosition(scanner)); - if (distance > node.Range) - continue; - - sumDraw += node.Energy * (1 - distance / node.Range); - } - _popup.PopupCoordinates(Loc.GetString("cp14-magic-scanner", ("power", sumDraw)), Transform(scanner).Coordinates, args.User); - } } diff --git a/Content.Server/_CP14/MagicEnergy/Components/CP14AuraNodeComponent.cs b/Content.Server/_CP14/MagicEnergy/Components/CP14AuraNodeComponent.cs deleted file mode 100644 index bce76f7c8c..0000000000 --- a/Content.Server/_CP14/MagicEnergy/Components/CP14AuraNodeComponent.cs +++ /dev/null @@ -1,50 +0,0 @@ -using Content.Shared.FixedPoint; - -namespace Content.Server._CP14.MagicEnergy.Components; - -[RegisterComponent, Access(typeof(CP14MagicEnergySystem))] -public sealed partial class CP14AuraNodeComponent : Component -{ - [DataField] - public bool Enable = true; - - [DataField] - public FixedPoint2 Energy = 1f; - - [DataField] - public float Range = 10f; - - /// - /// If not safe, restoring or drawing power across boundaries call dangerous events, that may destroy crystals - /// - [DataField] - public bool Safe = true; - - /// - /// how often objects will try to change magic energy. In Seconds - /// - [DataField] - public float Delay = 5f; - - /// - /// the time of the next magic energy change - /// - [DataField] - public TimeSpan NextUpdateTime { get; set; } = TimeSpan.Zero; -} - -[RegisterComponent, Access(typeof(CP14MagicEnergySystem))] -public sealed partial class CP14RandomAuraNodeComponent : Component -{ - [DataField] - public float MinDraw = -2f; - - [DataField] - public float MaxDraw = 2f; - - [DataField] - public float MinRange = 5f; - - [DataField] - public float MaxRange = 10f; -} diff --git a/Content.Shared/_CP14/DayCycle/CP14SharedDayCycleSystem.cs b/Content.Shared/_CP14/DayCycle/CP14SharedDayCycleSystem.cs index 1f025eb347..906868d701 100644 --- a/Content.Shared/_CP14/DayCycle/CP14SharedDayCycleSystem.cs +++ b/Content.Shared/_CP14/DayCycle/CP14SharedDayCycleSystem.cs @@ -1,6 +1,7 @@ using Content.Shared._CP14.DayCycle.Components; using Content.Shared._CP14.DayCycle.Prototypes; using Content.Shared.Maps; +using Content.Shared.Weather; using Robust.Shared.Map; using Robust.Shared.Map.Components; using Robust.Shared.Prototypes; @@ -13,27 +14,42 @@ public abstract class CP14SharedDayCycleSystem : EntitySystem [Dependency] private readonly SharedMapSystem _maps = default!; [Dependency] private readonly ITileDefinitionManager _tileDefManager = default!; + [Dependency] private readonly SharedWeatherSystem _weather = default!; + + private EntityQuery _mapGridQuery; + + public override void Initialize() + { + base.Initialize(); + + _mapGridQuery = GetEntityQuery(); + } /// /// Checks to see if the specified entity is on the map where it's daytime. /// /// An entity being tested to see if it is in daylight /// Checks if the tile covers the weather (the only "roof" factor at the moment) - public bool TryDaylightThere(EntityUid target, bool checkRoof) + public bool TryDaylightThere(EntityUid target, bool checkRoof = true) { var xform = Transform(target); if (!TryComp(xform.MapUid, out var dayCycle)) return false; + var day = dayCycle.CurrentPeriod == DayPeriod; if (!checkRoof || !TryComp(xform.GridUid, out var mapGrid)) - return dayCycle.CurrentPeriod == DayPeriod; + return day; - var tileRef = _maps.GetTileRef(xform.GridUid.Value, mapGrid, xform.Coordinates); - var tileDef = (ContentTileDefinition) _tileDefManager[tileRef.Tile.TypeId]; + var grid = xform.GridUid; + if (grid is null) + return day; - if (!tileDef.Weather) + if (!_mapGridQuery.TryComp(grid, out var gridComp)) + return day; + + if (!_weather.CanWeatherAffect(grid.Value, gridComp, _maps.GetTileRef(xform.GridUid.Value, mapGrid, xform.Coordinates))) return false; - return dayCycle.CurrentPeriod == DayPeriod; + return day; } } diff --git a/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyPhotosynthesisComponent.cs b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyPhotosynthesisComponent.cs new file mode 100644 index 0000000000..423a1f7126 --- /dev/null +++ b/Content.Shared/_CP14/MagicEnergy/Components/CP14MagicEnergyPhotosynthesisComponent.cs @@ -0,0 +1,31 @@ +using Content.Shared.FixedPoint; +using Content.Shared.Guidebook; + +namespace Content.Shared._CP14.MagicEnergy.Components; + +/// +/// Restores mana if the entity is in the sun, and wastes it if not +/// +[RegisterComponent, Access(typeof(SharedCP14MagicEnergySystem))] +public sealed partial class CP14MagicEnergyPhotosynthesisComponent : Component +{ + [DataField] + [GuidebookData] + public FixedPoint2 DaylightEnergy = 2f; + + [DataField] + [GuidebookData] + public FixedPoint2 DarknessEnergy = -2f; + + /// + /// how often objects will try to change magic energy. In Seconds + /// + [DataField] + public float Delay = 3f; + + /// + /// the time of the next magic energy change + /// + [DataField] + public TimeSpan NextUpdateTime { get; set; } = TimeSpan.Zero; +} diff --git a/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs b/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs index b7606b1b7f..2aa2ae3b1f 100644 --- a/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs +++ b/Content.Shared/_CP14/MagicSpellStorage/CP14SpellStorageSystem.cs @@ -42,22 +42,24 @@ public sealed partial class CP14SpellStorageSystem : EntitySystem /// /// When we initialize, we create action entities, and add them to this item. /// - private void OnMagicStorageInit(Entity mStorage, ref MapInitEvent args) + private void OnMagicStorageInit(Entity storage, ref MapInitEvent args) { if (_net.IsClient) return; - foreach (var spell in mStorage.Comp.Spells) + foreach (var spell in storage.Comp.Spells) { - var spellEnt = _actionContainer.AddAction(mStorage, spell); + var spellEnt = _actionContainer.AddAction(storage, spell); if (spellEnt is null) continue; var provided = EntityManager.EnsureComponent(spellEnt.Value); - provided.SpellStorage = mStorage; + provided.SpellStorage = storage; - mStorage.Comp.SpellEntities.Add(spellEnt.Value); + storage.Comp.SpellEntities.Add(spellEnt.Value); } + if (storage.Comp.GrantAccessToSelf) + _actions.GrantActions(storage, storage.Comp.SpellEntities, storage); } private void OnMagicStorageShutdown(Entity mStorage, ref ComponentShutdown args) diff --git a/Content.Shared/_CP14/MagicSpellStorage/Components/CP14SpellStorageComponent.cs b/Content.Shared/_CP14/MagicSpellStorage/Components/CP14SpellStorageComponent.cs index 6421024518..60c2861b78 100644 --- a/Content.Shared/_CP14/MagicSpellStorage/Components/CP14SpellStorageComponent.cs +++ b/Content.Shared/_CP14/MagicSpellStorage/Components/CP14SpellStorageComponent.cs @@ -8,6 +8,12 @@ namespace Content.Shared._CP14.MagicSpellStorage.Components; [RegisterComponent, Access(typeof(CP14SpellStorageSystem))] public sealed partial class CP14SpellStorageComponent : Component { + /// + /// Set true when giving starting abilities to creatures in this way + /// + [DataField] + public bool GrantAccessToSelf = false; + /// /// list of spell prototypes used for initialization. /// diff --git a/Resources/Locale/en-US/_CP14/guidebook/chemistry/effects.ftl b/Resources/Locale/en-US/_CP14/guidebook/chemistry/effects.ftl index ad7d8f48e4..821c2eb17f 100644 --- a/Resources/Locale/en-US/_CP14/guidebook/chemistry/effects.ftl +++ b/Resources/Locale/en-US/_CP14/guidebook/chemistry/effects.ftl @@ -20,4 +20,28 @@ cp14-reagent-effect-guidebook-mana-remove = { $chance -> [1] Burns off {$amount} mana *[other] to burn {$amount} mana + } + +cp14-reagent-effect-guidebook-plant-add-resource = + { $chance -> + [1] Restores {$amount} plant resource + *[other] to restore {$amount} plant resource + } + +cp14-reagent-effect-guidebook-plant-remove-resource = + { $chance -> + [1] Absorbes {$amount} plant resource + *[other] to abrorb {$amount} plant resource + } + +cp14-reagent-effect-guidebook-plant-add-energy = + { $chance -> + [1] Restores {$amount} plant energy + *[other] to restore {$amount} plant energy + } + +cp14-reagent-effect-guidebook-plant-remove-energy = + { $chance -> + [1] Absorbes {$amount} plant energy + *[other] to abrorb {$amount} plant energy } \ No newline at end of file diff --git a/Resources/Locale/ru-RU/_CP14/guidebook/chemistry/effects.ftl b/Resources/Locale/ru-RU/_CP14/guidebook/chemistry/effects.ftl index fdb98573ac..041d9175f6 100644 --- a/Resources/Locale/ru-RU/_CP14/guidebook/chemistry/effects.ftl +++ b/Resources/Locale/ru-RU/_CP14/guidebook/chemistry/effects.ftl @@ -20,4 +20,28 @@ cp14-reagent-effect-guidebook-mana-remove = { $chance -> [1] Выжигает {$amount} единиц маны *[other] выжечь {$amount} единиц маны + } + +cp14-reagent-effect-guidebook-plant-add-resource = + { $chance -> + [1] Восстанавливает {$amount} ресурсов растения + *[other] восстановить {$amount} ресурсов растения + } + +cp14-reagent-effect-guidebook-plant-remove-resource = + { $chance -> + [1] Поглощает {$amount} ресурсов растения + *[other] поглотить {$amount} ресурсов растения + } + +cp14-reagent-effect-guidebook-plant-add-energy = + { $chance -> + [1] Восстанавливает {$amount} энергии растения + *[other] восстановить {$amount} энергии растения + } + +cp14-reagent-effect-guidebook-plant-remove-energy = + { $chance -> + [1] Поглощает {$amount} энергии растения + *[other] поглотить {$amount} энергии растения } \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_plant_growth.yml b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_plant_growth.yml new file mode 100644 index 0000000000..c4ac279286 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Actions/Spells/Healing/T0_plant_growth.yml @@ -0,0 +1,113 @@ +- type: entity + id: CP14ActionSpellPlantGrowth + name: Plant growth + description: You restore health and internal resources to the selected plant. + components: + - type: Sprite + sprite: _CP14/Effects/Magic/spells_icons.rsi + state: plant_growth + - type: CP14MagicEffectCastSlowdown + speedMultiplier: 0.8 + - type: CP14MagicEffectManaCost + manaCost: 5 + - type: CP14MagicEffect + magicType: Healing + telegraphyEffects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectPlantGrowth + effects: + - !type:CP14SpellSpawnEntityOnTarget + spawns: + - CP14ImpactEffectCureWounds + - !type:CP14SpellApplyEntityEffect + effects: + - !type:HealthChange + damage: + types: + Asphyxiation: -1 + Bloodloss: -1 + Blunt: -1 + Cellular: -0.1 + Caustic: -1 + Cold: -1 + Heat: -1 + Piercing: -1 + Poison: -1 + Radiation: -1 + Shock: -1 + Slash: -1 + - !type:SatiateThirst + factor: 3 + - !type:SatiateHunger + factor: 3 + - !type:CP14PlantResourceModify + energy: 3 + resourse: 3 + - !type:Jitter + - type: CP14MagicEffectVerbalAspect + startSpeech: "Plantae durant..." + - type: CP14MagicEffectCastingVisual + proto: CP14RunePlantGrowth + - type: EntityTargetAction + whitelist: + components: + - CP14Plant + - CP14MagicEnergyPhotosynthesis + range: 2 + itemIconStyle: BigAction + interactOnMiss: false + sound: !type:SoundPathSpecifier + path: /Audio/Magic/rumble.ogg + icon: + sprite: _CP14/Effects/Magic/spells_icons.rsi + state: plant_growth + event: !type:CP14ToggleableEntityTargetActionEvent + cooldown: 15 + castTime: 10 + breakOnMove: true + +- type: entity + parent: CP14ActionSpellPlantGrowth + id: CP14ActionSpellPlantGrowthSilva + name: Blessing of silvas + components: + - type: CP14MagicEffectManaCost + manaCost: 3 + +# Scrolls + +- type: entity + parent: CP14BaseSpellScrollHealing + id: CP14SpellScrollPlantGrowth + name: plant growth spell scroll + components: + - type: CP14SpellStorage + spells: + - CP14ActionSpellPlantGrowth + +# Effects + +- type: entity + id: CP14ImpactEffectPlantGrowth + parent: CP14BaseMagicImpact + categories: [ HideSpawnMenu ] + components: + - type: Sprite + layers: + - state: wave_up + color: "#5096d4" + shader: unshaded + +- type: entity + id: CP14RunePlantGrowth + parent: CP14BaseMagicRune + categories: [ HideSpawnMenu ] + components: + - type: PointLight + color: "#328643" + - type: Sprite + layers: + - state: medium_circle + color: "#79b330" + shader: unshaded \ 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 b9d85042fb..8963c8ca5a 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 @@ -43,6 +43,7 @@ event: !type:CP14ToggleableEntityTargetActionEvent cooldown: 5 castTime: 10 + breakOnMove: true - type: entity id: CP14RuneManaGift 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 37b29bc83a..65c3cd3f18 100644 --- a/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml +++ b/Resources/Prototypes/_CP14/Entities/Markers/Spawners/Random/Loot/demiplane.yml @@ -46,6 +46,7 @@ - id: CP14SpellScrollEarthWall - id: CP14SpellScrollFlashLight - id: CP14SpellScrollWaterCreation + - id: CP14SpellScrollPlantGrowth - id: CP14EnergyCrystalSmall - id: CP14BaseSharpeningStone - id: CP14GlassShard diff --git a/Resources/Prototypes/_CP14/Entities/Markers/energyNodes.yml b/Resources/Prototypes/_CP14/Entities/Markers/energyNodes.yml deleted file mode 100644 index fa9d7b923c..0000000000 --- a/Resources/Prototypes/_CP14/Entities/Markers/energyNodes.yml +++ /dev/null @@ -1,14 +0,0 @@ -- type: entity - id: CP14AuraNodeBase - parent: MarkerBase - name: aura node - description: An energy node that affects the elemental energy in the surrounding space. - categories: [ ForkFiltered ] - components: - - type: Sprite - layers: - - state: green - - sprite: Mobs/Animals/mouse.rsi - state: icon-2 #TODO lol - - type: CP14AuraNode - - type: CP14RandomAuraNode \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Mobs/Species/silva.yml b/Resources/Prototypes/_CP14/Entities/Mobs/Species/silva.yml index 033a9044bc..cc9975d667 100644 --- a/Resources/Prototypes/_CP14/Entities/Mobs/Species/silva.yml +++ b/Resources/Prototypes/_CP14/Entities/Mobs/Species/silva.yml @@ -64,6 +64,13 @@ spawned: - id: FoodMeatHuman amount: 5 + - type: CP14MagicEnergyPhotosynthesis # Silva special feature + - type: CP14SpellStorage + grantAccessToSelf: true + spells: + - CP14ActionSpellPlantGrowthSilva + - type: CP14MagicEnergyDraw + enable: false - type: Body prototype: CP14Silva requiredLegs: 2 diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/tools.yml b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/tools.yml index ab95a75681..97da442acc 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/tools.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Specific/Thaumaturgy/tools.yml @@ -1,24 +1,3 @@ -- type: entity - id: CP14AuraScanner - parent: BaseItem - name: aura scanner - description: Scans the polarity of the elemental energy flows in this place. - categories: [ ForkFiltered ] - components: - - type: Sprite - sprite: _CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi - state: icon - - type: Item - sprite: _CP14/Objects/Specific/Thaumaturgy/aura_scanner.rsi - - type: CP14AuraScanner - - type: EmitSoundOnUse - sound: - path: /Audio/_CP14/Effects/aura_scanner.ogg - params: - variation: 0.03 - - type: UseDelay - delay: 4 - - type: entity id: CP14RitualChalk parent: BaseItem diff --git a/Resources/Prototypes/_CP14/Guidebook/Eng/alchemy.yml b/Resources/Prototypes/_CP14/Guidebook/Eng/alchemy.yml index 3a81fba919..bdb9476a17 100644 --- a/Resources/Prototypes/_CP14/Guidebook/Eng/alchemy.yml +++ b/Resources/Prototypes/_CP14/Guidebook/Eng/alchemy.yml @@ -35,3 +35,19 @@ name: Imperial laws text: "/ServerInfo/_CP14/Guidebook_EN/ImperialLaws.xml" filterEnabled: True + +- type: guideEntry + crystallPunkAllowed: true + id: CP14_EN_Species + name: Playable species + text: "/ServerInfo/_CP14/Guidebook_EN/Species.xml" + children: + - CP14_EN_Silva + filterEnabled: True + +- type: guideEntry + crystallPunkAllowed: true + id: CP14_EN_Silva + name: Silva + text: "/ServerInfo/_CP14/Guidebook_EN/SpeciesTabs/Silva.xml" + filterEnabled: True \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Guidebook/Ru/alchemy.yml b/Resources/Prototypes/_CP14/Guidebook/Ru/alchemy.yml index 78b4f0cd28..7949be1932 100644 --- a/Resources/Prototypes/_CP14/Guidebook/Ru/alchemy.yml +++ b/Resources/Prototypes/_CP14/Guidebook/Ru/alchemy.yml @@ -35,3 +35,19 @@ name: Имперские законы text: "/ServerInfo/_CP14/Guidebook_RU/ImperialLaws.xml" filterEnabled: True + +- type: guideEntry + crystallPunkAllowed: true + id: CP14_RU_Species + name: Играбельные расы + text: "/ServerInfo/_CP14/Guidebook_RU/Species.xml" + children: + - CP14_RU_Silva + filterEnabled: True + +- type: guideEntry + crystallPunkAllowed: true + id: CP14_RU_Silva + name: Сильва + text: "/ServerInfo/_CP14/Guidebook_RU/SpeciesTabs/Silva.xml" + filterEnabled: True \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Guidebook/entry.yml b/Resources/Prototypes/_CP14/Guidebook/entry.yml index c7d9c6ab52..45f5b1ea0c 100644 --- a/Resources/Prototypes/_CP14/Guidebook/entry.yml +++ b/Resources/Prototypes/_CP14/Guidebook/entry.yml @@ -5,6 +5,7 @@ name: Welcome to CrystallEdge text: "/ServerInfo/_CP14/Guidebook_EN/Welcome.xml" children: + - CP14_EN_Species - CP14_EN_Alchemy - CP14_EN_Demiplanes - CP14_EN_Imperial_Laws @@ -16,6 +17,7 @@ name: Добро пожаловать в CrystallEdge text: "/ServerInfo/_CP14/Guidebook_RU/Welcome.xml" children: + - CP14_RU_Species - CP14_RU_Alchemy - CP14_RU_Demiplanes - CP14_RU_Imperial_Laws diff --git a/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml b/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml index eacc418147..32de985d8c 100644 --- a/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml +++ b/Resources/Prototypes/_CP14/Loadouts/Jobs/general.yml @@ -438,6 +438,7 @@ - CP14ActionSpellWaterCreation - CP14ActionSpellBeerCreation - CP14ActionSpellSprint + - CP14ActionSpellPlantGrowth - type: loadout id: CP14ActionSpellFlameCreation @@ -514,4 +515,17 @@ id: CP14ActionSpellSprint dummyEntity: CP14ActionSpellSprint actions: - - CP14ActionSpellSprint \ No newline at end of file + - CP14ActionSpellSprint + +- type: loadout + id: CP14ActionSpellPlantGrowth + dummyEntity: CP14ActionSpellPlantGrowth + actions: + - CP14ActionSpellPlantGrowth + effects: + - !type:JobRequirementLoadoutEffect + requirement: + !type:SpeciesRequirement + species: + - CP14Silva + inverted: true # Silvas cannot take this spell, thwy have buffed version by default \ No newline at end of file diff --git a/Resources/ServerInfo/_CP14/Guidebook_EN/Species.xml b/Resources/ServerInfo/_CP14/Guidebook_EN/Species.xml new file mode 100644 index 0000000000..3523e8b583 --- /dev/null +++ b/Resources/ServerInfo/_CP14/Guidebook_EN/Species.xml @@ -0,0 +1,6 @@ + +# Playable species + +TODO + + diff --git a/Resources/ServerInfo/_CP14/Guidebook_EN/SpeciesTabs/Silva.xml b/Resources/ServerInfo/_CP14/Guidebook_EN/SpeciesTabs/Silva.xml new file mode 100644 index 0000000000..8a68f99bdd --- /dev/null +++ b/Resources/ServerInfo/_CP14/Guidebook_EN/SpeciesTabs/Silva.xml @@ -0,0 +1,22 @@ + +# Silva + + + + + +Silvas - Don't have a lore description of the race in the guidebook yet. We await the text from the Wanderer. + +## Magical photosynthesis + +Silvas regenerate [protodata="CP14MobSilva" comp="CP14MagicEnergyPhotosynthesis" member="DaylightEnergy"/] mana while in sunlight, but without it they gradually lose [protodata="CP14MobSilva" comp="CP14MagicEnergyPhotosynthesis" member="DarknessEnergy"/] mana. + +## Blessing of the silvas + +Silvas cannot take the Plant Growth spell, but they have an improved version of it that uses less mana. Silvas are considered plants for these spells, so you can use them to restore hunger, thirst, and health to silvas just like you can restore health and resources to regular plants. + + + + + + \ No newline at end of file diff --git a/Resources/ServerInfo/_CP14/Guidebook_RU/Species.xml b/Resources/ServerInfo/_CP14/Guidebook_RU/Species.xml new file mode 100644 index 0000000000..fa79f9c7b7 --- /dev/null +++ b/Resources/ServerInfo/_CP14/Guidebook_RU/Species.xml @@ -0,0 +1,6 @@ + +# Игровые расы + +TODO + + diff --git a/Resources/ServerInfo/_CP14/Guidebook_RU/SpeciesTabs/Silva.xml b/Resources/ServerInfo/_CP14/Guidebook_RU/SpeciesTabs/Silva.xml new file mode 100644 index 0000000000..71e66fa819 --- /dev/null +++ b/Resources/ServerInfo/_CP14/Guidebook_RU/SpeciesTabs/Silva.xml @@ -0,0 +1,22 @@ + +# Сильвы + + + + + +Сильвы - пока что не имеют лорное описание расы в гайдбуке. Ждем текста от летописи. + +## Магический фотосинтез + +Сильвы регенерируют [protodata="CP14MobSilva" comp="CP14MagicEnergyPhotosynthesis" member="DaylightEnergy"/] маны находясь под солнечным светом, но без него постепенно теряют [protodata="CP14MobSilva" comp="CP14MagicEnergyPhotosynthesis" member="DarknessEnergy"/] маны. + +## Благословение сильв + +Сильвы не могут взять заклинание "Взращивание растений", но они имеют его улучшенную версию, которая затрачивает меньшее количество маны. Сильвы считаются растениями для этих заклинаний, так что с их помощью вы можете восстанавливать голод, жажду и здоровье сильв, как и восстанавливать здоровье и ресурсы обычных растений. + + + + + + \ No newline at end of file diff --git a/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/meta.json b/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/meta.json index ef0a5e8225..6ce7d68520 100644 --- a/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/meta.json +++ b/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "CLA", - "copyright": "Created by .kreks., cure_poison, cure_burn, mana_gift, water creation, beer creation, sprint and resurrection by TheShuEd", + "copyright": "Created by .kreks., cure_poison, cure_burn, mana_gift, water creation, plant_growth, beer creation, sprint and resurrection by TheShuEd", "states": [ { "name": "beer_creation" @@ -43,6 +43,9 @@ { "name": "mana_gift" }, + { + "name": "plant_growth" + }, { "name": "resurrection" }, diff --git a/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/plant_growth.png b/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/plant_growth.png new file mode 100644 index 0000000000..340e5a936d Binary files /dev/null and b/Resources/Textures/_CP14/Effects/Magic/spells_icons.rsi/plant_growth.png differ diff --git a/Resources/migration.yml b/Resources/migration.yml index 4fcf1926f4..0c56b05bfb 100644 --- a/Resources/migration.yml +++ b/Resources/migration.yml @@ -208,6 +208,10 @@ CP14BaseBroom: null CP14DemiplanKey: CP14DemiplaneKeyT1 CP14SpawnerExpeditionLootCommon: CP14SpawnerDemiplaneLootT1 +#2024-06-01 +CP14AuraNodeBase: null +CP14AuraScanner: null + # <---> CrystallEdge migration zone end