diff --git a/Content.Shared/Clothing/Components/ClothingComponent.cs b/Content.Shared/Clothing/Components/ClothingComponent.cs index 6d7226e767..371217a785 100644 --- a/Content.Shared/Clothing/Components/ClothingComponent.cs +++ b/Content.Shared/Clothing/Components/ClothingComponent.cs @@ -76,6 +76,9 @@ public sealed partial class ClothingComponent : Component [DataField, ViewVariables(VVAccess.ReadWrite)] public TimeSpan UnequipDelay = TimeSpan.Zero; + + [DataField] + public bool BreakOnMove = true; //CrystallPunk weapon unequipping on move } [Serializable, NetSerializable] diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs index 7c9279df20..017932234e 100644 --- a/Content.Shared/Inventory/InventorySystem.Equip.cs +++ b/Content.Shared/Inventory/InventorySystem.Equip.cs @@ -168,7 +168,7 @@ public abstract partial class InventorySystem { BlockDuplicate = true, BreakOnHandChange = true, - BreakOnMove = true, + BreakOnMove = clothing.BreakOnMove, //CrystallPunk weapon unequipping on move CancelDuplicate = true, RequireCanInteract = true, NeedHand = true @@ -413,7 +413,7 @@ public abstract partial class InventorySystem { BlockDuplicate = true, BreakOnHandChange = true, - BreakOnMove = true, + BreakOnMove = clothing.BreakOnMove, //CrystallPunk weapon unequipping on move CancelDuplicate = true, RequireCanInteract = true, NeedHand = true diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/dagger.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/dagger.yml index 60ef7ac66c..d9099f023e 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/dagger.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/dagger.yml @@ -19,6 +19,7 @@ unequipDelay: 0.25 sprite: _CP14/Objects/Weapons/Melee/Dagger/dagger.rsi quickEquip: false + breakOnMove: false slots: - belt - type: Sprite @@ -32,7 +33,7 @@ damage: types: Slash: 5 - Piercing: 5 + Piercing: 3 soundHit: collection: MetalThud cPAnimationLength: 0.15 diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/handheldAxe.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/handheldAxe.yml index 2229934a50..a8d432d882 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/handheldAxe.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/handheldAxe.yml @@ -23,8 +23,8 @@ wideAnimation: CP14WeaponArcSlash damage: types: - Slash: 10 - Piercing: 5 + Slash: 7 + Piercing: 2 soundHit: collection: MetalThud cPAnimationLength: 0.25 diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/lightHammer.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/lightHammer.yml index a76dab20eb..f38193a211 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/lightHammer.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/lightHammer.yml @@ -17,7 +17,7 @@ layers: - state: icon - type: MeleeWeapon - attackRate: 1.5 + attackRate: 1.2 wideAnimationRotation: 225 wideAnimation: CP14WeaponArcSlash cPAnimationLength: 0.18 diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/mace.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/mace.yml index c3c5525856..ec4402b706 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/mace.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/mace.yml @@ -3,6 +3,7 @@ parent: - BaseItem - CP14BaseWeaponDestructible + - CP14BaseWeaponThrowable name: mace description: A heavy piece of metal on a long stick. What could be simpler than that? components: @@ -19,8 +20,16 @@ wideAnimation: CP14WeaponArcSlash damage: types: - Blunt: 25 - Piercing: 5 + Blunt: 18 + Piercing: 4 soundHit: collection: MetalThud - cPAnimationLength: 0.25 \ No newline at end of file + cPAnimationLength: 0.25 + - type: DamageOtherOnHit + damage: + types: + Blunt: 10 + - type: DamageOnLand + damage: + types: + Blunt: 10 \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/sickle.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/sickle.yml index ea02cd44d2..d3c9a9334c 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/sickle.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/sickle.yml @@ -18,6 +18,7 @@ unequipDelay: 0.45 sprite: _CP14/Objects/Weapons/Melee/Sickle/sickle.rsi quickEquip: false + breakOnMove: false slots: - belt - type: Sprite @@ -31,7 +32,7 @@ cPAnimationLength: 0.18 damage: types: - Slash: 8 - Piercing: 4 + Slash: 5 + Piercing: 3 soundHit: collection: MetalThud \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/spear.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/spear.yml index 1c1e8cf9f1..66e7daa0c6 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/spear.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/spear.yml @@ -17,12 +17,12 @@ layers: - state: icon - type: MeleeWeapon - attackRate: 1 + attackRate: 0.8 wideAnimationRotation: -115 wideAnimation: CP14WeaponArcThrust damage: types: - Piercing: 24 + Piercing: 19 soundHit: collection: MetalThud cPAnimationLength: 0.25 diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/twoHandedSword.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/twoHandedSword.yml index 1acc47829e..2cefa0700e 100644 --- a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/twoHandedSword.yml +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Melee/twoHandedSword.yml @@ -16,13 +16,14 @@ unequipDelay: 1 sprite: _CP14/Objects/Weapons/Melee/TwoHandedSword/twoHandedSword.rsi quickEquip: false + breakOnMove: false slots: - back - type: Icon sprite: _CP14/Objects/Weapons/Melee/TwoHandedSword/twoHandedSword32.rsi state: icon - type: MeleeWeapon - attackRate: 0.5 + attackRate: 0.7 wideAnimationRotation: 205 wideAnimation: CP14WeaponArcSlash damage: diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Ammunition/crossbowBolts.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Ammunition/crossbowBolts.yml new file mode 100644 index 0000000000..1b08b2192f --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/Ammunition/crossbowBolts.yml @@ -0,0 +1,28 @@ +- type: entity + parent: BaseArrow + id: CP14BaseCrossbolt + abstract: true + components: + - type: Tag + tags: + - CP14CrossbowBolt + +- type: entity + id: CP14Crossbolt + parent: CP14BaseCrossbolt + name: crossbow bolt + description: Rod with a sharpened spike. No plumage, they're not bows. + components: + - type: Projectile + deleteOnCollide: false + onlyCollideWhenShot: true + damage: + types: + Piercing: 20 + - type: Sprite + sprite: _CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi + layers: + - state: rod + - state: solution1 + map: ["enum.SolutionContainerLayers.Fill"] + visible: false \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/lightCrossbow.yml b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/lightCrossbow.yml new file mode 100644 index 0000000000..3dc7138b34 --- /dev/null +++ b/Resources/Prototypes/_CP14/Entities/Objects/Weapons/Ranged/lightCrossbow.yml @@ -0,0 +1,54 @@ +- type: entity + id: CP14BaseLightCrossbow + name: light crossbow + parent: BaseItem + description: a small, compact crossbow that is comfortable to hold with one hand. Not too strong on the back side. + components: + - type: Sprite + sprite: _CP14/Objects/Weapons/Ranged/light_crossbow.rsi + layers: + - state: unwielded + map: [ base ] + - type: Item + size: Small + - type: Clothing + equipDelay: 0.45 + unequipDelay: 0.45 + sprite: _CP14/Objects/Weapons/Ranged/light_crossbow.rsi + quickEquip: false + breakOnMove: false + slots: + - belt + - type: UseDelay + delay: 1 + - type: Gun + fireRate: 1 + minAngle: 15 + maxAngle: 35 + selectedMode: SemiAuto + availableModes: + - SemiAuto + soundGunshot: + collection: BulletMiss + soundEmpty: null + - type: ItemSlots + slots: + projectiles: + name: Projectiles + startingItem: null + insertSound: /Audio/Weapons/Guns/Misc/arrow_nock.ogg + whitelist: + tags: + - CP14CrossbowBolt + - type: ContainerContainer + containers: + projectiles: !type:ContainerSlot + - type: ContainerAmmoProvider + container: projectiles + - type: Appearance + - type: ItemMapper + mapLayers: + unwielded-arrow: + whitelist: + tags: + - CP14CrossbowBolt \ No newline at end of file diff --git a/Resources/Prototypes/_CP14/tags.yml b/Resources/Prototypes/_CP14/tags.yml index 2cd3ac01d1..a2b52ca4a7 100644 --- a/Resources/Prototypes/_CP14/tags.yml +++ b/Resources/Prototypes/_CP14/tags.yml @@ -2,4 +2,7 @@ id: CP14Key - type: Tag - id: CP14Coin \ No newline at end of file + id: CP14Coin + +- type: Tag + id: CP14CrossbowBolt \ No newline at end of file diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi/meta.json b/Resources/Textures/_CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi/meta.json new file mode 100644 index 0000000000..4780477b83 --- /dev/null +++ b/Resources/Textures/_CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi/meta.json @@ -0,0 +1,17 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Created by TheShuEd (github) for CrystallPunk14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "rod" + }, + { + "name": "solution1" + } + ] +} diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi/rod.png b/Resources/Textures/_CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi/rod.png new file mode 100644 index 0000000000..52f859779d Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi/rod.png differ diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi/solution1.png b/Resources/Textures/_CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi/solution1.png new file mode 100644 index 0000000000..eb654a48ca Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Weapons/Ranged/Projectiles/crossbolt.rsi/solution1.png differ diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/equipped-BELT1.png b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/equipped-BELT1.png new file mode 100644 index 0000000000..c9adf48906 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/equipped-BELT1.png differ diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/equipped-BELT2.png b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/equipped-BELT2.png new file mode 100644 index 0000000000..82ae7a6da8 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/equipped-BELT2.png differ diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/inhand-left.png b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/inhand-left.png new file mode 100644 index 0000000000..d214fcbfd3 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/inhand-left.png differ diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/inhand-right.png b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/inhand-right.png new file mode 100644 index 0000000000..47103b8d09 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/inhand-right.png differ diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/meta.json b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/meta.json new file mode 100644 index 0000000000..6b32cef78f --- /dev/null +++ b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/meta.json @@ -0,0 +1,39 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Created by TheShuEd (github) for CrystallPunk14", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "unwielded" + }, + { + "name": "unwielded-arrow" + }, + { + "name": "wielded" + }, + { + "name": "wielded-arrow" + }, + { + "name": "equipped-BELT1", + "directions": 4 + }, + { + "name": "equipped-BELT2", + "directions": 4 + }, + { + "name": "inhand-left", + "directions": 4 + }, + { + "name": "inhand-right", + "directions": 4 + } + ] +} diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/unwielded-arrow.png b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/unwielded-arrow.png new file mode 100644 index 0000000000..eb3c9b28c0 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/unwielded-arrow.png differ diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/unwielded.png b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/unwielded.png new file mode 100644 index 0000000000..61561d69c3 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/unwielded.png differ diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/wielded-arrow.png b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/wielded-arrow.png new file mode 100644 index 0000000000..9a62bc4a06 Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/wielded-arrow.png differ diff --git a/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/wielded.png b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/wielded.png new file mode 100644 index 0000000000..6951d61dad Binary files /dev/null and b/Resources/Textures/_CP14/Objects/Weapons/Ranged/light_crossbow.rsi/wielded.png differ