Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PORT] disco floor #582

Merged
merged 4 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ent-DiscoFloor = диско пол
.desc = Время зажигать!
Comment on lines +1 to +2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Исправьте написание "диско пол" на "диско-пол"

Составные существительные в русском языке должны писаться через дефис. Предлагаю следующее исправление:

-ent-DiscoFloor = диско пол
+ent-DiscoFloor = диско-пол
     .desc = Время зажигать!
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
ent-DiscoFloor = диско пол
.desc = Время зажигать!
ent-DiscoFloor = диско-пол
.desc = Время зажигать!

Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
- type: entity
id: DiscoFloor
name: disco floor
description: ♫ It's time to boogy! ♫
placement:
mode: SnapgridCenter
components:
- type: Sprite
sprite: _SpaceCats/Structures/Floor/disco_floor.rsi
drawdepth: FloorTiles
layers:
- state: off
- state: powered
shader: unshaded
map: ["enum.PowerDeviceVisualLayers.Powered"]
Comment on lines +8 to +15
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Обнаружена проблема со спрайтами диско-пола

Файл спрайта не найден по указанному пути. Возможно, он был перемещен или не был добавлен в репозиторий. Необходимо:

  • Убедиться, что файл _SpaceCats/Structures/Floor/disco_floor.rsi и его содержимое (meta.json, off.png, powered.png) корректно добавлены в репозиторий
  • Проверить правильность пути к спрайту в конфигурации
🔗 Analysis chain

Проверьте наличие файла спрайта

Необходимо убедиться, что файл спрайта _SpaceCats/Structures/Floor/disco_floor.rsi существует и содержит все необходимые состояния (off и powered).


Let me verify the contents of the meta.json file to ensure the states are properly defined.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the RSI file and states exist
fd -e rsi -x ls -la {} \; -p "_SpaceCats/Structures/Floor/disco_floor.rsi"

Length of output: 366


Script:

#!/bin/bash
# Check the contents of meta.json to verify states
cat Resources/Prototypes/_SpaceCats/Structures/Floor/disco_floor.rsi/meta.json

Length of output: 187

- type: GenericVisualizer
visuals:
enum.PowerDeviceVisuals.Powered:
enum.PowerDeviceVisualLayers.Powered:
True: {visible: true}
False: {visible: false}
- type: PowerSwitch
- type: Physics
bodyType: Static
canCollide: false
- type: Clickable
- type: Fixtures
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 300
behaviors:
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 2
ShardGlass:
min: 2
max: 4
LightTubeBroken:
min: 2
max: 3
- !type:DoActsBehavior
acts: [ "Destruction" ]
Comment on lines +28 to +49
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Исправьте некорректное имя сущности в конфигурации урона

В списке спавна при разрушении указана несуществующая сущность SheetSteel1. Необходимо использовать корректное имя SheetSteel.

Примените следующие изменения:

  spawn:
-   SheetSteel1:
+   SheetSteel:
      min: 1
      max: 2
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 300
behaviors:
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 2
ShardGlass:
min: 2
max: 4
LightTubeBroken:
min: 2
max: 3
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 300
behaviors:
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel:
min: 1
max: 2
ShardGlass:
min: 2
max: 4
LightTubeBroken:
min: 2
max: 3
- !type:DoActsBehavior
acts: [ "Destruction" ]

- type: PointLight
enabled: false
- type: ApcPowerReceiver
- type: ExtensionCableReceiver
- type: DeviceNetwork
deviceNetId: Wireless
receiveFrequencyId: SmartLight
- type: WirelessNetworkConnection
range: 200
- type: DeviceLinkSink
ports:
- On
- Off
- Toggle
- type: Construction
graph: DiscoFloor
node: discoFloor
- type: Appearance
- type: PoweredLightVisuals
blinkingSound:
path: "/Audio/Machines/light_tube_on.ogg"
- type: Transform
anchored: true
- type: Tag
tags:
- Catwalk
- type: FootstepModifier
footstepSoundCollection:
collection: FootstepWood
params:
volume: 3
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
- type: constructionGraph
id: DiscoFloor
start: start
graph:
- node: start
actions:
- !type:DestroyEntity {}
edges:
- to: discoSquare
steps:
- material: Steel
amount: 4
doAfter: 1
- material: Glass
amount: 4
doAfter: 1
- material: Cable
amount: 5
doAfter: 1

- node: discoSquare
entity: DiscoFloor
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
- type: construction
name: disco floor
id: DiscoFloor
graph: DiscoFloor
startNode: start
targetNode: discoSquare
category: construction-category-tiles
description: Construct multi-colored flooring to light up the dance floor.
icon:
sprite: ADT/Structures/Floor/disco_floor.rsi
state: off
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Taken from https://github.com/tgstation/tgstation/tree/f116442e34fe3e941a1df474bb57bb410dd177a3/icons/turf and modified by ps3moira",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "off"
},
{
"name": "powered",
"delays": [
[
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4,
0.4
]
]
}
]
}
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