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

Новогодние штучки #364

Merged
merged 3 commits into from
Dec 27, 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,12 @@
ent-LPPNewYearSocksRed = socks
.desc = hanging socks on the wall, like you should put gifts there...
ent-LPPNewYearSocksGreen = socks
.desc = hanging socks on the wall, like you should put gifts there...
ent-LPPNewYearSocksOrange = socks
.desc = hanging socks on the wall, like you should put gifts there...
ent-LPPNewYearBell = new year bell
.desc = New Year's bell with a wreath, festive mood..
ent-LPPCandyNewYear = candy
.desc = A New Year's candy that feels like the end of the past.
ent-LPPLightbulbsNewYear = light bulbs
.desc = Hanging garland, not the best source of light
Comment on lines +1 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Необходимо скорректировать регистр согласно требованиям к переводам, начинающимся с ent-.

Согласно вашим руководствам, все переводы, ключ которых начинается с ent-, должны идти с заглавной буквы после знака «=», включая описание .desc. Например:

-ent-LPPNewYearSocksRed = socks
-    .desc = hanging socks on the wall, like you should put gifts there...
+ent-LPPNewYearSocksRed = Socks
+    .desc = Hanging socks on the wall, like you should put gifts there...

Аналогично нужно применить к остальным строкам (стр. 1-12).

Committable suggestion skipped: line range outside the PR's diff.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ent-LPPNewYearSocksRed = носок
.desc = Новогодний носок, как будто туда надо класть подарки...
ent-LPPNewYearSocksGreen = носок
.desc = Новогодний носок, как будто туда надо класть подарки...
ent-LPPNewYearSocksOrange = носок
.desc = Новогодний носок, как будто туда надо класть подарки...
ent-LPPNewYearBell = new year bell
.desc = Новогодний колокольчик с венком, праздничное настроение..
ent-LPPCandyNewYear = конфетка
.desc = Новогодняя конфета, которая напоминает о конце прошлого.
ent-LPPLightbulbsNewYear = гирлянда
.desc = Новогодняя гирлянда озаряющая красками нового года.
Comment on lines +1 to +12
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Следует привести текст к заглавной букве после «=» для ключей, начинающихся с ent-.

По вашим гайдлайнам переводы вида ent-... должны быть с заглавной буквы. Также описания .desc должны начинаться с заглавной. Например:

-ent-LPPNewYearSocksRed = носок
-    .desc = Новогодний носок, как будто туда надо класть подарки...
+ent-LPPNewYearSocksRed = Носок
+    .desc = Новогодний носок, как будто туда надо класть подарки...

Committable suggestion skipped: line range outside the PR's diff.

10 changes: 9 additions & 1 deletion Resources/Prototypes/Entities/Objects/Decoration/present.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
- type: Sprite
sprite: Objects/Decoration/present.rsi
layers:
- state: present
- state: present
map: [ "enum.DamageStateVisualLayers.Base" ]
- type: RandomSprite
available:
- enum.DamageStateVisualLayers.Base:
red: ""
blue: ""
purple: ""
green: ""

- type: entity
id: Present
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
- type: RandomSprite
available:
- enum.DamageStateVisualLayers.Base:
candy_1: Material
candy_2: Material
candy_3: Material
candy_4: Material
candy_1: Material
candy_2: Material
candy_3: Material
candy_4: Material
- type: Item
size: Tiny
shape:
Expand All @@ -33,4 +33,4 @@
Quantity: 1
- type: Tag
tags:
- LPPCandy
- LPPCandy
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
parent: BaseSign
id: LPPPCheckboxes
name: checkboxes
description: Black and orange flags, it's got a halloween feel to it.
description: Black and orange flags, it's got a halloween feel to it.
components:
- type: Sprite
sprite: _LostParadise/Structures/Wallmounts/halloween.rsi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
- type: entity
parent: BaseSign
id: LPPNewYearSocksRed
name: socks
description: hanging socks on the wall, like you should put gifts there...
components:
- type: Sprite
sprite: _LostParadise/Structures/Wallmounts/christmassock.rsi
state: red
noRot: false

- type: entity
parent: BaseSign
id: LPPNewYearSocksGreen
name: socks
description: hanging socks on the wall, like you should put gifts there...
components:
- type: Sprite
sprite: _LostParadise/Structures/Wallmounts/christmassock.rsi
state: green
noRot: false

- type: entity
parent: BaseSign
id: LPPNewYearSocksOrange
name: socks
description: hanging socks on the wall, like you should put gifts there...
components:
- type: Sprite
sprite: _LostParadise/Structures/Wallmounts/christmassock.rsi
state: orange
noRot: false

Comment on lines +1 to +33
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Рекомендуется рефакторинг сущностей носков

Три сущности носков (Red, Green, Orange) содержат дублирующийся код.

Предлагаю создать базовый прототип для носков:

- type: entity
  parent: BaseSign
  id: LPPNewYearSocksBase
  abstract: true
  name: socks
  description: hanging socks on the wall, like you should put gifts there...
  components:
  - type: Sprite
    sprite: _LostParadise/Structures/Wallmounts/christmassock.rsi
    noRot: false

И затем использовать его как родителя:

- type: entity
  parent: LPPNewYearSocksBase
  id: LPPNewYearSocksRed
  components:
  - type: Sprite
    state: red

- type: entity
  parent: LPPNewYearSocksBase
  id: LPPNewYearSocksGreen
  components:
  - type: Sprite
    state: green

- type: entity
  parent: LPPNewYearSocksBase
  id: LPPNewYearSocksOrange
  components:
  - type: Sprite
    state: orange
🧰 Tools
🪛 yamllint (1.35.1)

[error] 7-7: wrong indentation: expected at least 3

(indentation)


[error] 18-18: wrong indentation: expected at least 3

(indentation)


[error] 29-29: wrong indentation: expected at least 3

(indentation)

- type: entity
parent: BaseSign
id: LPPNewYearBell
name: new year bell
description: New Year's bell with a wreath, festive mood..
components:
- type: Sprite
sprite: _LostParadise/Structures/Wallmounts/christmasbell.rsi
state: icon
noRot: false

- type: entity
name: candy
parent: FoodBase
id: LPPCandyNewYear
description: A New Year's candy that feels like the end of the past.
components:
- type: Sprite
sprite: _LostParadise/Objects/Consumable/candystick.rsi
state: icon
- type: Item
sprite: _LostParadise/Objects/Consumable/candystick.rsi
size: Tiny
shape:
- 0, 0, 0, 0
- type: SolutionContainerManager
solutions:
food:
maxVol: 5
reagents:
- ReagentId: Sugar
Quantity: 3
- ReagentId: Nutriment
Quantity: 1
- ReagentId: Theobromine
Quantity: 1
- type: Tag
tags:
- LPPCandy

- type: entity
parent: BaseSign
id: LPPLightbulbsNewYear
name: light bulbs
description: Hanging garland, not the best source of light
components:
- type: PointLight
radius: 2.0
energy: 2.5
color: "#D6001C"
- type: Sprite
sprite: _LostParadise/Structures/Wallmounts/christmaslights.rsi
state: icon
noRot: false
Comment on lines +1 to +87
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Исправьте отступы в файле

Статический анализатор yamllint обнаружил несколько проблем с отступами. Рекомендуется использовать консистентные отступы во всем файле.

Основные места для исправления:

  • Компоненты должны иметь отступ 4 пробела
  • Вложенные свойства должны иметь дополнительный отступ 2 пробела
  • Массивы должны иметь отступ на уровень больше родительского элемента
🧰 Tools
🪛 yamllint (1.35.1)

[error] 7-7: wrong indentation: expected at least 3

(indentation)


[error] 18-18: wrong indentation: expected at least 3

(indentation)


[error] 29-29: wrong indentation: expected at least 3

(indentation)


[error] 40-40: wrong indentation: expected at least 3

(indentation)


[error] 51-51: wrong indentation: expected at least 3

(indentation)


[error] 58-58: wrong indentation: expected at least 5

(indentation)


[error] 64-64: wrong indentation: expected 10 but found 8

(indentation)


[error] 80-80: wrong indentation: expected 4 but found 2

(indentation)

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.
14 changes: 13 additions & 1 deletion Resources/Textures/Objects/Decoration/present.rsi/meta.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Made with love by Shaeone",
"copyright": "Made with love by Shaeone, (blue, purple, green) by angensnofori",
"size": {
"x": 32,
"y": 32
Expand All @@ -12,6 +12,18 @@
},
{
"name": "unwrapped"
},
{
"name": "red"
},
{
"name": "blue"
},
{
"name": "purple"
},
{
"name": "green"
}
]
}
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.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "waweewa221",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
},
{
"name": "inhand-left",
"directions": 4
},
{
"name": "inhand-right",
"directions": 4
}
]
Comment on lines +9 to +21
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Структура файла корректна

Правильно определены состояния для иконки и спрайтов в руках с 4 направлениями. Если в будущем планируется добавить анимацию (например, мерцание), можно будет добавить свойство delays.

  "states": [
    {
      "name": "icon"
+     "delays": [[1.0]]
    },
    {
      "name": "inhand-left",
      "directions": 4
+     "delays": [[1.0], [1.0], [1.0], [1.0]]
    },
    {
      "name": "inhand-right",
      "directions": 4
+     "delays": [[1.0], [1.0], [1.0], [1.0]]
    }
  ]

Committable suggestion skipped: line range outside the PR's diff.

}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "tvoysladkii",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "waweewa221",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
}
]
}

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "tvoysladkii",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "red"
},
{
"name": "orange"
},
{
"name": "green"
}
]
Comment on lines +9 to +19
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Рекомендуется добавить дополнительные свойства состояний

Текущие определения состояний содержат только имена. Рассмотрите возможность добавления следующих свойств для улучшения функциональности:

  • directions: для поддержки разных направлений размещения
  • delays: если планируется анимация
  "states": [
    {
      "name": "red"
+     "directions": 1,
+     "delays": [[1.0]]
    },
    {
      "name": "orange"
+     "directions": 1,
+     "delays": [[1.0]]
    },
    {
      "name": "green"
+     "directions": 1,
+     "delays": [[1.0]]
    }
  ]
📝 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
"states": [
{
"name": "red"
},
{
"name": "orange"
},
{
"name": "green"
}
]
"states": [
{
"name": "red",
"directions": 1,
"delays": [[1.0]]
},
{
"name": "orange",
"directions": 1,
"delays": [[1.0]]
},
{
"name": "green",
"directions": 1,
"delays": [[1.0]]
}
]

}
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