Мне нужно в одном прототипе объединить свойства двух предметов. Магнитных ботинок и…
- User
Мне нужно в одном прототипе объединить свойства двух предметов. Магнитных ботинок и скороходов. Магнитки:
- type: entity
parent: [ClothingShoesBase, BaseToggleClothing]
id: ClothingShoesBootsMagBase
name: magboots
description: Magnetic boots, often used during extravehicular activity to ensure the user remains safely attached to the vehicle.
abstract: true
components:
- type: Sprite
sprite: Clothing/Shoes/Boots/magboots.rsi
layers:
- state: icon map: [ "enum.ToggleVisuals.Layer" ]
- type: Clothing sprite: Clothing/Shoes/Boots/magboots.rsi
- type: ToggleClothing action: ActionToggleMagboots
- type: ToggleVerb text: toggle-magboots-verb-get-data-text
- type: ComponentToggler
components:
- type: NoSlip
- type: Magboots
- type: ClothingSpeedModifier walkModifier: 0.85 sprintModifier: 0.8
- type: Appearance
- type: GenericVisualizer visuals: enum.ToggleVisuals.Toggled: enum.ToggleVisuals.Layer: True: {state: icon-on} False: {state: icon}
- type: StaticPrice price: 200
- type: Tag
tags:
- WhitelistChameleon
- type: Sprite
sprite: Clothing/Shoes/Boots/magboots.rsi
layers:
Кнопка их включения:
- type: entity
id: ActionToggleMagboots
name: Toggle Magboots
description: Toggles the magboots on and off.
components:
- type: InstantAction itemIconStyle: BigItem event: !type:ToggleActionEvent
Скороходы:
- type: entity
parent: [ClothingShoesBase, PowerCellSlotSmallItem, BaseToggleClothing]
id: ClothingShoesBootsSpeed
name: speed boots
description: High-tech boots woven with quantum fibers, able to convert electricity into pure speed!
components:
- type: Sprite
sprite: Clothing/Shoes/Boots/speedboots.rsi
layers:
- state: icon map: [ "enum.ToggleVisuals.Layer" ]
- type: Clothing sprite: Clothing/Shoes/Boots/speedboots.rsi
- type: ToggleClothing action: ActionToggleSpeedBoots
- type: ClothingSpeedModifier walkModifier: 1.5 sprintModifier: 1.5
- type: Appearance
- type: GenericVisualizer visuals: enum.ToggleVisuals.Toggled: enum.ToggleVisuals.Layer: True: {state: icon-on} False: {state: icon}
- type: StaticPrice price: 500
- type: PowerCellDraw drawRate: 4
- type: ToggleCellDraw
- type: ItemSlots slots: cell_slot: name: power-cell-slot-component-slot-name-default
- type: Tag tags: []
- type: Sprite
sprite: Clothing/Shoes/Boots/speedboots.rsi
layers:
Кнопка их включения:
- type: entity id: ActionToggleSpeedBoots name: Toggle Speed Boots description: Toggles the speed boots on and off. components:
- type: entity
parent: [ClothingShoesBase, BaseToggleClothing]
id: ClothingShoesBootsMagBase
name: magboots
description: Magnetic boots, often used during extravehicular activity to ensure the user remains safely attached to the vehicle.
abstract: true
components:
- Assistant
- User
Вот так?
- type: entity
parent: ClothingShoesBootsSpeed [ClothingShoesBase, PowerCellSlotSmallItem, BaseToggleClothing]
id: ClothingShoesBootsMagDragonFoxMadParadox
name: магнитные ботинки KUMA
description: Инновационные ботинки, которые повышают скорость и комфорт передвижения.
components:
- type: Sprite
sprite: DeadSpace/Sponsor/DragonFox/MadParadox/bootsmadparadox.rsi
layers:
- state: icon map: [ "enum.ToggleVisuals.Layer" ]
- type: Clothing sprite: DeadSpace/Sponsor/DragonFox/MadParadox/magboots.rsi
- type: ToggleClothing action: ActionToggleMagSpeedBoots
- type: ToggleVerb text: toggle-magspeed-boots-verb-get-data-text
- type: ComponentToggler
components:
- type: NoSlip
- type: Magboots
- type: ClothingSpeedModifier walkModifier: 1.5 sprintModifier: 1.5
- type: PowerCellDraw drawRate: 4
- type: ToggleCellDraw
- type: ItemSlots slots: cell_slot: name: power-cell-slot-component-slot-name-default
- type: Appearance
- type: GenericVisualizer visuals: enum.ToggleVisuals.Toggled: enum.ToggleVisuals.Layer: True: {state: icon-on} False: {state: icon}
- type: Sprite
sprite: DeadSpace/Sponsor/DragonFox/MadParadox/bootsmadparadox.rsi
layers:
- type: entity
parent: ClothingShoesBootsSpeed [ClothingShoesBase, PowerCellSlotSmallItem, BaseToggleClothing]
id: ClothingShoesBootsMagDragonFoxMadParadox
name: магнитные ботинки KUMA
description: Инновационные ботинки, которые повышают скорость и комфорт передвижения.
components:
- Assistant
Да, ваш прототип выглядит почти правильно, однако небольшие корректировки могут улучшить его структуру и синтаксис. Как только вы добавляете
parent, он должен идти без специального операторного обозначения перед ним. В вашем случае, исправление должно выглядеть так:yaml