-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial commit * Unused access level * Update meta.json * Update SharedBiscuitComponent.cs * Unneeded DataField and VVAccess Editing it in VV does nothing anyways, it wont magically unlock the item slot * Big smart * Add safe sprite Thanks @TadJohnson00 Co-Authored-By: Tad "Taddy" Johnson <[email protected]> * Prevent faxing slips * Custom background for corperate slip * Localize crack verb * Update paperslips.yml * Update paperslips.yml * Remove default comments * Update paperslips.yml * Pro * Remove default id card * Update Resources/Prototypes/DeltaV/Entities/Objects/Specific/Command/safe.yml Co-authored-by: DEATHB4DEFEAT <[email protected]> Signed-off-by: Debug <[email protected]> --------- Signed-off-by: Debug <[email protected]> Co-authored-by: Tad "Taddy" Johnson <[email protected]> Co-authored-by: DEATHB4DEFEAT <[email protected]>
- Loading branch information
1 parent
3fe758a
commit ec51232
Showing
46 changed files
with
646 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Content.Shared.DeltaV.Biscuit; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client.DeltaV.Biscuit; | ||
|
||
public sealed class BiscuitSystem : VisualizerSystem<BiscuitVisualsComponent> | ||
{ | ||
[Dependency] private readonly AppearanceSystem _appearance = default!; | ||
|
||
protected override void OnAppearanceChange(EntityUid uid, BiscuitVisualsComponent component, | ||
ref AppearanceChangeEvent args) | ||
{ | ||
if (args.Sprite == null) | ||
return; | ||
|
||
_appearance.TryGetData(uid, BiscuitStatus.Cracked, out bool cracked); | ||
|
||
args.Sprite.LayerSetVisible(BiscuitVisualLayers.Top, !cracked); | ||
} | ||
} | ||
|
||
public enum BiscuitVisualLayers : byte | ||
{ | ||
Base, | ||
Top | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace Content.Client.DeltaV.Biscuit; | ||
|
||
[RegisterComponent] | ||
public sealed partial class BiscuitVisualsComponent : Component | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using Content.Shared.DeltaV.Biscuit; | ||
|
||
namespace Content.Server.DeltaV.Biscuit; | ||
|
||
[RegisterComponent] | ||
public sealed partial class BiscuitComponent : SharedBiscuitComponent | ||
{ | ||
[DataField] | ||
public bool Cracked { get; set; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using Content.Shared.Containers.ItemSlots; | ||
using Content.Shared.DeltaV.Biscuit; | ||
using Content.Shared.Verbs; | ||
using Robust.Server.Audio; | ||
using Robust.Server.GameObjects; | ||
using Robust.Shared.Audio; | ||
|
||
namespace Content.Server.DeltaV.Biscuit; | ||
|
||
public sealed class BiscuitSystem : EntitySystem | ||
{ | ||
[Dependency] private readonly AppearanceSystem _appearanceSystem = default!; | ||
[Dependency] private readonly ItemSlotsSystem _slotSystem = default!; | ||
[Dependency] private readonly AudioSystem _audioSystem = default!; | ||
|
||
public override void Initialize() | ||
{ | ||
SubscribeLocalEvent<BiscuitComponent, GetVerbsEvent<AlternativeVerb>>(AddCrackVerb); | ||
} | ||
|
||
private void AddCrackVerb(EntityUid uid, BiscuitComponent component, GetVerbsEvent<AlternativeVerb> args) | ||
{ | ||
if (!args.CanInteract || !args.CanAccess || component.Cracked) | ||
return; | ||
|
||
AlternativeVerb verb = new() | ||
{ | ||
Act = () => | ||
{ | ||
CrackBiscuit(uid, component); | ||
}, | ||
Text = Loc.GetString("biscuit-verb-crack"), | ||
Priority = 2 | ||
}; | ||
args.Verbs.Add(verb); | ||
} | ||
|
||
private void CrackBiscuit(EntityUid uid, BiscuitComponent component) | ||
{ | ||
component.Cracked = true; | ||
|
||
_appearanceSystem.SetData(uid, BiscuitStatus.Cracked, true); | ||
|
||
_audioSystem.PlayPvs("/Audio/DeltaV/Effects/crack1.ogg", uid, | ||
AudioParams.Default.WithVariation(0.2f).WithVolume(-4f)); | ||
|
||
_slotSystem.SetLock(uid, "PaperSlip", false); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using Robust.Shared.Serialization; | ||
|
||
namespace Content.Shared.DeltaV.Biscuit; | ||
|
||
public abstract partial class SharedBiscuitComponent : Component | ||
{} | ||
|
||
[Serializable, NetSerializable] | ||
public enum BiscuitStatus : byte | ||
{ | ||
Cracked | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
crack1.ogg taken from | ||
https://github.com/tgstation/tgstation/blob/ebc2e02e59d36214aff1eff8250b70a7970ff43d/sound/effects/wounds/crack1.ogg | ||
licensed under CC BY-NC-SA 3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
biscuit-verb-crack = Crack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- type: accessLevel | ||
id: DV-SpareSafe | ||
name: id-card-access-level-unused |
186 changes: 186 additions & 0 deletions
186
Resources/Prototypes/DeltaV/Entities/Objects/Misc/paperslips.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,186 @@ | ||
# Biscuits for the slips | ||
- type: entity | ||
parent: BaseItem | ||
id: PaperBiscuit | ||
name: biscuit card | ||
description: A biscuit card. On the back, 'DO NOT DIGEST' is printed in large lettering. | ||
components: | ||
- type: Sprite | ||
sprite: DeltaV/Objects/Misc/biscuits.rsi | ||
layers: | ||
- state: biscuit | ||
- state: biscuit_paper | ||
map: [ "biscuit_paper" ] | ||
visible: false | ||
- state: biscuit_top | ||
map: [ "enum.BiscuitVisualLayers.Top" ] | ||
- type: Item | ||
size: 5 | ||
- type: Tag | ||
tags: | ||
- Document | ||
- type: Appearance | ||
- type: Damageable | ||
damageModifierSet: Wood | ||
- type: Biscuit | ||
- type: BiscuitVisuals | ||
- type: ItemSlots | ||
slots: | ||
PaperSlip: | ||
name: Slip | ||
whitelist: | ||
tags: | ||
- PaperSlip | ||
locked: true | ||
- type: ContainerContainer | ||
containers: | ||
PaperSlip: !type:ContainerSlot {} | ||
- type: ItemMapper | ||
sprite: DeltaV/Objects/Misc/biscuits.rsi | ||
mapLayers: | ||
biscuit_paper: | ||
whitelist: | ||
components: | ||
- Paper | ||
spriteLayers: | ||
- biscuit_paper | ||
|
||
- type: entity | ||
parent: PaperBiscuit | ||
id: PaperBiscuitFilled | ||
suffix: Filled | ||
components: | ||
- type: ItemSlots | ||
slots: | ||
PaperSlip: | ||
startingItem: PaperSlip | ||
name: Slip | ||
whitelist: | ||
tags: | ||
- PaperSlip | ||
locked: true | ||
|
||
- type: entity | ||
parent: PaperBiscuit | ||
id: PaperBiscuitCorporate | ||
name: confidential biscuit card | ||
description: A confidential biscuit card. The tasteful blue color and NT logo on the front makes it look a little like a chocolate bar. | ||
components: | ||
- type: Sprite | ||
sprite: DeltaV/Objects/Misc/biscuits.rsi | ||
layers: | ||
- state: biscuit_secret | ||
map: [ "enum.BiscuitVisualLayers.Base" ] | ||
- state: biscuit_paper_corp | ||
map: [ "biscuit_paper" ] | ||
visible: false | ||
- state: biscuit_secret_top | ||
map: [ "enum.BiscuitVisualLayers.Top" ] | ||
visible: true | ||
|
||
- type: entity | ||
parent: PaperBiscuitCorporate | ||
id: PaperBiscuitCorporateFilled | ||
suffix: Filled | ||
components: | ||
- type: ItemSlots | ||
slots: | ||
PaperSlip: | ||
startingItem: PaperSlipCorporate | ||
name: Slip | ||
whitelist: | ||
tags: | ||
- PaperSlip | ||
locked: true | ||
|
||
- type: entity | ||
parent: PaperBiscuitCorporate | ||
id: PaperBiscuitCorporateSpareID | ||
name: emergency access biscuit | ||
components: | ||
- type: ItemSlots | ||
slots: | ||
PaperSlip: | ||
startingItem: PaperSlipSpareID | ||
name: Slip | ||
whitelist: | ||
tags: | ||
- PaperSlip | ||
locked: true | ||
|
||
# Paper slips | ||
- type: entity | ||
parent: BaseItem | ||
id: PaperSlip | ||
name: paper slip | ||
description: A little slip of paper left over after a larger piece was cut. Whoa. | ||
components: | ||
- type: Sprite | ||
sprite: DeltaV/Objects/Misc/biscuits.rsi | ||
layers: | ||
- state: slip | ||
- state: slip_words | ||
map: [ "enum.PaperVisualLayers.Writing" ] | ||
visible: false | ||
- type: Paper | ||
- type: ActivatableUI | ||
key: enum.PaperUiKey.Key | ||
closeOnHandDeselect: false | ||
- type: UserInterface | ||
interfaces: | ||
- key: enum.PaperUiKey.Key | ||
type: PaperBoundUserInterface | ||
- type: Item | ||
size: 1 | ||
- type: Tag | ||
tags: | ||
- Document | ||
- PaperSlip | ||
- type: Appearance | ||
- type: PaperVisuals | ||
- type: Damageable | ||
damageModifierSet: Wood | ||
- type: Destructible | ||
thresholds: | ||
- trigger: | ||
!type:DamageTrigger | ||
damage: 15 | ||
behaviors: | ||
- !type:SpawnEntitiesBehavior | ||
spawn: | ||
Ash: | ||
min: 1 | ||
max: 1 | ||
- !type:DoActsBehavior | ||
acts: [ "Destruction" ] | ||
|
||
- type: entity | ||
parent: PaperSlip | ||
id: PaperSlipCorporate | ||
name: corporate plastic card | ||
description: A plastic card for confidential corporate matters. | ||
components: | ||
- type: Paper | ||
canEdit: false | ||
- type: Sprite | ||
layers: | ||
- state: corpslip | ||
- state: corpslip_words | ||
map: [ "enum.PaperVisualLayers.Writing" ] | ||
visible: false | ||
- type: PaperVisuals | ||
backgroundImagePath: "/Textures/DeltaV/Interface/Paper/paper_background_corpcard.svg.96dpi.png" | ||
contentMargin: 70.0, 16.0, 70.0, 16.0 | ||
maxWritableArea: 400.0, 600.0 | ||
|
||
|
||
- type: entity | ||
parent: PaperSlipCorporate | ||
id: PaperSlipSpareID | ||
suffix: SpareID | ||
name: emergency access card | ||
description: A plastic card for confidential corporate matters. It has a magnetic strip on the back. | ||
components: | ||
- type: Access | ||
tags: | ||
- DV-SpareSafe |
36 changes: 36 additions & 0 deletions
36
Resources/Prototypes/DeltaV/Entities/Objects/Specific/Command/safe.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
- type: entity | ||
parent: FireAxeCabinet | ||
id: SpareIdCabinet | ||
name: spare id cabinet | ||
description: There is a small label that reads "For emergency use only". | ||
components: | ||
- type: Sprite | ||
sprite: DeltaV/Structures/Wallmounts/idcard_cabinet.rsi | ||
layers: | ||
- state: cabinet | ||
- state: card | ||
map: ["enum.ItemCabinetVisualLayers.ContainsItem"] | ||
visible: true | ||
- state: glass | ||
map: ["enum.ItemCabinetVisualLayers.Door"] | ||
- type: ItemCabinet | ||
cabinetSlot: | ||
ejectOnInteract: true | ||
whitelist: | ||
components: | ||
- IdCard | ||
- type: AccessReader | ||
access: [["DV-SpareSafe"]] | ||
|
||
- type: entity | ||
id: SpareIdCabinetFilled | ||
parent: [SpareIdCabinet,FireAxeCabinetFilled] | ||
suffix: Filled | ||
components: | ||
- type: ItemCabinet | ||
cabinetSlot: | ||
startingItem: CaptainIDCard | ||
ejectOnInteract: true | ||
whitelist: | ||
components: | ||
- IdCard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,3 +35,6 @@ | |
|
||
- type: Tag | ||
id: Wheat | ||
|
||
- type: Tag | ||
id: PaperSlip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.