Skip to content

Commit

Permalink
Zipties for borgs
Browse files Browse the repository at this point in the history
  • Loading branch information
FoxxoTrystan committed Jan 10, 2025
1 parent 22b7ff9 commit d8329d2
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 11 deletions.
6 changes: 6 additions & 0 deletions Content.Shared/Cuffs/Components/HandcuffComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ public sealed partial class HandcuffComponent : Component
[DataField, ViewVariables(VVAccess.ReadWrite)]
public bool NoRot = false;

/// <summary>
/// Should the cuff be removed when used? (This will always give zipties to the target, i should do another system clone or move it to its own comp but so far, this works)
/// </summary>
[DataField]
public bool RemoveOnUse = true;

/// <summary>
/// The time it takes to cuff an entity.
/// </summary>
Expand Down
10 changes: 8 additions & 2 deletions Content.Shared/Cuffs/SharedCuffableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,13 @@ public bool TryAddNewCuffs(EntityUid target, EntityUid user, EntityUid handcuff,
return false;

// Success!
_hands.TryDrop(user, handcuff);
if (cuff.RemoveOnUse)
_hands.TryDrop(user, handcuff);
else
{
handcuff = Spawn("Zipties", Transform(user).Coordinates);
EnsureComp<HandcuffComponent>(handcuff);
}

_container.Insert(handcuff, component.Container);
UpdateHeldItems(target, handcuff, component);
Expand Down Expand Up @@ -739,4 +745,4 @@ private sealed partial class AddCuffDoAfterEvent : SimpleDoAfterEvent
{
}
}
}
}
7 changes: 2 additions & 5 deletions Resources/Prototypes/Floof/Entities/Mobs/Cyborgs/quadborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
- Common
- Science
- type: ActiveRadio
- type: Body
prototype: Primate
requiredLegs: 1 # TODO: More than 1 leg
- type: BorgChassis
maxModules: 4
moduleWhitelist:
Expand All @@ -48,10 +45,10 @@
- type: Speech
speechVerb: Robotic
- type: LayingDown
- type: SiliconLawProvider
- type: SiliconLawProvider
laws: Qborg
- type: LeashAnchor # Floofstation

- type: entity
id: BorgChassisQuadCC
parent: BorgChassisQuad
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- type: entity
id: BorgModuleStun
parent: [ BaseBorgModuleSecurity, BaseProviderBorgModule ]
name: Disabler cyborg Module
name: Disabler cyborg Module
description: A Module "incapable of causing harm if used correctly"
components:
- type: Sprite
Expand All @@ -23,6 +23,7 @@
- WeaponBorgDisabler
- BorgStunbaton
- BorgFlash
- BorgZipties

- type: entity
id: BorgModuleKill
Expand All @@ -39,7 +40,7 @@
- WeaponAdvancedLaser
- WeaponborgPistolMk58
- CombatKnife

- type: entity
id: BorgModuleInvestigation
parent: [ BaseBorgModuleSecurity, BaseProviderBorgModule ]
Expand All @@ -55,7 +56,7 @@
- ForensicScanner
- DetectivePDA
- SecurityWhistle

- type: entity
id: BorgModuleadvancedmeasures
parent: [ BaseBorgModuleSecurity, BaseProviderBorgModule ]
Expand All @@ -70,4 +71,4 @@
items:
- WeaponBorgEnergyShotgun
- BorgWeaponXrayCannon

Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,26 @@
path: /Audio/Weapons/Guns/Gunshots/kinetic_accel.ogg
fireOnDropChance: 1

- type: entity
id: BorgZipties
suffix: Robot
parent: Zipties
components:
- type: Handcuff
removeOnUse: false
breakoutTime: 3
cuffedRSI: Objects/Misc/cablecuffs.rsi # cablecuffs will look fine
bodyIconState: body-overlay
breakOnRemove: true
brokenPrototype: ZiptiesBroken
startCuffSound:
path: /Audio/Items/Handcuffs/ziptie_start.ogg
endCuffSound:
path: /Audio/Items/Handcuffs/ziptie_end.ogg
startUncuffSound:
path: /Audio/Items/Handcuffs/rope_start.ogg
endUncuffSound:
path: /Audio/Items/Handcuffs/rope_breakout.ogg
startBreakoutSound:
path: /Audio/Items/Handcuffs/rope_takeoff.ogg
uncuffEasierWhenLarge: true

0 comments on commit d8329d2

Please sign in to comment.