-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Оптимизация и обновление ночного виденья (#431)
* optimize night vision shader * upd * nvd restyle * upd * я не знаю почему эта хуйня не работает, я уже здался * fix * upd * fix
- Loading branch information
Showing
26 changed files
with
201 additions
and
35 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,23 @@ | ||
using Content.Shared._Sunrise.Eye.NightVision.Components; | ||
using Content.Shared._Sunrise.Eye.NightVision.Systems; | ||
using Robust.Client.GameObjects; | ||
|
||
namespace Content.Client._Sunrise.Eye.NightVision; | ||
|
||
public sealed class NVGSystem : EntitySystem | ||
{ | ||
public override void Initialize() | ||
{ | ||
base.Initialize(); | ||
|
||
SubscribeLocalEvent<NVGComponent, AfterNVGUpdateVisualsEvent>(OnAfterNVGUpdateVisualsEvent); | ||
} | ||
|
||
private void OnAfterNVGUpdateVisualsEvent(EntityUid uid, NVGComponent component, AfterNVGUpdateVisualsEvent args) | ||
{ | ||
var nvcomp = args.nvcomp; | ||
|
||
if (TryComp<SpriteComponent>(component.Owner, out var sprite)) | ||
sprite.LayerSetVisible(NVGVisuals.Light, nvcomp.IsNightVision); | ||
} | ||
} |
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
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
Binary file not shown.
Binary file not shown.
Binary file removed
BIN
-15.1 KB
Resources/Audio/_Sunrise/Misc/night-vision-sound-effect_E_minor.ogg
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
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 |
---|---|---|
|
@@ -93,7 +93,6 @@ | |
- type: NightVision | ||
isToggle: true | ||
color: "#808080" | ||
playSoundOn: false | ||
# Sunrise-End | ||
|
||
- type: entity | ||
|
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
33 changes: 26 additions & 7 deletions
33
Resources/Prototypes/_Sunrise/Entities/Clothing/Eyes/nvg.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 |
---|---|---|
@@ -1,24 +1,43 @@ | ||
- type: entity | ||
name: NVD | ||
id: ClothingEyesVision | ||
id: ClothingEyesNVD | ||
parent: BaseItem | ||
description: Night vision device. Provides an image of the terrain in low-light conditions. | ||
components: | ||
- type: Item | ||
- type: Sprite | ||
sprite: Clothing/Eyes/Glasses/ninjavisor.rsi | ||
state: icon | ||
sprite: _Sunrise/Clothing/Eyes/Glasses/nvg.rsi | ||
layers: | ||
- state: icon | ||
- state: icon-unshaded | ||
shader: unshaded | ||
- state: light-overlay | ||
visible: false | ||
shader: unshaded | ||
map: [ "enum.NVGVisuals.Light" ] | ||
- type: Clothing | ||
sprite: Clothing/Eyes/Glasses/ninjavisor.rsi | ||
sprite: _Sunrise/Clothing/Eyes/Glasses/nvg.rsi | ||
quickEquip: true | ||
clothingVisuals: | ||
eyes: | ||
- state: off-equipped-EYES | ||
- state: equipped-EYES-unshaded | ||
shader: unshaded | ||
slots: [ Eyes ] | ||
- type: UseDelay | ||
delay: 4 | ||
- type: NVG | ||
- type: PointLight | ||
color: green | ||
enabled: false | ||
autoRot: true | ||
radius: 0.5 | ||
energy: 0.5 | ||
- type: Appearance | ||
|
||
- type: entity | ||
parent: [ClothingEyesVision,ShowSecurityIcons] | ||
id: ClothingEyesVisionNuki | ||
suffix: nuke | ||
parent: [ClothingEyesNVD,ShowSecurityIcons] | ||
id: ClothingEyesNVDSyndicate | ||
suffix: syndicate | ||
components: | ||
- type: ShowSyndicateIcons |
Binary file added
BIN
+432 Bytes
...rces/Textures/_Sunrise/Clothing/Eyes/Glasses/nvg.rsi/equipped-EYES-unshaded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.68 KB
Resources/Textures/_Sunrise/Clothing/Eyes/Glasses/nvg.rsi/icon-flash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+215 Bytes
Resources/Textures/_Sunrise/Clothing/Eyes/Glasses/nvg.rsi/icon-unshaded.png
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.
Binary file added
BIN
+377 Bytes
Resources/Textures/_Sunrise/Clothing/Eyes/Glasses/nvg.rsi/inhand-left-unshaded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+588 Bytes
Resources/Textures/_Sunrise/Clothing/Eyes/Glasses/nvg.rsi/inhand-left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+396 Bytes
...urces/Textures/_Sunrise/Clothing/Eyes/Glasses/nvg.rsi/inhand-right-unshaded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+670 Bytes
Resources/Textures/_Sunrise/Clothing/Eyes/Glasses/nvg.rsi/inhand-right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.33 KB
Resources/Textures/_Sunrise/Clothing/Eyes/Glasses/nvg.rsi/light-overlay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.