Skip to content

Commit

Permalink
Борги (#107)
Browse files Browse the repository at this point in the history
* Борги

* Fix

* fix

* merge moment 2
  • Loading branch information
kanopus952 authored Dec 7, 2024
1 parent b66d4f9 commit 0f67a49
Show file tree
Hide file tree
Showing 57 changed files with 388 additions and 50 deletions.
3 changes: 3 additions & 0 deletions Content.Client/Silicons/Borgs/BorgSwitchableTypeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Shared.Silicons.Borgs;
using Content.Shared.Silicons.Borgs.Components;
using Robust.Client.GameObjects;
using Content.Shared._Lust.Rest; // Lust-edit

namespace Content.Client.Silicons.Borgs;

Expand Down Expand Up @@ -41,6 +42,8 @@ protected override void UpdateEntityAppearance(
{
sprite.LayerSetState(BorgVisualLayers.Body, prototype.SpriteBodyState);
sprite.LayerSetState(BorgVisualLayers.LightStatus, prototype.SpriteToggleLightState);
sprite.LayerSetState(RestVisuals.Resting, prototype.SpriteRestingState); // Lust-edit
sprite.LayerSetState(BorgVisualLayers.Wrecked, prototype.SpriteWreckState); // Lust-edit
}

if (TryComp(entity, out BorgChassisComponent? chassis))
Expand Down
33 changes: 28 additions & 5 deletions Content.Client/Silicons/Borgs/BorgSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
using Content.Shared.Silicons.Borgs.Components;
using Robust.Client.GameObjects;
using Robust.Shared.Containers;
using Content.Shared._Lust.Rest; // Lust-edit

namespace Content.Client.Silicons.Borgs;

/// <inheritdoc/>
public sealed class BorgSystem : SharedBorgSystem
{
[Dependency] private readonly AppearanceSystem _appearance = default!;

public override void Initialize()
{
base.Initialize();
Expand Down Expand Up @@ -43,30 +43,53 @@ protected override void OnRemoved(EntityUid uid, BorgChassisComponent component,
base.OnRemoved(uid, component, args);
UpdateBorgAppearance(uid, component);
}

// Lust-start
private void UpdateBorgAppearance(EntityUid uid,
BorgChassisComponent? component = null,
AppearanceComponent? appearance = null,
SpriteComponent? sprite = null)
{
if (!Resolve(uid, ref component, ref appearance, ref sprite))
return;
if (!TryComp<RestAbilityComponent>(uid, out var ability))
return;

if (_appearance.TryGetData<MobState>(uid, MobStateVisuals.State, out var state, appearance))
{
if (state != MobState.Alive)
{
sprite.LayerSetVisible(BorgVisualLayers.Body, false);
sprite.LayerSetVisible(BorgVisualLayers.Light, false);
sprite.LayerSetVisible(BorgVisualLayers.LightStatus, false);
sprite.LayerSetVisible(RestVisuals.Resting, false);
sprite.LayerSetVisible(BorgVisualLayers.Wrecked, true);
return;
}
if (state == MobState.Alive)
{
if (ability.IsResting)
sprite.LayerSetVisible(RestVisuals.Resting, true);
sprite.LayerSetVisible(BorgVisualLayers.Wrecked, false);
sprite.LayerSetVisible(BorgVisualLayers.LightStatus, false);
}
}

if (!_appearance.TryGetData<bool>(uid, BorgVisuals.HasPlayer, out var hasPlayer, appearance))
hasPlayer = false;
if (ability.IsResting)
{
sprite.LayerSetVisible(BorgVisualLayers.LightStatus, false);
return;
}
else
{
sprite.LayerSetVisible(BorgVisualLayers.Light, component.BrainEntity != null || hasPlayer);
sprite.LayerSetState(BorgVisualLayers.Light, hasPlayer ? component.HasMindState : component.NoMindState);
sprite.LayerSetVisible(BorgVisualLayers.LightStatus, true);
sprite.LayerSetVisible(BorgVisualLayers.Body, true);
}

sprite.LayerSetVisible(BorgVisualLayers.Light, component.BrainEntity != null || hasPlayer);
sprite.LayerSetState(BorgVisualLayers.Light, hasPlayer ? component.HasMindState : component.NoMindState);
}
// Lust-end

private void OnMMIAppearanceChanged(EntityUid uid, MMIComponent component, ref AppearanceChangeEvent args)
{
Expand Down
5 changes: 4 additions & 1 deletion Content.Client/_Lust/Rest/RestSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
using Content.Shared._Lust.Rest;
using Robust.Client.GameObjects;
using Content.Client.Silicons.Borgs;
using Content.Shared.Silicons.Borgs;
using Content.Shared.Silicons.Borgs.Components;

namespace Content.Client._Lust.Rest;

Expand Down Expand Up @@ -37,7 +40,7 @@ private void OnSuccess(RestChangeSpriteEvent args)
private void ToggleBaseLayers(SpriteComponent sprite, bool visible, HashSet<string> stringLayers, HashSet<Enum> enumLayers)
{
// Переключаем базовый спрайт
sprite.LayerSetVisible(RestVisuals.Base, visible);
sprite.LayerSetVisible(BorgVisualLayers.Body, visible);

// Все, что ниже, лютое говно, но зато работает без вопросов.

Expand Down
8 changes: 8 additions & 0 deletions Content.Shared/Silicons/Borgs/BorgTypePrototype.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public sealed partial class BorgTypePrototype : IPrototype
[DataField]
public EntityWhitelist? ModuleWhitelist { get; set; }



/// <summary>
/// Inventory template used by this borg.
/// </summary>
Expand Down Expand Up @@ -126,6 +128,12 @@ public sealed partial class BorgTypePrototype : IPrototype
/// </summary>
[DataField]
public string SpriteToggleLightState { get; set; } = "robot_l";
// Lust-start
[DataField]
public string SpriteRestingState { get; set; } = "robot_rest";
[DataField]
public string SpriteWreckState { get; set; } = "robot_wreck";
// Lust-end

//
// Minor information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,9 @@ public enum BorgVisualLayers : byte
/// Layer for the borg flashlight status.
/// </summary>
LightStatus,

/// <summary>
/// Layer for the borg dead state.
/// </summary>
Wrecked, // For Lust-Borgs
}
31 changes: 1 addition & 30 deletions Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
- type: Pullable
- type: Puller
needsHands: false
- type: StandingState
# - type: StandingState # Lust-edit
- type: Tag
tags:
- DoorBumpOpener
Expand Down Expand Up @@ -345,35 +345,6 @@
- type: StationRecordKeyStorage
# Sunrise-End

- type: entity # Lust added. Specially for new borg sprites and abilities
parent: BaseBorgChassisNT
id: BaseBorgChassisNTNextGen
save: false
abstract: true
components:
# TODO: Я в душе не ебу как чинить этих ваших боргов для ебли после ПРа ПЖБ, так что ебитесь с этим сами.
#- type: Sprite
# sprite: _Lust/Mobs/Silicon/chassis.rsi
#- type: Appearance
#- type: RestAbility
# disableableStringLayers:
# - light
# disableableEnumLayers:
# - enum.BorgVisualLayers.Light
- type: TTS
voice: TemplarAssasin
- type: FootstepModifier
footstepSoundCollection:
collection: FootstepCyborgSpider
params:
volume: -15
# LUST ERP
- type: Interaction
erp: true
- type: Sex
sex: female
# LUST ERP

- type: entity
id: BaseBorgChassisSyndicate
parent: BaseBorgChassis
Expand Down
10 changes: 9 additions & 1 deletion Resources/Prototypes/Entities/Mobs/Cyborgs/borg_chassis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- type: entity
id: BorgChassisSelectable
parent: BaseBorgChassisNTNextGen
parent: BaseBorgChassisNTNextGen # Lust-edit
components:
- type: Sprite
layers:
Expand All @@ -14,6 +14,14 @@
shader: unshaded
map: ["light","enum.BorgVisualLayers.LightStatus"]
visible: false
# Lust-start
- state: robot_rest
map: [ "enum.RestVisuals.Resting" ]
visible: false
- state: robot_wreck
map: [ "enum.BorgVisualLayers.Wrecked" ]
visible: false
# Lust-end
- type: BorgChassis
# Default borg can take no modules until selected type.
maxModules: 0
Expand Down
3 changes: 3 additions & 0 deletions Resources/Prototypes/Entities/Mobs/Player/silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,9 @@
cell_slot:
name: power-cell-slot-component-slot-name-default
startingItem: PowerCellHyper
# Lust-start
- type: StandingState
# Lust-end

- type: entity
id: PlayerBorgSyndicateSaboteurGhostRole
Expand Down
60 changes: 60 additions & 0 deletions Resources/Prototypes/_Lust/Actions/rest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
name: RestActionName
description: RestActionDesc

- type: entity
id: RestActionRobot
parent: BaseRestAction
components:
- type: InstantAction
icon:
sprite: _Lust/Mobs/Silicon/chassis_icons.rsi
state: robot_tipped_icon
event: !type:RestActionEvent {}
checkCanInteract: false
checkConsciousness: false

- type: entity
id: RestActionMiner
parent: BaseRestAction
Expand Down Expand Up @@ -63,3 +75,51 @@
event: !type:RestActionEvent {}
checkCanInteract: false
checkConsciousness: false

- type: entity
id: RestActionPeace
parent: BaseRestAction
components:
- type: InstantAction
icon:
sprite: _Lust/Mobs/Silicon/chassis_icons.rsi
state: peace_tipped_icon
event: !type:RestActionEvent {}
checkCanInteract: false
checkConsciousness: false

- type: entity
id: RestActionClown
parent: BaseRestAction
components:
- type: InstantAction
icon:
sprite: _Lust/Mobs/Silicon/chassis_icons.rsi
state: clown_tipped_icon
event: !type:RestActionEvent {}
checkCanInteract: false
checkConsciousness: false

- type: entity
id: RestActionSec
parent: BaseRestAction
components:
- type: InstantAction
icon:
sprite: _Lust/Mobs/Silicon/chassis_icons.rsi
state: sec_tipped_icon
event: !type:RestActionEvent {}
checkCanInteract: false
checkConsciousness: false

- type: entity
id: RestActionSecMk2
parent: BaseRestAction
components:
- type: InstantAction
icon:
sprite: _Lust/Mobs/Silicon/chassis_icons.rsi
state: sec_tipped_icon
event: !type:RestActionEvent {}
checkCanInteract: false
checkConsciousness: false
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
- type: entity
parent: BaseBorgChassisNT
id: BaseBorgChassisNTNextGen
save: false
abstract: true
components:
- type: Sprite
sprite: _Lust/Mobs/Silicon/chassis.rsi
- type: RestAbility
disableableStringLayers:
- light
disableableEnumLayers:
- enum.BorgVisualLayers.LightStatus
- enum.BorgVisualLayers.Light
- enum.BorgVisualLayers.Body
- type: Appearance
- type: TTS
voice: TemplarAssasin
- type: FootstepModifier
footstepSoundCollection:
collection: FootstepCyborgSpider
params:
volume: -15
- type: Interaction
erp: true
- type: Sex
sex: female
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
- type: entity
id: BorgChassisSecurityCombat
parent: BaseBorgChassisNT
parent: BaseBorgChassisNTNextGen # Lust-edit
name: security combat cyborg
components:
# Lust-start
- type: Sprite
sprite: _Sunrise/Mobs/Silicon/chassis.rsi
layers:
- state: sec_mk2
map: ["enum.BorgVisualLayers.Body", "movement" ]
- state: sec_mk2_e_r
map: [ "enum.BorgVisualLayers.Light" ]
map: ["enum.BorgVisualLayers.Light"]
shader: unshaded
visible: false
- state: sec_mk2_l
shader: unshaded
map: [ "light" ]
map: ["light","enum.BorgVisualLayers.LightStatus"]
visible: false
- state: sec_mk2_rest
map: [ "enum.RestVisuals.Resting" ]
visible: false
- state: sec_mk2_wreck
map: [ "enum.BorgVisualLayers.Wrecked" ]
visible: false
# Lust-end
- type: FootstepModifier
footstepSoundCollection:
collection: FootstepCyborgSpider
Expand Down Expand Up @@ -98,6 +106,11 @@
- PortableSurveillanceCameraMonitor
worldTargetActions:
- ForensicScanner
# Lust-start
- type: ActionGrant
actions:
- RestActionSecMk2
# Lust-end

- type: entity
id: BorgChassisSyndicateReaper
Expand Down
Loading

0 comments on commit 0f67a49

Please sign in to comment.