Skip to content

Commit

Permalink
first lesson
Browse files Browse the repository at this point in the history
  • Loading branch information
KashRas committed Nov 10, 2024
1 parent 1eac70a commit 6148fdb
Show file tree
Hide file tree
Showing 86 changed files with 378 additions and 163 deletions.
3 changes: 3 additions & 0 deletions Content.Server/Power/Generator/PortableGeneratorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ private void StartGenerator(EntityUid uid, PortableGeneratorComponent component,
private void StopGenerator(EntityUid uid, PortableGeneratorComponent component, EntityUid user)
{
_generator.SetFuelGeneratorOn(uid, false);

_audio.PlayEntity(component.FailureSound, Filter.Pvs(uid), uid, true); // ADT-Sound-Update
}

private void OnGeneratorStarted(EntityUid uid, PortableGeneratorComponent component, GeneratorStartedEvent args)
Expand Down Expand Up @@ -127,6 +129,7 @@ private void GeneratorTugged(EntityUid uid, PortableGeneratorComponent component
return;

_popup.PopupEntity(Loc.GetString("portable-generator-start-success"), uid, user.Value);
_audio.PlayEntity(component.SuccessSound, Filter.Pvs(uid), uid, true); // ADT-Sound-Update

}
else
Expand Down
10 changes: 10 additions & 0 deletions Content.Shared/Power/Generator/SharedPortableGeneratorComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ public sealed partial class PortableGeneratorComponent : Component
[DataField("startSoundEmpty")]
[ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier? StartSoundEmpty { get; set; }

// ADT-Sound-Update-Start
[DataField("successSound")]
[ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier? SuccessSound { get; set; }

[DataField("failureSound")]
[ViewVariables(VVAccess.ReadWrite)]
public SoundSpecifier? FailureSound { get; set; }
// ADT-Sound-Update-End
}

/// <summary>
Expand Down
Binary file not shown.
Binary file added Resources/Audio/ADT/Ambience/robotics_1.ogg
Binary file not shown.
Binary file added Resources/Audio/ADT/Ambience/robotics_2.ogg
Binary file not shown.
Binary file added Resources/Audio/ADT/Ambience/vault_1.ogg
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added Resources/Audio/ADT/Machines/pacman_off.ogg
Binary file not shown.
Binary file added Resources/Audio/ADT/Machines/pacman_on.ogg
Binary file not shown.
78 changes: 78 additions & 0 deletions Resources/Prototypes/ADT/Entities/Structures/Specific/boxes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
- type: entity
parent: BaseStructure
id: ADTBoxMaintenance
name: box maintenance
description: Iconic symbol of maintenance areas. The variety of these boxes is simply amazing.
components:
- type: Sprite
sprite: ADT/Structures/Specific/boxes.rsi
snapCardinals: true
layers:
- state: box_b1
map: [ "box" ]
- type: InteractionOutline
- type: Physics
bodyType: Static
- type: Anchorable
- type: Pullable
- type: Transform
anchored: true
noRot: true
- type: Damageable
damageContainer: Box
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 30
behaviors:
- !type:PlaySoundBehavior
sound:
collection: WoodDestroyHeavy
- !type:SpawnEntitiesBehavior
spawn:
MaterialCardboard:
min: 1
max: 3
- !type:DoActsBehavior
acts: ["Destruction"]
# - type: Construction
# graph: ADTBoxMaintenance
# node: ADTBoxMaintenance

- type: entity
parent: ADTBoxMaintenance
id: ADTBoxMaintenanceRandom
suffix: Random
components:
- type: RandomSprite
available:
- box:
box_b1: ""
box_b2: ""
box_b3: ""
box_b4: ""
box_b5: ""
box_l1: ""
box_l1_2: ""
box_l1_3: ""
box_l2: ""
box_l3: ""
box_s1: ""
box_s2: ""
box_s3: ""
box_spec_smile: ""
box_spec_theyarewatching: ""
box_spec_xxxxxxxxxx: ""
box_spec1: ""
box_spec2: ""
box_spec3: ""
box_t1: ""
box_t2: ""
box_t3: ""
box_t4: ""
box_t5: ""
box2: ""
box3: ""
box4: ""
box5: ""
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- type: constructionGraph
id: ADTBoxMaintenance
start: start
graph:
- node: start
actions:
- !type:SpawnPrototype
prototype: MaterialCardboard1
amount: 3
- !type:DeleteEntity

- node: ADTBoxMaintenance
edges:
- to: start
steps:
- tool: Cutting
doAfter: 5
completed:
- !type:SpawnPrototype
prototype: MaterialCardboard1
amount: 3
- !type:DeleteEntity {}
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked

52 changes: 52 additions & 0 deletions Resources/Prototypes/ADT/audio.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Robotics

- type: ambientMusic
id: ADTRobotics
sound:
params:
volume: -12
collection: ADTAmbienceRobotics
rules: ADTNearRobotics
priority: 4

- type: rules
id: ADTNearRobotics
rules:
- !type:NearbyEntitiesRule
count: 1
whitelist:
tags:
- ADTRoboticsAmbience
range: 4

- type: soundCollection
id: ADTAmbienceRobotics
files:
- /Audio/ADT/Ambience/robotics_1.ogg
- /Audio/ADT/Ambience/robotics_2.ogg

# Vault

- type: ambientMusic
id: ADTVault
sound:
params:
volume: -12
collection: ADTAmbienceVault
rules: ADTNearVault
priority: 4

- type: rules
id: ADTNearVault
rules:
- !type:NearbyEntitiesRule
count: 1
whitelist:
tags:
- ADTVaultAmbience
range: 2

- type: soundCollection
id: ADTAmbienceVault
files:
- /Audio/ADT/Ambience/vault_1.ogg
6 changes: 6 additions & 0 deletions Resources/Prototypes/ADT/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,3 +159,9 @@

- type: Tag
id: ADTCandies

- type: Tag
id: ADTRoboticsAmbience

- type: Tag
id: ADTVaultAmbience
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@
- type: Tag
tags:
- DrinkGlass
# ADT-Sound-Update-Start
- type: EmitSoundOnPickup
sound:
path: /Audio/ADT/Entities/drinkglass_pickup.ogg
- type: EmitSoundOnDrop
sound:
path: /Audio/ADT/Entities/Objects/drinkglass_drop.ogg
# ADT-Sound-Update-End

# Transformable container - normal glass
- type: entity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@
- type: PhysicalComposition
materialComposition:
Glass: 100
# ADT-Sound-Update-Start
- type: EmitSoundOnPickup
sound:
path: /Audio/ADT/Entities/drinkglass_pickup.ogg
- type: EmitSoundOnDrop
sound:
path: /Audio/ADT/Entities/Objects/drinkglass_drop.ogg
# ADT-Sound-Update-End

- type: entity
id: DrinkBottleVisualsOpenable
Expand Down
5 changes: 5 additions & 0 deletions Resources/Prototypes/Entities/Structures/Machines/lathe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,11 @@
- type: GuideHelp
guides:
- Robotics
# ADT-Sound-Update-Start
- type: Tag
tags:
- ADTRoboticsAmbience
# ADT-Sound-Update-End

- type: entity
id: Biofabricator
Expand Down
5 changes: 5 additions & 0 deletions Resources/Prototypes/Entities/Structures/Machines/nuke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@
- type: WarpPoint
follow: true
location: nuclear bomb
# ADT-Sound-Update-Start
- type: Tag
tags:
- ADTVaultAmbience
# ADT-Sound-Update-End

- type: entity
parent: NuclearBomb
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@
- type: PortableGenerator
startSoundEmpty: { collection: GeneratorTugEmpty }
startSound: { collection: GeneratorTug }
# ADT-Sound-Update-Start
successSound:
path: /Audio/ADT/Machines/pacman_on.ogg
failureSound:
path: /Audio/ADT/Machines/pacman_off.ogg
# ADT-Sound-Update-End
- type: FuelGenerator
- type: PowerSupplier
supplyRate: 3000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@
sprite: Structures/Power/Generation/teg.rsi
layers:
- state: teg
- state: teg_mid
shader: unshaded
map: [ "enum.PowerDeviceVisualLayers.Powered" ]
# ADT-Sound-Update-Start
#- state: teg_mid ADT-Sound-Update
# shader: unshaded
# map: [ "enum.PowerDeviceVisualLayers.Powered" ]
# ADT-Sound-Update-End
- state: teg-op1
shader: unshaded
visible: false
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions Resources/Textures/ADT/Structures/Specific/boxes.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
"version": 1,
"copyright": "Made by unlumy:discord",
"license": "CC BY-NC-ND 4.0",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "box_b1"
},
{
"name": "box_b2"
},
{
"name": "box_b3"
},
{
"name": "box_b4"
},
{
"name": "box_b5"
},
{
"name": "box_l1"
},
{
"name": "box_l1_2"
},
{
"name": "box_l1_3"
},
{
"name": "box_l2"
},
{
"name": "box_l3"
},
{
"name": "box_s1"
},
{
"name": "box_s2"
},
{
"name": "box_s3"
},
{
"name": "box_spec_smile"
},
{
"name": "box_spec_theyarewatching"
},
{
"name": "box_spec_xxxxxxxxxx"
},
{
"name": "box_spec1"
},
{
"name": "box_spec2"
},
{
"name": "box_spec3"
},
{
"name": "box_t1"
},
{
"name": "box_t2"
},
{
"name": "box_t3"
},
{
"name": "box_t4"
},
{
"name": "box_t5"
},
{
"name": "box1"
},
{
"name": "box1_op"
},
{
"name": "box2"
},
{
"name": "box3"
},
{
"name": "box4"
},
{
"name": "box5"
}
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from ParadiseSS13/Paradise at https://github.com/ParadiseSS13/Paradise/blob/ebf9a7b5e89f5523c5e1c3d2692bf54dac322cae/icons/obj/chemical.dmi and rescaled by reapsnI, inhand sprites by lzk228(discord 455630609641897984), resprite by mureixlol",
"copyright": "Taken from ParadiseSS13/Paradise at https://github.com/ParadiseSS13/Paradise/blob/ebf9a7b5e89f5523c5e1c3d2692bf54dac322cae/icons/obj/chemical.dmi and rescaled by reapsnI, inhand sprites by lzk228(discord 455630609641897984), resprite by mureixlol, new sprites was taken from https://github.com/tgstation/tgstation/commit/11402f6ae62facc2e8bcfa1f8ef5353b26663278",
"size": {
"x": 32,
"y": 32
Expand Down
Loading

0 comments on commit 6148fdb

Please sign in to comment.