Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
15 changes: 10 additions & 5 deletions Content.Server/_Wega/Implants/BatteryDrainerImplantSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
using Content.Server.Power.EntitySystems;
using Content.Shared._Wega.Implants.Components;
using Content.Shared.Power.Components;
using Content.Shared.Power.EntitySystems;
using Content.Shared.PowerCell;
using Robust.Server.Audio;
using System.Diagnostics;

namespace Content.Server._Wega.Implants;

public sealed class BatteryDrainerImplantSystem : EntitySystem
{
[Dependency] private readonly HandsSystem _hands = default!;
[Dependency] private readonly BatterySystem _battery = default!;
[Dependency] private readonly PredictedBatterySystem _battery = default!;
[Dependency] private readonly PowerCellSystem _powerCell = default!;
[Dependency] private readonly ActionsSystem _actions = default!;
[Dependency] private readonly AudioSystem _audio = default!;
Expand Down Expand Up @@ -70,7 +72,7 @@ private void OnDischargeAction(EntityUid uid, BatteryDrainerImplantComponent com
EntityUid? battery = null;
foreach (var entity in _hands.EnumerateHeld(uid))
{
if (HasComp<BatteryComponent>(entity))
if (HasComp<PredictedBatteryComponent>(entity))
{
battery = entity;
break;
Expand All @@ -90,7 +92,7 @@ private void OnDischargeAction(EntityUid uid, BatteryDrainerImplantComponent com
{
if (!_powerCell.TryGetBatteryFromSlot(uid, out var battery))
{
if (HasComp<BatteryComponent>(uid))
if (HasComp<PredictedBatteryComponent>(uid))
return uid;
}
else
Expand All @@ -107,10 +109,13 @@ private void TransferCharge(BatteryDrainerImplantComponent component, EntityUid
if (sourceUid == null || targetUid == null)
return;

if (!TryComp<BatteryComponent>(sourceUid, out var sourceBattery) || !TryComp<BatteryComponent>(targetUid, out var targetBattery))
Log.Info(_battery.GetCharge(sourceUid.Value).ToString() + "Мя");
Log.Info(targetUid.Value.ToString() + "UwU");

if (!HasComp<PredictedBatteryComponent>(sourceUid) || !TryComp<PredictedBatteryComponent>(targetUid, out var targetBattery))
return;

float transfer = Math.Clamp(targetBattery.MaxCharge - targetBattery.CurrentCharge, 0f, sourceBattery.CurrentCharge);
float transfer = Math.Clamp(targetBattery.MaxCharge - _battery.GetCharge(targetUid.Value), 0f, _battery.GetCharge(sourceUid.Value));
if (transfer == 0f)
{
_popup.PopupEntity(Loc.GetString("implant-battery-drainer-no-transfer"), user, user);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Content.Shared.Electrocution;
using Content.Shared.Electrocution;
using Content.Shared.StatusEffect;
using Robust.Shared.Prototypes;

Expand Down Expand Up @@ -34,7 +34,7 @@ public sealed partial class Electrocute : EntityEffectBase<Electrocute>
/// <summary>
/// Shock damage we apply to the entity.
/// </summary>
[DataField] public int ShockDamage = 5;
[DataField] public float ShockDamage = 5; // Corvax-Wega-Edit

/// <summary>
/// Do we refresh the duration? Or add more duration if it already exists.
Expand Down
16 changes: 14 additions & 2 deletions Resources/Locale/ru-RU/_wega/markings/android.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@
marking-AndroidAntennaLeft = Андроид, антенна (Левая)
marking-AndroidAntennaRight = Андроид, антенна (Правая)
marking-AndroidAntennaCrown = Андроид, антенны (Корона)
marking-AndroidEyesVisor = Андроид, визор
marking-AndroidHeadBulbs = Андроид, радиолампы
marking-AndroidEyesVisor = Андроид, глаза (Визор)
marking-AndroidEyesVisor-eyes_visor_led = Светодиоды
marking-AndroidIpcHead = Андроид, голова (ЭЛТ монитор)
marking-AndroidOldHead = Андроид, голова (Страх детства)
marking-AndroidScreenHead = Андроид, голова (Экран)
marking-AndroidAnimatronicHead = Андроид, голова (Аниматроник)
marking-AndroidTempleLed = Андроид, светодиод (Висок)
# Торс
marking-AndroidTorsoFemaleStandart = Андроид, торс (Стандарт)
marking-AndroidTorsoFemaleBreast = Андроид, торс (Средняя грудь)
marking-AndroidTorsoFemaleBigBreast = Андроид, торс (Большая грудь)
marking-AndroidTorsoFemaleNoBreast = Андроид, торс (Без груди)
marking-AndroidTorsoMale = Андроид, торс
marking-AndroidTorsoSpine = Андроид, торс (Усиленный позвоночник)
# Светодиоды
marking-AndroidLeds = Андроид, светодиоды (Стандарт)
marking-AndroidLedsLove = Андроид, светодиоды (Акцент)
Expand All @@ -18,4 +25,9 @@ marking-AndroidLedsStripes = Андроид, светодиоды (Полосы)
marking-AndroidCatEars = Андроид, кошачьи ушки
marking-AndroidCatEars-ears_cat_led = Светодиоды
marking-AndroidCatTail = Андроид, кошачий хвост
marking-AndroidCatEars-cat_tail_led = Светодиоды
marking-AndroidCatEars-cat_tail_led = Светодиоды
# Конечности
marking-AndroidScrapArmLeft = Андроид, левая рука (Самоделкин)
marking-AndroidScrapArmRight = Андроид, правая рука (Самоделкин)
marking-AndroidScrapLegLeft = Андроид, левая нога (Самоделкин)
marking-AndroidScrapLegRight = Андроид, правая нога (Самоделкин)
2 changes: 1 addition & 1 deletion Resources/Locale/ru-RU/power/components/charger.ftl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
charger-examine = Заряжает [color={ $color }]{ $chargeRate }Вт[/color] в секунду.
charger-component-charge-rate = Скорость зарядки
charger-content = Текущий заряд: [color=#5E7C16]{ $chargePercentage }[/color]%.
charger-content = Текущий заряд: [color=#5E7C16]{$chargePercent}[/color]%.
charger-empty = В зарядном устройстве ничего нет.
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
- type: Tag
tags:
- CannotSuicide
- Brain # Corvax-Wega-Android
- BrainSynthetic # Corvax-Wega-Android
- type: GenericVisualizer
visuals:
enum.ToggleableGhostRoleVisuals.Status:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@
- sprite: _Wega/Mobs/Customization/android.rsi
state: head_antenna_crown

- type: marking
id: AndroidHeadBulbs
bodyPart: HeadTop
markingCategory: HeadTop
speciesRestriction: [ Android ]
coloring:
default:
type:
!type:CategoryColoring
category: Special
sprites:
- sprite: _Wega/Mobs/Customization/android.rsi
state: head_bulbs

- type: marking
id: AndroidTorsoFemaleStandart
bodyPart: Chest
Expand Down Expand Up @@ -115,6 +129,30 @@
- sprite: _Wega/Mobs/Customization/android.rsi
state: body_m

- type: marking
id: AndroidTorsoSpine
bodyPart: Special
markingCategory: Chest
speciesRestriction: [ Android ]
sexRestriction: [ Female ]
sponsorOnly: false
coloring:
layers:
body_spine:
type:
!type:SimpleColoring
color: "#ffffff"
body_spine_led:
type:
!type:CategoryColoring
category: Special

sprites:
- sprite: _Wega/Mobs/Customization/android.rsi
state: body_spine
- sprite: _Wega/Mobs/Customization/android.rsi
state: body_spine_led

- type: marking
id: AndroidLeds
bodyPart: Special
Expand Down Expand Up @@ -160,6 +198,21 @@
- sprite: _Wega/Mobs/Customization/android.rsi
state: leds_stripes

- type: marking
id: AndroidTempleLed
bodyPart: HeadTop
markingCategory: Head
speciesRestriction: [ Android ]
sponsorOnly: false
coloring:
default:
type:
!type:CategoryColoring
category: Special
sprites:
- sprite: _Wega/Mobs/Customization/android.rsi
state: temple_led

- type: marking
id: AndroidCatEars
bodyPart: HeadTop
Expand Down Expand Up @@ -222,4 +275,160 @@
- sprite: _Wega/Mobs/Customization/android.rsi
state: eyes_visor
- sprite: _Wega/Mobs/Customization/android.rsi
state: eyes_visor_led
state: eyes_visor_led

- type: marking
id: AndroidScrapArmLeft
bodyPart: Special
markingCategory: Arms
speciesRestriction: [ Android ]
sponsorOnly: false
coloring:
default:
type:
!type:SimpleColoring
color: "#ffffff"
sprites:
- sprite: _Wega/Mobs/Customization/android.rsi
state: l_arm_scrap

- type: marking
id: AndroidScrapArmRight
bodyPart: Special
markingCategory: Arms
speciesRestriction: [ Android ]
sponsorOnly: false
coloring:
default:
type:
!type:SimpleColoring
color: "#ffffff"
sprites:
- sprite: _Wega/Mobs/Customization/android.rsi
state: r_arm_scrap

- type: marking
id: AndroidScrapLegLeft
bodyPart: Special
markingCategory: Legs
speciesRestriction: [ Android ]
sponsorOnly: false
coloring:
default:
type:
!type:SimpleColoring
color: "#ffffff"
sprites:
- sprite: _Wega/Mobs/Customization/android.rsi
state: l_leg_scrap

- type: marking
id: AndroidScrapLegRight
bodyPart: Special
markingCategory: Legs
speciesRestriction: [ Android ]
sponsorOnly: false
coloring:
default:
type:
!type:SimpleColoring
color: "#ffffff"
sprites:
- sprite: _Wega/Mobs/Customization/android.rsi
state: r_leg_scrap

- type: marking
id: AndroidOldHead
bodyPart: HeadTop
markingCategory: Head
speciesRestriction: [ Android ]
sponsorOnly: false
coloring:
layers:
old_base:
type:
!type:SkinColoring
old_lit:
type:
!type:EyeColoring
old_uncolor:
type:
!type:SimpleColoring
color: "#ffffff"
sprites:
- sprite: _Wega/Mobs/Customization/android_heads.rsi
state: old_base
- sprite: _Wega/Mobs/Customization/android_heads.rsi
state: old_uncolor
- sprite: _Wega/Mobs/Customization/android_heads.rsi
state: old_lit

- type: marking
id: AndroidIpcHead
bodyPart: HeadTop
markingCategory: Head
speciesRestriction: [ Android ]
sponsorOnly: false
coloring:
layers:
ipc_base:
type:
!type:SkinColoring
ipc_lit:
type:
!type:CategoryColoring
category: Special
ipc_uncolor:
type:
!type:SimpleColoring
color: "#ffffff"
sprites:
- sprite: _Wega/Mobs/Customization/android_heads.rsi
state: ipc_base
- sprite: _Wega/Mobs/Customization/android_heads.rsi
state: ipc_uncolor
- sprite: _Wega/Mobs/Customization/android_heads.rsi
state: ipc_lit

- type: marking
id: AndroidScreenHead
bodyPart: Eyes
markingCategory: Head
speciesRestriction: [ Android ]
sponsorOnly: false
coloring:
layers:
screen_base:
type:
!type:SkinColoring
screen_lit:
type:
!type:CategoryColoring
category: Special
screen_uncolor:
type:
!type:SimpleColoring
color: "#ffffff"
sprites:
- sprite: _Wega/Mobs/Customization/android_heads.rsi
state: screen_base
- sprite: _Wega/Mobs/Customization/android_heads.rsi
state: screen_uncolor
- sprite: _Wega/Mobs/Customization/android_heads.rsi
state: screen_lit

- type: marking
id: AndroidAnimatronicHead
bodyPart: Head
markingCategory: Head
speciesRestriction: [ Android ]
sponsorOnly: false
coloring:
default:
type:
!type:SimpleColoring
color: "#ffffff"
sprites:
- sprite: _Wega/Mobs/Customization/android_heads.rsi
state: animatronic

Loading
Loading