Skip to content

Commit

Permalink
Modular arrows (#906)
Browse files Browse the repository at this point in the history
* arrow

* sprite

* slots

* migration

* fix

* fix2

* del

---------

Co-authored-by: Ed <[email protected]>
  • Loading branch information
Nimfar11 and TheShuEd authored Feb 19, 2025
1 parent dfd1603 commit 88462e5
Show file tree
Hide file tree
Showing 24 changed files with 490 additions and 42 deletions.
4 changes: 3 additions & 1 deletion Resources/Locale/en-US/_CP14/modularCraft/slots.ftl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cp14-modular-slot-blade = blade
cp14-modular-slot-garde = garde
cp14-modular-slot-blade-inlay = blade inlay
cp14-modular-slot-blade-inlay = blade inlay
cp14-modular-slot-rod = rod
cp14-modular-slot-arrow-tip = arrow tip
4 changes: 3 additions & 1 deletion Resources/Locale/ru-RU/_CP14/modularCraft/slots.ftl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cp14-modular-slot-blade = лезвие
cp14-modular-slot-garde = гарда
cp14-modular-slot-blade-inlay = инкрустация лезвия
cp14-modular-slot-blade-inlay = инкрустация лезвия
cp14-modular-slot-rod = древко
cp14-modular-slot-arrow-tip = наконечник стрелы
17 changes: 14 additions & 3 deletions Resources/Prototypes/_CP14/Entities/Clothing/Belt/quiver.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,24 @@

- type: entity
parent: CP14ClothingBeltQuiver
id: CP14ClothingBeltQuiverArrow
id: CP14ClothingBeltQuiverIronArrow
categories: [ ForkFiltered ]
suffix: Full. Arrow
suffix: Full. Iron. Arrow
components:
- type: StorageFill
contents:
- id: CP14Arrow
- id: CP14ModularIronArrow
amount: 16

- type: entity
parent: CP14ClothingBeltQuiver
id: CP14ClothingBeltQuiverMithrilArrow
categories: [ ForkFiltered ]
suffix: Full. Mithril. Arrow
components:
- type: StorageFill
contents:
- id: CP14ModularMithrilArrow
amount: 16

- type: entity
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
- type: entity
parent: BaseItem
id: CP14ModularBladeTipBase
categories: [ ForkFiltered ]
abstract: true
description: The tip on an arrow shaft, a well-finished little piece of metal.
components:
- type: Item
storedRotation: 0

- type: entity
parent: CP14ModularBladeTipBase
id: CP14ModularTipIronArrow
name: iron tip
components:
- type: Sprite
sprite: _CP14/Objects/ModularTools/Tip/arrow.rsi
layers:
- state: icon
- state: solution1
map: ["enum.SolutionContainerLayers.Fill"]
visible: false
- type: CP14ModularCraftPart
possibleParts:
- TipIronArrow
- type: CP14Material
materials:
CP14Iron: 2

- type: entity
parent: CP14ModularBladeTipBase
id: CP14ModularTipGoldArrow
name: golden tip
components:
- type: Sprite
sprite: _CP14/Objects/ModularTools/Tip/arrow.rsi
layers:
- state: icon
color: "#ffaf47"
- state: solution1
map: ["enum.SolutionContainerLayers.Fill"]
visible: false
- type: CP14ModularCraftPart
possibleParts:
- TipGoldArrow
- type: CP14Material
materials:
CP14Gold: 2

- type: entity
parent: CP14ModularBladeTipBase
id: CP14ModularTipCopperArrow
name: copper tip
components:
- type: Sprite
sprite: _CP14/Objects/ModularTools/Tip/arrow.rsi
layers:
- state: icon
color: "#bd712f"
- state: solution1
map: ["enum.SolutionContainerLayers.Fill"]
visible: false
- type: CP14ModularCraftPart
possibleParts:
- TipCopperArrow
- type: CP14Material
materials:
CP14Copper: 2

- type: entity
parent: CP14ModularBladeTipBase
id: CP14ModularTipMithrilArrow
name: mithril tip
components:
- type: Sprite
sprite: _CP14/Objects/ModularTools/Tip/arrow.rsi
layers:
- state: icon
color: "#45d2a4"
- state: solution1
map: ["enum.SolutionContainerLayers.Fill"]
visible: false
- type: CP14ModularCraftPart
possibleParts:
- TipMithrilArrow
- type: CP14Material
materials:
CP14Mithril: 2
Original file line number Diff line number Diff line change
Expand Up @@ -387,4 +387,4 @@
collection: MetalBreak
- !type:CP14ModularDisassembleBehavior
- !type:DoActsBehavior
acts: ["Destruction"]
acts: ["Destruction"]
99 changes: 99 additions & 0 deletions Resources/Prototypes/_CP14/Entities/Objects/ModularTools/rod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
- type: entity
parent: CP14ModularGripBase
id: CP14ModularRod
abstract: true
description: A thin shaft of wood, the most important part of the future arrow.
components:
- type: CP14ModularCraftStartPoint
startSlots:
- ArrowTip
- type: Item
storedRotation: 0
- type: MeleeWeapon
resetOnHandSelected: false #Fast swap
range: 1.0 # 1.5 standart
cPAnimationOffset: -0.75 #-1 standart
attackRate: 1 # 1 standart
- type: Clothing
slots:
- belt
- type: Fixtures
fixtures:
fix1:
shape: !type:PhysShapeCircle
radius: 0.2
density: 5
mask:
- ItemMask
restitution: 0.3
friction: 0.2
projectile:
shape:
!type:PhysShapeAabb
bounds: "-0.1,-0.1,0.1,0.1"
hard: false
mask:
- Impassable
- BulletImpassable
- type: EmbeddableProjectile
sound: /Audio/Weapons/star_hit.ogg
embedOnThrow: false
- type: ThrowingAngle
angle: 0
- type: Ammo
muzzleFlash: null
- type: Tag
tags:
- CP14Arrow

# Rod
- type: entity
parent: CP14ModularRod
id: CP14ModularRodWooden
name: wooden grip
components:
- type: Sprite
sprite: _CP14/Objects/ModularTools/Rod/arrow.rsi
layers:
- state: tail
- state: icon
- type: CP14ModularCraftStartPoint
startProtoPart: CP14ModularRodWooden
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 30
behaviors:
- !type:PlaySoundBehavior
sound:
collection: MetalBreak
- !type:CP14ModularDisassembleBehavior
- !type:DoActsBehavior
acts: ["Destruction"]

- type: entity
parent: CP14ModularRod
id: CP14ModularRodLucens
name: lucens grip
components:
- type: Sprite
sprite: _CP14/Objects/ModularTools/Rod/arrow.rsi
layers:
- state: tail
- state: icon
color: "#0398fc"
- type: CP14ModularCraftStartPoint
startProtoPart: CP14ModularRodLucens
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 45
behaviors:
- !type:PlaySoundBehavior
sound:
collection: MetalBreak
- !type:CP14ModularDisassembleBehavior
- !type:DoActsBehavior
acts: ["Destruction"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
- type: entity
id: CP14ModularIronArrow
parent: CP14ModularRodWooden
name: iron arrow
description: Standard arrow, balance between damage and reliability.
components:
- type: Sprite
layers:
- state: icon
- state: tail
- sprite: _CP14/Objects/ModularTools/Tip/arrow.rsi
state: icon
- type: CP14ModularCraftAutoAssemble
details:
- TipIronArrow

- type: entity
id: CP14ModularMithrilArrow
parent: CP14ModularRodLucens
name: mithril arrow
description: An arrow made of expensive wood and magical iron, you shoot money, but the damage matches.
components:
- type: Sprite
layers:
- state: icon
color: "#0398fc"
- state: tail
- sprite: _CP14/Objects/ModularTools/Tip/arrow.rsi
state: icon
color: "#45d2a4"
- type: CP14ModularCraftAutoAssemble
details:
- TipMithrilArrow

This file was deleted.

Loading

0 comments on commit 88462e5

Please sign in to comment.