Skip to content

Commit 883362a

Browse files
Кастомизация андроидов (#300)
* Новая кастомизация и исправления * Дебаф стана от воды * Последний штрих * Update comment formatting for ShockDamage field --------- Co-authored-by: Zekins <136648667+Zekins3366@users.noreply.github.com>
1 parent 4500eca commit 883362a

File tree

29 files changed

+358
-21
lines changed

29 files changed

+358
-21
lines changed

Content.Server/_Wega/Implants/BatteryDrainerImplantSystem.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
using Content.Server.Power.EntitySystems;
55
using Content.Shared._Wega.Implants.Components;
66
using Content.Shared.Power.Components;
7+
using Content.Shared.Power.EntitySystems;
78
using Content.Shared.PowerCell;
89
using Robust.Server.Audio;
10+
using System.Diagnostics;
911

1012
namespace Content.Server._Wega.Implants;
1113

1214
public sealed class BatteryDrainerImplantSystem : EntitySystem
1315
{
1416
[Dependency] private readonly HandsSystem _hands = default!;
15-
[Dependency] private readonly BatterySystem _battery = default!;
17+
[Dependency] private readonly PredictedBatterySystem _battery = default!;
1618
[Dependency] private readonly PowerCellSystem _powerCell = default!;
1719
[Dependency] private readonly ActionsSystem _actions = default!;
1820
[Dependency] private readonly AudioSystem _audio = default!;
@@ -70,7 +72,7 @@ private void OnDischargeAction(EntityUid uid, BatteryDrainerImplantComponent com
7072
EntityUid? battery = null;
7173
foreach (var entity in _hands.EnumerateHeld(uid))
7274
{
73-
if (HasComp<BatteryComponent>(entity))
75+
if (HasComp<PredictedBatteryComponent>(entity))
7476
{
7577
battery = entity;
7678
break;
@@ -90,7 +92,7 @@ private void OnDischargeAction(EntityUid uid, BatteryDrainerImplantComponent com
9092
{
9193
if (!_powerCell.TryGetBatteryFromSlot(uid, out var battery))
9294
{
93-
if (HasComp<BatteryComponent>(uid))
95+
if (HasComp<PredictedBatteryComponent>(uid))
9496
return uid;
9597
}
9698
else
@@ -107,10 +109,13 @@ private void TransferCharge(BatteryDrainerImplantComponent component, EntityUid
107109
if (sourceUid == null || targetUid == null)
108110
return;
109111

110-
if (!TryComp<BatteryComponent>(sourceUid, out var sourceBattery) || !TryComp<BatteryComponent>(targetUid, out var targetBattery))
112+
Log.Info(_battery.GetCharge(sourceUid.Value).ToString() + "Мя");
113+
Log.Info(targetUid.Value.ToString() + "UwU");
114+
115+
if (!HasComp<PredictedBatteryComponent>(sourceUid) || !TryComp<PredictedBatteryComponent>(targetUid, out var targetBattery))
111116
return;
112117

113-
float transfer = Math.Clamp(targetBattery.MaxCharge - targetBattery.CurrentCharge, 0f, sourceBattery.CurrentCharge);
118+
float transfer = Math.Clamp(targetBattery.MaxCharge - _battery.GetCharge(targetUid.Value), 0f, _battery.GetCharge(sourceUid.Value));
114119
if (transfer == 0f)
115120
{
116121
_popup.PopupEntity(Loc.GetString("implant-battery-drainer-no-transfer"), user, user);

Content.Shared/EntityEffects/Effects/StatusEffects/ElectrocuteEntityEffectSystem.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using Content.Shared.Electrocution;
1+
using Content.Shared.Electrocution;
22
using Content.Shared.StatusEffect;
33
using Robust.Shared.Prototypes;
44

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

3939
/// <summary>
4040
/// Do we refresh the duration? Or add more duration if it already exists.

Resources/Locale/ru-RU/_wega/markings/android.ftl

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,21 @@
22
marking-AndroidAntennaLeft = Андроид, антенна (Левая)
33
marking-AndroidAntennaRight = Андроид, антенна (Правая)
44
marking-AndroidAntennaCrown = Андроид, антенны (Корона)
5-
marking-AndroidEyesVisor = Андроид, визор
5+
marking-AndroidHeadBulbs = Андроид, радиолампы
6+
marking-AndroidEyesVisor = Андроид, глаза (Визор)
67
marking-AndroidEyesVisor-eyes_visor_led = Светодиоды
8+
marking-AndroidIpcHead = Андроид, голова (ЭЛТ монитор)
9+
marking-AndroidOldHead = Андроид, голова (Страх детства)
10+
marking-AndroidScreenHead = Андроид, голова (Экран)
11+
marking-AndroidAnimatronicHead = Андроид, голова (Аниматроник)
12+
marking-AndroidTempleLed = Андроид, светодиод (Висок)
713
# Торс
814
marking-AndroidTorsoFemaleStandart = Андроид, торс (Стандарт)
915
marking-AndroidTorsoFemaleBreast = Андроид, торс (Средняя грудь)
1016
marking-AndroidTorsoFemaleBigBreast = Андроид, торс (Большая грудь)
1117
marking-AndroidTorsoFemaleNoBreast = Андроид, торс (Без груди)
1218
marking-AndroidTorsoMale = Андроид, торс
19+
marking-AndroidTorsoSpine = Андроид, торс (Усиленный позвоночник)
1320
# Светодиоды
1421
marking-AndroidLeds = Андроид, светодиоды (Стандарт)
1522
marking-AndroidLedsLove = Андроид, светодиоды (Акцент)
@@ -18,4 +25,9 @@ marking-AndroidLedsStripes = Андроид, светодиоды (Полосы)
1825
marking-AndroidCatEars = Андроид, кошачьи ушки
1926
marking-AndroidCatEars-ears_cat_led = Светодиоды
2027
marking-AndroidCatTail = Андроид, кошачий хвост
21-
marking-AndroidCatEars-cat_tail_led = Светодиоды
28+
marking-AndroidCatEars-cat_tail_led = Светодиоды
29+
# Конечности
30+
marking-AndroidScrapArmLeft = Андроид, левая рука (Самоделкин)
31+
marking-AndroidScrapArmRight = Андроид, правая рука (Самоделкин)
32+
marking-AndroidScrapLegLeft = Андроид, левая нога (Самоделкин)
33+
marking-AndroidScrapLegRight = Андроид, правая нога (Самоделкин)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
charger-examine = Заряжает [color={ $color }]{ $chargeRate }Вт[/color] в секунду.
22
charger-component-charge-rate = Скорость зарядки
3-
charger-content = Текущий заряд: [color=#5E7C16]{ $chargePercentage }[/color]%.
3+
charger-content = Текущий заряд: [color=#5E7C16]{$chargePercent}[/color]%.
44
charger-empty = В зарядном устройстве ничего нет.

Resources/Prototypes/Entities/Objects/Specific/Robotics/mmi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
- type: Tag
131131
tags:
132132
- CannotSuicide
133-
- Brain # Corvax-Wega-Android
133+
- BrainSynthetic # Corvax-Wega-Android
134134
- type: GenericVisualizer
135135
visuals:
136136
enum.ToggleableGhostRoleVisuals.Status:

Resources/Prototypes/_Wega/Entities/Mobs/Customization/Markings/android.yml

Lines changed: 210 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@
4040
- sprite: _Wega/Mobs/Customization/android.rsi
4141
state: head_antenna_crown
4242

43+
- type: marking
44+
id: AndroidHeadBulbs
45+
bodyPart: HeadTop
46+
markingCategory: HeadTop
47+
speciesRestriction: [ Android ]
48+
coloring:
49+
default:
50+
type:
51+
!type:CategoryColoring
52+
category: Special
53+
sprites:
54+
- sprite: _Wega/Mobs/Customization/android.rsi
55+
state: head_bulbs
56+
4357
- type: marking
4458
id: AndroidTorsoFemaleStandart
4559
bodyPart: Chest
@@ -115,6 +129,30 @@
115129
- sprite: _Wega/Mobs/Customization/android.rsi
116130
state: body_m
117131

132+
- type: marking
133+
id: AndroidTorsoSpine
134+
bodyPart: Special
135+
markingCategory: Chest
136+
speciesRestriction: [ Android ]
137+
sexRestriction: [ Female ]
138+
sponsorOnly: false
139+
coloring:
140+
layers:
141+
body_spine:
142+
type:
143+
!type:SimpleColoring
144+
color: "#ffffff"
145+
body_spine_led:
146+
type:
147+
!type:CategoryColoring
148+
category: Special
149+
150+
sprites:
151+
- sprite: _Wega/Mobs/Customization/android.rsi
152+
state: body_spine
153+
- sprite: _Wega/Mobs/Customization/android.rsi
154+
state: body_spine_led
155+
118156
- type: marking
119157
id: AndroidLeds
120158
bodyPart: Special
@@ -160,6 +198,21 @@
160198
- sprite: _Wega/Mobs/Customization/android.rsi
161199
state: leds_stripes
162200

201+
- type: marking
202+
id: AndroidTempleLed
203+
bodyPart: HeadTop
204+
markingCategory: Head
205+
speciesRestriction: [ Android ]
206+
sponsorOnly: false
207+
coloring:
208+
default:
209+
type:
210+
!type:CategoryColoring
211+
category: Special
212+
sprites:
213+
- sprite: _Wega/Mobs/Customization/android.rsi
214+
state: temple_led
215+
163216
- type: marking
164217
id: AndroidCatEars
165218
bodyPart: HeadTop
@@ -222,4 +275,160 @@
222275
- sprite: _Wega/Mobs/Customization/android.rsi
223276
state: eyes_visor
224277
- sprite: _Wega/Mobs/Customization/android.rsi
225-
state: eyes_visor_led
278+
state: eyes_visor_led
279+
280+
- type: marking
281+
id: AndroidScrapArmLeft
282+
bodyPart: Special
283+
markingCategory: Arms
284+
speciesRestriction: [ Android ]
285+
sponsorOnly: false
286+
coloring:
287+
default:
288+
type:
289+
!type:SimpleColoring
290+
color: "#ffffff"
291+
sprites:
292+
- sprite: _Wega/Mobs/Customization/android.rsi
293+
state: l_arm_scrap
294+
295+
- type: marking
296+
id: AndroidScrapArmRight
297+
bodyPart: Special
298+
markingCategory: Arms
299+
speciesRestriction: [ Android ]
300+
sponsorOnly: false
301+
coloring:
302+
default:
303+
type:
304+
!type:SimpleColoring
305+
color: "#ffffff"
306+
sprites:
307+
- sprite: _Wega/Mobs/Customization/android.rsi
308+
state: r_arm_scrap
309+
310+
- type: marking
311+
id: AndroidScrapLegLeft
312+
bodyPart: Special
313+
markingCategory: Legs
314+
speciesRestriction: [ Android ]
315+
sponsorOnly: false
316+
coloring:
317+
default:
318+
type:
319+
!type:SimpleColoring
320+
color: "#ffffff"
321+
sprites:
322+
- sprite: _Wega/Mobs/Customization/android.rsi
323+
state: l_leg_scrap
324+
325+
- type: marking
326+
id: AndroidScrapLegRight
327+
bodyPart: Special
328+
markingCategory: Legs
329+
speciesRestriction: [ Android ]
330+
sponsorOnly: false
331+
coloring:
332+
default:
333+
type:
334+
!type:SimpleColoring
335+
color: "#ffffff"
336+
sprites:
337+
- sprite: _Wega/Mobs/Customization/android.rsi
338+
state: r_leg_scrap
339+
340+
- type: marking
341+
id: AndroidOldHead
342+
bodyPart: HeadTop
343+
markingCategory: Head
344+
speciesRestriction: [ Android ]
345+
sponsorOnly: false
346+
coloring:
347+
layers:
348+
old_base:
349+
type:
350+
!type:SkinColoring
351+
old_lit:
352+
type:
353+
!type:EyeColoring
354+
old_uncolor:
355+
type:
356+
!type:SimpleColoring
357+
color: "#ffffff"
358+
sprites:
359+
- sprite: _Wega/Mobs/Customization/android_heads.rsi
360+
state: old_base
361+
- sprite: _Wega/Mobs/Customization/android_heads.rsi
362+
state: old_uncolor
363+
- sprite: _Wega/Mobs/Customization/android_heads.rsi
364+
state: old_lit
365+
366+
- type: marking
367+
id: AndroidIpcHead
368+
bodyPart: HeadTop
369+
markingCategory: Head
370+
speciesRestriction: [ Android ]
371+
sponsorOnly: false
372+
coloring:
373+
layers:
374+
ipc_base:
375+
type:
376+
!type:SkinColoring
377+
ipc_lit:
378+
type:
379+
!type:CategoryColoring
380+
category: Special
381+
ipc_uncolor:
382+
type:
383+
!type:SimpleColoring
384+
color: "#ffffff"
385+
sprites:
386+
- sprite: _Wega/Mobs/Customization/android_heads.rsi
387+
state: ipc_base
388+
- sprite: _Wega/Mobs/Customization/android_heads.rsi
389+
state: ipc_uncolor
390+
- sprite: _Wega/Mobs/Customization/android_heads.rsi
391+
state: ipc_lit
392+
393+
- type: marking
394+
id: AndroidScreenHead
395+
bodyPart: Eyes
396+
markingCategory: Head
397+
speciesRestriction: [ Android ]
398+
sponsorOnly: false
399+
coloring:
400+
layers:
401+
screen_base:
402+
type:
403+
!type:SkinColoring
404+
screen_lit:
405+
type:
406+
!type:CategoryColoring
407+
category: Special
408+
screen_uncolor:
409+
type:
410+
!type:SimpleColoring
411+
color: "#ffffff"
412+
sprites:
413+
- sprite: _Wega/Mobs/Customization/android_heads.rsi
414+
state: screen_base
415+
- sprite: _Wega/Mobs/Customization/android_heads.rsi
416+
state: screen_uncolor
417+
- sprite: _Wega/Mobs/Customization/android_heads.rsi
418+
state: screen_lit
419+
420+
- type: marking
421+
id: AndroidAnimatronicHead
422+
bodyPart: Head
423+
markingCategory: Head
424+
speciesRestriction: [ Android ]
425+
sponsorOnly: false
426+
coloring:
427+
default:
428+
type:
429+
!type:SimpleColoring
430+
color: "#ffffff"
431+
sprites:
432+
- sprite: _Wega/Mobs/Customization/android_heads.rsi
433+
state: animatronic
434+

0 commit comments

Comments
 (0)