Skip to content

Commit

Permalink
работа со светом
Browse files Browse the repository at this point in the history
  • Loading branch information
AserCreator committed Dec 13, 2024
1 parent d9a5b6a commit 62f1bf8
Show file tree
Hide file tree
Showing 22 changed files with 81 additions and 74 deletions.
4 changes: 3 additions & 1 deletion Content.Shared/CombatMode/CombatModeComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public sealed partial class CombatModeComponent : Component
public SoundSpecifier DisarmSuccessSound = new SoundPathSpecifier("/Audio/Effects/thudswoosh.ogg");

[DataField("disarmFailChance")]
public float BaseDisarmFailChance = 0.75f;
public float BaseDisarmFailChance = 0.1f; // NES14-Changes, приколы с боевкой

#endregion

Expand All @@ -48,5 +48,7 @@ public sealed partial class CombatModeComponent : Component
/// </summary>
[DataField, AutoNetworkedField]
public bool ToggleMouseRotator = true;
[DataField, AutoNetworkedField]
public bool SmoothRotation = true; // NES14-Changes, фонарик на 360
}
}
9 changes: 7 additions & 2 deletions Content.Shared/CombatMode/SharedCombatModeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,14 @@ private void SetMouseRotatorComponents(EntityUid uid, bool value)
{
if (value)
{
EnsureComp<MouseRotatorComponent>(uid);
var rot = EnsureComp<MouseRotatorComponent>(uid); // NES14-Changes, фонарик на 360
if (TryComp<CombatModeComponent>(uid, out var comp) && comp.SmoothRotation) // no idea under which (intended) circumstances this can fail (if any), so i'll avoid Comp<>().
{
rot.AngleTolerance = Angle.FromDegrees(1); // arbitrary
rot.Simple4DirMode = false;
}
EnsureComp<NoRotateOnMoveComponent>(uid);
}
} // Конец
else
{
RemComp<MouseRotatorComponent>(uid);
Expand Down
2 changes: 1 addition & 1 deletion Content.Shared/Light/Components/HandheldLightComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public sealed partial class HandheldLightComponent : Component

[ViewVariables(VVAccess.ReadWrite)]
[DataField("wattage")]
public float Wattage { get; set; } = .2f; // NES14-Changes, жрите меньше энергии
public float Wattage { get; set; } = .4f; // NES14-Changes, жрите меньше энергии

[DataField("turnOnSound")]
public SoundSpecifier TurnOnSound = new SoundPathSpecifier("/Audio/Items/flashlight_on.ogg");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
enabled: false
radius: 3
energy: 1
mask: /Textures/Effects/LightMasks/cone.png
mask: /Textures/NES/Effects/LightMasks/cone.png #NES14-Changes
autoRot: true
netsync: false
- type: Appearance
Expand Down Expand Up @@ -198,7 +198,7 @@
enabled: false
radius: 3
energy: 2
mask: /Textures/Effects/LightMasks/cone.png
mask: /Textures/NES/Effects/LightMasks/cone.png #NES14-Changes
autoRot: true
netsync: false
- type: Appearance
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Clothing/Head/hardhats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
equippedPrefix: off
- type: PointLight
enabled: false
mask: /Textures/Effects/LightMasks/cone.png
mask: /Textures/NES/Effects/LightMasks/cone.png #NES14-Changes
autoRot: true
radius: 7
netsync: false
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Clothing/Head/helmets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@
energy: 1.4
color: red
netsync: false
mask: /Textures/Effects/LightMasks/double_cone.png
mask: /Textures/NES/Effects/LightMasks/double_cone.png #NES14-Changes
- type: RotatingLight
speed: 360
- type: PowerCellSlot
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Clothing/Head/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
enabled: false
radius: 3
energy: 1
mask: /Textures/Effects/LightMasks/cone.png
mask: /Textures/NES/Effects/LightMasks/cone.png #NES14-Changes
autoRot: true
color: "#cc6600"
netsync: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
color: "#80ff80"
radius: 5
energy: 2
mask: /Textures/Effects/LightMasks/cone.png
mask: /Textures/NES/Effects/LightMasks/cone.png #NES14-Changes
autoRot: true
netsync: false
- type: LightBehaviour
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
- type: ToggleableLightVisuals
- type: PointLight
enabled: false
mask: /Textures/Effects/LightMasks/cone.png
mask: /Textures/NES/Effects/LightMasks/cone.png #NES14-Changes
autoRot: true
radius: 4
netsync: false
Expand Down
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
enabled: false
radius: 3.5
softness: 2
mask: /Textures/Effects/LightMasks/cone.png
mask: /Textures/NES/Effects/LightMasks/cone.png #NES14-Changes
autoRot: true
- type: FootstepModifier
footstepSoundCollection:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
enabled: false
radius: 2.5
softness: 5
mask: /Textures/Effects/LightMasks/cone.png
mask: /Textures/NES/Effects/LightMasks/cone.png #NES14-Changes
autoRot: true
- type: Tag
tags:
Expand Down
46 changes: 23 additions & 23 deletions Resources/Prototypes/Entities/Objects/Power/lights.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@
- type: LightBulb
bulb: Bulb
color: "#EEEEFF"
lightEnergy: 1
lightRadius: 8
lightEnergy: 2
lightRadius: 6
lightSoftness: 1
BurningTemperature: 350 #LEDs are colder than incandescent bulbs
PowerUse: 6 #LEDs are more power efficient than incandescent bulbs
Expand All @@ -159,7 +159,7 @@
- type: LightBulb
bulb: Bulb
color: "#FFD1A3" # 4000K color temp
lightEnergy: 0.3 # old incandescents just arent as bright
lightEnergy: 2 # old incandescents just arent as bright
lightRadius: 6
lightSoftness: 1.1

Expand Down Expand Up @@ -200,7 +200,7 @@
- type: LightBulb
color: "#bac9d6" # NES14-Changes
lightEnergy: 0.6
lightRadius: 7
lightRadius: 6
lightSoftness: 1
PowerUse: 25

Expand All @@ -213,7 +213,7 @@
- type: LightBulb
color: "#FFDABB" # old fluorescents are yellower-4500K temp
lightEnergy: 0.5
lightRadius: 10
lightRadius: 6
lightSoftness: 1
PowerUse: 10

Expand All @@ -235,8 +235,8 @@
components:
- type: LightBulb
color: "#EEEEFF"
lightEnergy: 1
lightRadius: 15
lightEnergy: 2
lightRadius: 6
lightSoftness: 0.9
BurningTemperature: 350
PowerUse: 12
Expand All @@ -250,8 +250,8 @@
components:
- type: LightBulb
color: "#B4FCF0"
lightEnergy: 4.5
lightRadius: 12
lightEnergy: 2
lightRadius: 6
lightSoftness: 0.5
BurningTemperature: 350
PowerUse: 100
Expand All @@ -264,8 +264,8 @@
components:
- type: LightBulb
color: "#FFAF38"
lightEnergy: 4
lightRadius: 10
lightEnergy: 2
lightRadius: 6
lightSoftness: 0.5
BurningTemperature: 350
PowerUse: 100
Expand All @@ -278,8 +278,8 @@
components:
- type: LightBulb
color: "#47f8ff"
lightEnergy: 3
lightRadius: 8
lightEnergy: 2
lightRadius: 6
lightSoftness: 0.5
BurningTemperature: 350
PowerUse: 60
Expand All @@ -298,8 +298,8 @@
components:
- type: LightBulb
color: "#39a1ff"
lightEnergy: 3
lightRadius: 8
lightEnergy: 2
lightRadius: 6
lightSoftness: 0.5
BurningTemperature: 350
PowerUse: 60
Expand All @@ -318,8 +318,8 @@
components:
- type: LightBulb
color: "#ff66cc"
lightEnergy: 3
lightRadius: 8
lightEnergy: 2
lightRadius: 6
lightSoftness: 0.5
BurningTemperature: 350
PowerUse: 60
Expand All @@ -338,8 +338,8 @@
components:
- type: LightBulb
color: "#ff8227"
lightEnergy: 3
lightRadius: 8
lightEnergy: 2
lightRadius: 6
lightSoftness: 0.5
BurningTemperature: 350
PowerUse: 60
Expand All @@ -358,8 +358,8 @@
components:
- type: LightBulb
color: "#fb4747"
lightEnergy: 3
lightRadius: 8
lightEnergy: 2
lightRadius: 6
lightSoftness: 0.5
BurningTemperature: 350
PowerUse: 60
Expand All @@ -378,8 +378,8 @@
components:
- type: LightBulb
color: "#52ff39"
lightEnergy: 3
lightRadius: 8
lightEnergy: 2
lightRadius: 6
lightSoftness: 0.5
BurningTemperature: 350
PowerUse: 60
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
storedRotation: -90
- type: PointLight
enabled: false
mask: /Textures/NES/Effects/LightMasks/cone_smoll.png
mask: /Textures/NES/Effects/LightMasks/cone.png #NES14-Changes
autoRot: true
radius: 6
netsync: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
radius: 1.6
energy: 1.2
enabled: false
mask: /Textures/Effects/LightMasks/cone.png
mask: /Textures/NES/Effects/LightMasks/cone.png #NES14-Changes
autoRot: true
offset: "0, 0.6"
- type: Damageable
Expand Down
Loading

0 comments on commit 62f1bf8

Please sign in to comment.