много чего

This commit is contained in:
comasqw
2024-12-05 00:41:23 +04:00
parent 86168288a3
commit 685a9616ab
48 changed files with 454 additions and 53 deletions

View File

@@ -1,20 +0,0 @@
using Content.Shared._CP14.ModularCraft.Prototypes;
using Content.Shared._CP14.ModularCraft;
using Content.Shared._CP14.ModularCraft.Components;
using Robust.Shared.Prototypes;
namespace Content.Server._CP14.ModularCraft.Modifiers;
public sealed partial class AddNewSlots : CP14ModularCraftModifier
{
[DataField]
public List<ProtoId<CP14ModularCraftSlotPrototype>> Slots;
public override void Effect(EntityManager entManager, Entity<CP14ModularCraftStartPointComponent> start, Entity<CP14ModularCraftPartComponent>? part)
{
foreach (var slot in Slots)
{
start.Comp.FreeSlots.Add(slot);
}
}
}

View File

@@ -1,7 +1,5 @@
using System.Linq;
using Content.Shared._CP14.ModularCraft;
using Content.Shared._CP14.ModularCraft.Components;
using Content.Shared.Item;
using Content.Shared._CP14.MagicSpellStorage;
using Robust.Shared.Prototypes;

View File

@@ -0,0 +1,35 @@
using Content.Shared._CP14.ModularCraft;
using Content.Shared._CP14.ModularCraft.Components;
using Content.Shared._CP14.MagicManacostModify;
using Content.Shared._CP14.MagicRitual.Prototypes;
using Content.Shared.FixedPoint;
using Content.Shared._CP14.MagicSpellStorage;
using Robust.Shared.Prototypes;
namespace Content.Server._CP14.ModularCraft.Modifiers;
public sealed partial class EditManacostModify : CP14ModularCraftModifier
{
[DataField]
public Dictionary<ProtoId<CP14MagicTypePrototype>, FixedPoint2> Modifiers = new();
public override void Effect(EntityManager entManager, Entity<CP14ModularCraftStartPointComponent> start, Entity<CP14ModularCraftPartComponent>? part)
{
if (!entManager.TryGetComponent<CP14MagicManacostModifyComponent>(start, out var manacostModifyComp))
return;
foreach (var (magicType, modifier) in Modifiers)
{
if (manacostModifyComp.Modifiers.ContainsKey(magicType))
{
if (modifier >= 1f)
manacostModifyComp.Modifiers[magicType] += modifier - 1f;
else
manacostModifyComp.Modifiers[magicType] += 1f - modifier;
}
else
{
manacostModifyComp.Modifiers[magicType] = modifier;
}
}
}
}

View File

@@ -7,7 +7,7 @@ namespace Content.Shared._CP14.MagicManacostModify;
/// <summary>
/// Changes the manacost of spells for the bearer
/// </summary>
[RegisterComponent, Access(typeof(CP14MagicManacostModifySystem))]
[RegisterComponent]
public sealed partial class CP14MagicManacostModifyComponent : Component
{
[DataField]

View File

@@ -31,3 +31,7 @@
- type: CP14ModularCraftPart
possibleParts:
- RingMagicCrystal1_SpellSphereOfLight
- BlueHolderMagicCrystal1_SpellSphereOfLight
- BlueHolderMagicCrystal2_SpellSphereOfLight
- BlueHolderMagicCrystal3_SpellSphereOfLight
- BlueHolderMagicCrystal4_SpellSphereOfLight

View File

@@ -0,0 +1,77 @@
# Base holder
- type: entity
id: CP14MagicCrystalHolderBase
parent: BaseItem
abstract: true
name: magic crystals holder
categories: [ ForkFiltered ]
components:
- type: Item
size: Tiny
# Blue holder
- type: entity
id: CP14MagicCrystalHolder_BaseBlue
parent: CP14MagicCrystalHolderBase
name: magic crystals holder
abstract: true
components:
- type: PointLight
radius: 1.3
energy: 2
color: "#87CEEB"
- type: Sprite
sprite: _CP14/Objects/Magic/Holders/magic_crystal_holder_blue.rsi
- type: entity
id: CP14MagicCrystalHolder_Blue1
parent: CP14MagicCrystalHolder_BaseBlue
name: magic crystals holder
description: Holder for magic crystals, has one slot.
suffix: 1 slot
components:
- type: Sprite
state: blue1
- type: CP14ModularCraftPart
possibleParts:
- StaffMagicCrystalHolder_Blue1
- type: entity
id: CP14MagicCrystalHolder_Blue2
parent: CP14MagicCrystalHolder_BaseBlue
name: magic crystals holder
description: Holder for magic crystals, has two slots.
suffix: 2 slots
components:
- type: Sprite
state: blue2
- type: CP14ModularCraftPart
possibleParts:
- StaffMagicCrystalHolder_Blue2
- type: entity
id: CP14MagicCrystalHolder_Blue3
parent: CP14MagicCrystalHolder_BaseBlue
name: magic crystals holder
description: Holder for magic crystals, has three slots.
suffix: 3 slots
components:
- type: Sprite
state: blue3
- type: CP14ModularCraftPart
possibleParts:
- StaffMagicCrystalHolder_Blue3
- type: entity
id: CP14MagicCrystalHolder_Blue4
parent: CP14MagicCrystalHolder_BaseBlue
name: magic crystals holder
description: Holder for magic crystals, has four slots.
suffix: 4 slots
components:
- type: Sprite
state: blue4
- type: CP14ModularCraftPart
possibleParts:
- StaffMagicCrystalHolder_Blue4

View File

@@ -1,7 +1,9 @@
# Base ring
- type: entity
parent: Clothing
id: CP14ClothingMagicRingBase
categories: [ ForkFiltered ]
abstract: true
components:
- type: Item
size: Tiny
@@ -10,10 +12,21 @@
- ring
- type: Sprite
sprite: _CP14/Clothing/Rings/rings.rsi
state: brass_ring_blue
- type: CP14SpellStorageAccessWearing
- type: CP14SpellStorage
- type: CP14ModularCraftStartPoint
startProtoPart: CP14ClothingMagicRingBase
startSlots:
- MagicCrystal1
- RingMagicCrystal1
# Blue ring
- type: entity
parent: CP14ClothingMagicRingBase
id: CP14ClothingMagicRingBlue
components:
- type: PointLight
radius: 1.3
energy: 2
color: "#87CEEB"
- type: Sprite
state: brass_ring_blue

View File

@@ -0,0 +1,107 @@
# Base staff
- type: entity
id: CP14MagicStaffBase
abstract: true
parent:
- BaseItem
- CP14BaseWeaponDestructible
name: magic staff
description: A long, magic stick designed to convert magical energy into spells.
components:
- type: Item
size: Ginormous
- type: Wieldable
- type: IncreaseDamageOnWield
damage:
types:
Blunt: 6
- type: MeleeWeapon
angle: 100
attackRate: 1.3
range: 1.3
wideAnimationRotation: 135
wideAnimation: CP14WeaponArcSlash
damage:
types:
Blunt: 6
soundHit:
collection: MetalThud
cPAnimationLength: 0.3
cPAnimationOffset: -1.3
- type: CP14SpellStorageRequireAttune
- type: CP14MagicAttuningItem
- type: CP14SpellStorageAccessHolding
- type: CP14SpellStorage
- type: CP14MagicEnergyExaminable
- type: CP14MagicEnergyContainer
- type: CP14MagicManacostModify
# Glowing wooden Staff
- type: entity
id: CP14MagicStaff_GlowingWooden
parent: CP14MagicStaffBase
components:
- type: PointLight
radius: 1.3
energy: 2
color: "#87CEEB"
- type: Sprite
sprite: _CP14/Objects/ModularTools/Magic/Staffs/glowing_wooden_staff.rsi
layers:
- state: icon
- type: Clothing
equipDelay: 1
unequipDelay: 1
sprite: _CP14/Objects/ModularTools/Magic/Staffs/glowing_wooden_staff.rsi
quickEquip: false
breakOnMove: false
slots:
- neck
- type: CP14ModularCraftStartPoint
startProtoPart: CP14MagicStaff_GlowingWooden
startSlots:
- MagicCrystalHolder
- type: CP14MagicManacostModify
modifiers:
Earth: 1.1
Fire: 1.1
Gate: 1.1
Healing: 1.1
LightDarkness: 1.1
Meta: 1.1
Movement: 1.1
Water: 1.1
Necromancy: 1.1
# Wooden staff
- type: entity
id: CP14MagicStaff_Wooden
parent: CP14MagicStaffBase
components:
- type: Sprite
sprite: _CP14/Objects/ModularTools/Magic/Staffs/wooden_staff.rsi
layers:
- state: icon
- type: Clothing
equipDelay: 1
unequipDelay: 1
sprite: _CP14/Objects/ModularTools/Magic/Staffs/wooden_staff.rsi
quickEquip: false
breakOnMove: false
slots:
- neck
- type: CP14ModularCraftStartPoint
startProtoPart: CP14MagicStaff_Wooden
startSlots:
- MagicCrystalHolder
- type: CP14MagicManacostModify
modifiers:
Earth: 0.9
Fire: 0.9
Gate: 0.9
Healing: 0.9
LightDarkness: 0.9
Meta: 0.9
Movement: 0.9
Water: 0.9
Necromancy: 0.9

View File

@@ -1,12 +0,0 @@
- type: modularPart
id: RingMagicCrystal1_SpellSphereOfLight
targetSlot: MagicalCrystal1
sourcePart: CP14MagicCrystalSpellSphereOfLight
iconSprite:
- sprite: _CP14/Objects/ModularTools/magic_crystal.rsi
state: ring_grey_icon
color: "#FFFF00"
modifiers:
- !type:AddSpellsToSpellStorage
spells:
- CP14ActionSpellSphereOfLight

View File

@@ -1,12 +0,0 @@
- type: modularPart
id: StaffMagicCrystalHolder_Blue1
targetSlot: MagicCrystalHolders
sourcePart: CP14MagicalCrystalSpellSphereOfLight
iconSprite:
- sprite: _CP14/Objects/ModularTools/magic_crystal.rsi
state: ring_grey_icon
color: "#FFFF00"
modifiers:
- !type:AddSpellsToSpellStorage
spells:
- CP14ActionSpellSphereOfLight

View File

@@ -0,0 +1,64 @@
- type: modularPart
id: RingMagicCrystal1_SpellSphereOfLight
targetSlot: RingMagicCrystal1
sourcePart: CP14MagicCrystalSpellSphereOfLight
iconSprite:
- sprite: _CP14/Objects/ModularTools/Magic/magic_crystal.rsi
state: ring_grey_icon
color: "#FFFF00"
modifiers:
- !type:AddSpellsToSpellStorage
spells:
- CP14ActionSpellSphereOfLight
- type: modularPart
id: BlueHolderMagicCrystal1_SpellSphereOfLight
targetSlot: HolderMagicCrystal1
sourcePart: CP14MagicCrystalSpellSphereOfLight
iconSprite:
- sprite: _CP14/Objects/ModularTools/Magic/magic_crystal.rsi
state: blueholder_grey_icon1
color: "#FFFF00"
modifiers:
- !type:AddSpellsToSpellStorage
spells:
- CP14ActionSpellSphereOfLight
- type: modularPart
id: BlueHolderMagicCrystal2_SpellSphereOfLight
targetSlot: HolderMagicCrystal2
sourcePart: CP14MagicCrystalSpellSphereOfLight
iconSprite:
- sprite: _CP14/Objects/ModularTools/Magic/magic_crystal.rsi
state: blueholder_grey_icon2
color: "#FFFF00"
modifiers:
- !type:AddSpellsToSpellStorage
spells:
- CP14ActionSpellSphereOfLight
- type: modularPart
id: BlueHolderMagicCrystal3_SpellSphereOfLight
targetSlot: HolderMagicCrystal3
sourcePart: CP14MagicCrystalSpellSphereOfLight
iconSprite:
- sprite: _CP14/Objects/ModularTools/Magic/magic_crystal.rsi
state: blueholder_grey_icon3
color: "#FFFF00"
modifiers:
- !type:AddSpellsToSpellStorage
spells:
- CP14ActionSpellSphereOfLight
- type: modularPart
id: BlueHolderMagicCrystal4_SpellSphereOfLight
targetSlot: HolderMagicCrystal4
sourcePart: CP14MagicCrystalSpellSphereOfLight
iconSprite:
- sprite: _CP14/Objects/ModularTools/Magic/magic_crystal.rsi
state: blueholder_grey_icon4
color: "#FFFF00"
modifiers:
- !type:AddSpellsToSpellStorage
spells:
- CP14ActionSpellSphereOfLight

View File

@@ -0,0 +1,86 @@
# Blue Holders
- type: modularPart
id: BaseBlueHolderManacostModify
modifiers:
- !type:EditManacostModify
modifiers:
Earth: 1.05
Fire: 1.05
Gate: 1.05
Healing: 1.05
LightDarkness: 1.05
Meta: 1.05
Movement: 1.05
Water: 1.05
Necromancy: 1.05
- type: modularPart
id: StaffMagicCrystalHolder_Blue1
targetSlot: MagicCrystalHolder
sourcePart: CP14MagicCrystalHolder_Blue1
iconSprite:
- sprite: _CP14/Objects/ModularTools/Magic/Holders/magic_crystals_holder_blue.rsi
state: icon1
rsiPath: _CP14/Objects/ModularTools/Magic/Holders/magic_crystals_holder_blue.rsi
modifiers:
- !type:EditModularSlots
addSlots:
- HolderMagicCrystal1
- !type:Inherit
copyFrom:
- BaseBlueHolderManacostModify
- type: modularPart
id: StaffMagicCrystalHolder_Blue2
targetSlot: MagicCrystalHolder
sourcePart: CP14MagicCrystalHolder_Blue2
iconSprite:
- sprite: _CP14/Objects/ModularTools/Magic/Holders/magic_crystals_holder_blue.rsi
state: icon2
rsiPath: _CP14/Objects/ModularTools/Magic/Holders/magic_crystals_holder_blue.rsi
modifiers:
- !type:EditModularSlots
addSlots:
- HolderMagicCrystal1
- HolderMagicCrystal3
- !type:Inherit
copyFrom:
- BaseBlueHolderManacostModify
- type: modularPart
id: StaffMagicCrystalHolder_Blue3
targetSlot: MagicCrystalHolder
sourcePart: CP14MagicCrystalHolder_Blue3
iconSprite:
- sprite: _CP14/Objects/ModularTools/Magic/Holders/magic_crystals_holder_blue.rsi
state: icon3
rsiPath: _CP14/Objects/ModularTools/Magic/Holders/magic_crystals_holder_blue.rsi
modifiers:
- !type:EditModularSlots
addSlots:
- HolderMagicCrystal1
- HolderMagicCrystal2
- HolderMagicCrystal4
- !type:Inherit
copyFrom:
- BaseBlueHolderManacostModify
- type: modularPart
id: StaffMagicCrystalHolder_Blue4
targetSlot: MagicCrystalHolder
sourcePart: CP14MagicCrystalHolder_Blue4
iconSprite:
- sprite: _CP14/Objects/ModularTools/Magic/Holders/magic_crystals_holder_blue.rsi
state: icon4
rsiPath: _CP14/Objects/ModularTools/Magic/Holders/magic_crystals_holder_blue.rsi
modifiers:
- !type:EditModularSlots
addSlots:
- HolderMagicCrystal1
- HolderMagicCrystal2
- HolderMagicCrystal3
- HolderMagicCrystal4
- !type:Inherit
copyFrom:
- BaseBlueHolderManacostModify

View File

@@ -3,19 +3,19 @@
name: cp14-modular-slot-blade
- type: modularSlot
id: MagicCrystal1
id: HolderMagicCrystal1
name: cp14-modular-slot-magical-crystal
- type: modularSlot
id: MagicCrystal2
id: HolderMagicCrystal2
name: cp14-modular-slot-magical-crystal
- type: modularSlot
id: MagicCrystal3
id: HolderMagicCrystal3
name: cp14-modular-slot-magical-crystal
- type: modularSlot
id: MagicCrystal4
id: HolderMagicCrystal4
name: cp14-modular-slot-magic-crystal
- type: modularSlot
@@ -25,3 +25,7 @@
- type: modularSlot
id: Garde
name: cp14-modular-slot-garde
- type: modularSlot
id: RingMagicCrystal1
name: cp14-modular-slot-magical-crystal

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

View File

@@ -0,0 +1,23 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CC-BY-SA-3.0",
"copyright": "Created by comasqw (Github)",
"states": [
{
"name": "blue1"
},
{
"name": "blue2"
},
{
"name": "blue3"
},
{
"name": "blue4"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

View File

@@ -0,0 +1,34 @@
{
"version": 1,
"license": "CLA",
"copyright": "Created by TheShuEd (Github). changed by comasqw (Github)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
},
{
"name": "inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"directions": 4
},
{
"name": "wielded-inhand-left",
"directions": 4
},
{
"name": "wielded-inhand-right",
"directions": 4
},
{
"name": "equipped-NECK",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B