This commit is contained in:
comasqw
2024-12-02 12:31:07 +04:00
parent bb43b37fd8
commit 81dd06ac2c
73 changed files with 676 additions and 18 deletions

View File

@@ -0,0 +1,20 @@
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

@@ -0,0 +1,27 @@
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;
namespace Content.Server._CP14.ModularCraft.Modifiers;
public sealed partial class AddSpellsToSpellStorage : CP14ModularCraftModifier
{
[DataField]
public List<EntProtoId> Spells;
public override void Effect(EntityManager entManager, Entity<CP14ModularCraftStartPointComponent> start, Entity<CP14ModularCraftPartComponent>? part)
{
if (!entManager.TryGetComponent<CP14SpellStorageComponent>(start, out var storageComp))
return;
var spellStorageSystem = entManager.System<CP14SpellStorageSystem>();
foreach (var spell in Spells)
{
spellStorageSystem.TryAddSpellToStorage((start.Owner, storageComp), spell);
}
}
}

View File

@@ -3,6 +3,7 @@ using Content.Shared._CP14.MagicSpell.Components;
using Content.Shared._CP14.MagicSpell.Events;
using Content.Shared.Actions;
using Content.Shared.Clothing;
using Robust.Shared.Prototypes;
using Content.Shared.Clothing.Components;
using Content.Shared.Damage;
using Content.Shared.Hands;
@@ -57,14 +58,7 @@ public sealed partial class CP14SpellStorageSystem : EntitySystem
foreach (var spell in mStorage.Comp.Spells)
{
var spellEnt = _actionContainer.AddAction(mStorage, spell);
if (spellEnt is null)
continue;
var provided = EntityManager.EnsureComponent<CP14MagicEffectComponent>(spellEnt.Value);
provided.SpellStorage = mStorage;
mStorage.Comp.SpellEntities.Add(spellEnt.Value);
TryAddSpellToStorage(mStorage, spell);
}
}
@@ -149,6 +143,21 @@ public sealed partial class CP14SpellStorageSystem : EntitySystem
return true;
}
public bool TryAddSpellToStorage(Entity<CP14SpellStorageComponent> mStorage, EntProtoId spell)
{
if (_net.IsClient)
return false;
var spellEnt = _actionContainer.AddAction(mStorage, spell);
if (spellEnt is null)
return false;
var provided = EntityManager.EnsureComponent<CP14MagicEffectComponent>(spellEnt.Value);
provided.SpellStorage = mStorage;
mStorage.Comp.SpellEntities.Add(spellEnt.Value);
return true;
}
private void OnRemovedAttune(Entity<CP14SpellStorageRequireAttuneComponent> ent, ref RemovedAttuneFromMindEvent args)
{
if (args.User is null)

View File

@@ -4,7 +4,7 @@ using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.ModularCraft.Components;
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true), Access(typeof(CP14SharedModularCraftSystem))]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(true)]
public sealed partial class CP14ModularCraftStartPointComponent : Component
{
/// <summary>

View File

@@ -8,6 +8,7 @@ cp14-stack-flora = tufts of grass
cp14-stack-copper-bars = copper bars
cp14-stack-iron-bars = iron bars
cp14-stack-gold-bars = gold bars
cp14-stack-glowing-iron-bars = bars of glowing iron
cp14-stack-wallpaper = rolls of wallpaper

View File

@@ -1,2 +1,4 @@
cp14-modular-slot-blade = лезвие
cp14-modular-slot-jewerly1 = украшение (1)
cp14-modular-slot-jewerly1 = украшение (1)
cp14-modular-slot-magic-crystal = магический кристалл
cp14-modular-slot-magic-crystal-holder = держатель магических кристаллов

View File

@@ -8,7 +8,8 @@ cp14-stack-flora = пучки травы
cp14-stack-copper-bars = медные слитки
cp14-stack-iron-bars = железные слитки
cp14-stack-gold-bars = золотые слитки
cp14-stack-glowing-iron-bars = слитки сверкающего железа
cp14-stack-wallpaper = рулон обоев
cp14-stack-glass-sheet = стекло
cp14-stack-glass-sheet = стекло

View File

@@ -320,3 +320,43 @@
- type: FoodSequenceElement
entries:
CP14Plate: CP14PlateTomatoesSlice
- type: entity
id: CP14FoodGlowingFruit
parent: FoodInjectableBase
categories: [ ForkFiltered ]
name: glowing fruit
description: Glowing Fruit. Exudes mana.
components:
- type: PointLight
radius: 1.3
energy: 2
color: "#87CEEB"
- type: Item
size: Tiny
- type: FlavorProfile
flavors:
- CP14Magic
- type: Sprite
sprite: _CP14/Objects/Flora/Farm/glowing_fruit.rsi
layers:
- state: base1
map: [ "random" ]
- type: RandomSprite
available:
- random:
base1: ""
base2: ""
base3: ""
base4: ""
- type: SolutionContainerManager
solutions:
food:
maxVol: 11
reagents:
- ReagentId: Nutriment
Quantity: 4
- ReagentId: Vitamin
Quantity: 2
- ReagentId: CP14BlueAmanita
Quantity: 3

View File

@@ -167,4 +167,49 @@
suffix: 10
components:
- type: Stack
count: 10
count: 10
- type: entity
id: CP14GlowingIronBar1
parent: BaseItem
name: glowing iron bar
suffix: 1
description: A heavy piece of refined glowing iron
categories: [ ForkFiltered ]
components:
- type: PointLight
radius: 1.3
energy: 2
- type: Item
size: Normal
- type: Sprite
sprite: _CP14/Objects/Materials/glowingiron_bar.rsi
layers:
- state: bar
map: ["base"]
- type: Appearance
- type: Stack
stackType: CP14GlowingIronBar
count: 1
baseLayer: base
layerStates:
- bar
- bar_2
- bar_3
- type: Material
- type: entity
id: CP14GlowingIronBar5
parent: CP14GlowingIronBar1
suffix: 5
components:
- type: Stack
count: 5
- type: entity
id: CP14GlowingIronBar10
parent: CP14GlowingIronBar1
suffix: 10
components:
- type: Stack
count: 10

View File

@@ -142,6 +142,57 @@
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: entity
id: CP14GlowingWoodLog
parent: BaseItem
name: glowing wooden log
description: A piece of unprocessed wood. Good material for building, or starting a fire.
categories: [ ForkFiltered ]
components:
- type: PointLight
radius: 1.3
energy: 2
color: "#87CEEB"
- type: Item
size: Normal
shape:
- 0,0,1,0
- type: Sprite
sprite: _CP14/Objects/Materials/wood.rsi
layers:
- state: log
- type: Tag
tags:
- CP14FireplaceFuel
- Wooden
- type: Flammable
fireSpread: false
canResistFire: false
alwaysCombustible: true
canExtinguish: true
cP14FireplaceFuel: 30
damage:
types:
Heat: 1
- type: Log
spawnedPrototype: CP14WoodenPlanks1
spawnCount: 3
- type: Appearance
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Wood
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 25
behaviors:
- !type:PlaySoundBehavior
sound:
collection: WoodDestroy
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: entity
id: CP14WoodenPlanks1
parent: BaseItem

View File

@@ -0,0 +1,33 @@
- type: entity
id: CP14MagicCrystalBase
parent: BaseItem
abstract: true
name: magic crystal
description: Mana-conducting crystal, contains a spell.
categories: [ ForkFiltered ]
components:
- type: CP14SpellStorageAccessHolding
- type: Item
size: Tiny
- type: Sprite
sprite: _CP14/Objects/Magic/magic_crystal.rsi
state: crystal_grey
- type: PointLight
radius: 1.2
energy: 2
color: "#808080"
- type: entity
id: CP14MagicCrystalSpellSphereOfLight
parent: CP14MagicCrystalBase
components:
- type: Sprite
color: "#FFFF00"
- type: CP14SpellStorage
spells:
- CP14ActionSpellSphereOfLight
- type: PointLight
color: "#FFFF00"
- type: CP14ModularCraftPart
possibleParts:
- RingMagicCrystal1_SpellSphereOfLight

View File

@@ -0,0 +1,19 @@
- type: entity
parent: Clothing
id: CP14ClothingMagicRingBase
categories: [ ForkFiltered ]
components:
- type: Item
size: Tiny
- type: Clothing
slots:
- ring
- type: Sprite
sprite: _CP14/Clothing/Rings/rings.rsi
state: brass_ring_blue
- type: CP14SpellStorageAccessWearing
- type: CP14SpellStorage
- type: CP14ModularCraftStartPoint
startProtoPart: CP14ClothingMagicRingBase
startSlots:
- MagicCrystal1

View File

@@ -17,7 +17,7 @@
id: CP14OreCopper
parent: CP14BaseOre
name: copper ore
description: A piece of pale, heavy copper.
description: A piece of pale, heavy copper.
components:
- type: Sprite
sprite: _CP14/Objects/Materials/copper_ore.rsi
@@ -29,7 +29,7 @@
id: CP14OreIron
parent: CP14BaseOre
name: iron ore
description: A piece of cold, heavy iron.
description: A piece of cold, heavy iron.
components:
- type: Sprite
sprite: _CP14/Objects/Materials/iron_ore.rsi
@@ -47,4 +47,20 @@
sprite: _CP14/Objects/Materials/gold_ore.rsi
layers:
- state: ore1
map: ["random"]
map: ["random"]
- type: entity
id: CP14OreGlowingIron
parent: CP14BaseOre
name: glowing iron ore
description: A piece of soft, glowing iron.
components:
- type: PointLight
radius: 1.3
energy: 2
color: "#87CEEB"
- type: Sprite
sprite: _CP14/Objects/Materials/glowingiron_ore.rsi
layers:
- state: ore1
map: ["random"]

View File

@@ -208,4 +208,55 @@
id: CP14FloraTreeLarge06
components:
- type: Sprite
state: treelarge06
state: treelarge06
- type: entity
parent: CP14BaseTree
id: CP14FloraGlowingTree
components:
- type: PointLight
radius: 1.3
energy: 2
color: "#87CEEB"
- type: Sprite
noRot: true
sprite: _CP14/Structures/Flora/Trees/glowing_tree.rsi
state: tree1
drawdepth: Mobs
offset: 0,0.9
- type: Destructible
thresholds:
- trigger:
!type:DamageTypeTrigger
damageType: Heat
damage: 100
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 200
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 75
behaviors:
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/tree_fell.ogg
params:
volume: 5
variation: 0.05
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:SpawnEntitiesBehavior
spawn:
CP14GlowingWoodLog:
min: 1
max: 2
CP14FoodGlowingFruit:
min: 1
max: 2

View File

@@ -203,6 +203,47 @@
- type: IconSmooth
base: wall
- type: entity
id: CP14WallStoneShiningIronOre
suffix: glowing iron ore
parent: CP14WallStone
description: A solid stone natural wall. You see the shining particles in it.
components:
- type: PointLight
radius: 1.3
energy: 2
color: "#87CEEB"
- type: Sprite
sprite: _CP14/Structures/Walls/Natural/cave_stone_glowingiron.rsi
- type: Icon
sprite: _CP14/Structures/Walls/Natural/cave_stone_glowingiron.rsi
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 300
behaviors:
- !type:DoActsBehavior
acts: ["Destruction"]
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/break_stone.ogg
params:
volume: -6
- !type:SpawnEntitiesBehavior
spawn:
CP14OreGlowingIron:
min: 1
max: 3
- !type:DoActsBehavior
acts: ["Destruction"]
- type: IconSmooth
base: wall
# We dont have silver now
#- type: entity

View File

@@ -0,0 +1,12 @@
- 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

@@ -0,0 +1,12 @@
- 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

@@ -1,3 +1,23 @@
- type: modularSlot
id: Blade
name: cp14-modular-slot-blade
name: cp14-modular-slot-blade
- type: modularSlot
id: MagicCrystal1
name: cp14-modular-slot-magical-crystal
- type: modularSlot
id: MagicCrystal2
name: cp14-modular-slot-magical-crystal
- type: modularSlot
id: MagicCrystal3
name: cp14-modular-slot-magical-crystal
- type: modularSlot
id: MagicCrystal4
name: cp14-modular-slot-magic-crystal
- type: modularSlot
id: MagicCrystalHolder
name: cp14-modular-slot-magic-crystal-holder

View File

@@ -28,4 +28,12 @@
craftTime: 4
entities:
CP14QuartzShard: 1
result: CP14GlassSheet1
result: CP14GlassSheet1
- type: CP14Recipe
id: CP14GlowingIron1
tag: CP14RecipeMeltingFurnace
craftTime: 4
entities:
CP14OreGlowingIron: 4
result: CP14GlowingIronBar1

View File

@@ -67,3 +67,10 @@
icon: { sprite: "_CP14/Objects/Materials/flora.rsi", state: grass_material1 }
spawn: CP14FloraMaterial1
maxCount: 2
- type: stack
id: CP14GlowingIronBar
name: cp14-stack-glowing-iron-bars
spawn: CP14GlowingIronBar1
icon: { sprite: _CP14/Objects/Materials/glowingiron_bar.rsi, state: bar_2 }
maxCount: 10

Binary file not shown.

After

Width:  |  Height:  |  Size: 639 B

View File

@@ -10,6 +10,9 @@
{
"name": "brass_ring"
},
{
"name": "brass_ring_blue"
},
{
"name": "saphhire_stone_small"
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 613 B

View File

@@ -0,0 +1,23 @@
{
"version": 1,
"license": "CLA",
"copyright": "Created by omsoyk (Discord). Recolored by comasqw (Github)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "base1"
},
{
"name": "base2"
},
{
"name": "base3"
},
{
"name": "base4"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

View File

@@ -0,0 +1,14 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CC-BY-SA-3.0",
"copyright": "Created by TheShuEd (Github). Recolored comasqw (Github)",
"states": [
{
"name": "crystal_grey"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 650 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 750 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

View File

@@ -0,0 +1,20 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CLA",
"copyright": "Created by TheShuEd (Github). Recolored by comasqw (Github)",
"states": [
{
"name": "bar"
},
{
"name": "bar_2"
},
{
"name": "bar_3"
}
]
}

View File

@@ -0,0 +1,20 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CLA",
"copyright": "Created by TheShuEd (Github). Recolored by github: comasqw",
"states": [
{
"name": "ore1"
},
{
"name": "ore2"
},
{
"name": "ore3"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 736 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 502 B

View File

@@ -0,0 +1,26 @@
{
"version": 1,
"license": "CLA",
"copyright": "Created by TheShuEd. Recolored by comasqw (Github)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "ring_grey_icon"
},
{
"name": "blueholder_grey_icon1"
},
{
"name": "blueholder_grey_icon2"
},
{
"name": "blueholder_grey_icon3"
},
{
"name": "blueholder_grey_icon4"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 569 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 636 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

View File

@@ -0,0 +1,43 @@
{
"version": 1,
"license": "CLA",
"copyright": "Created by TheShuEd (Github). Recolored and cut by comasqw (Github)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon1"
},
{
"name": "icon2"
},
{
"name": "icon3"
},
{
"name": "icon4"
},
{
"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: 683 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

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

View File

@@ -0,0 +1,14 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Created by TheShuEd for Space Station 14. Changed by github: comasqw",
"size": {
"x": 96,
"y": 96
},
"states": [
{
"name": "tree1"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -0,0 +1,46 @@
{
"version": 1,
"size": {
"x": 32,
"y": 64
},
"license": "CLA",
"copyright": "Created by TheShuEd (Discord). Recolored by comasqw (Github) ",
"states": [
{
"name": "wall0",
"directions": 4
},
{
"name": "wall1",
"directions": 4
},
{
"name": "wall2",
"directions": 4
},
{
"name": "wall3",
"directions": 4
},
{
"name": "wall4",
"directions": 4
},
{
"name": "wall5",
"directions": 4
},
{
"name": "wall6",
"directions": 4
},
{
"name": "wall7",
"directions": 4
},
{
"name": "full"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB