* tweak: hotbar translation

* oops

* tweak: WhiteBox update

* tweak: Bagel, Meta and Train in map pool

* tweak: ERTsystem changes and new ERT map

* cvar fix

* nerf: radium no longer has a touch effect

* tweak: chem touch tweaks

* tweak: patch applies reagents over time

* patchComp fix and some tweaks

* some changes
This commit is contained in:
RinKeeper
2024-03-31 09:12:07 +03:00
committed by GitHub
parent 7ef173bc2b
commit e6790ef190
18 changed files with 67691 additions and 18837 deletions

View File

@@ -11,6 +11,9 @@ using Content.Shared.Mobs.Components;
using System.Diagnostics.CodeAnalysis;
using Content.Shared.Chemistry;
using Content.Shared.DoAfter;
using Content.Shared.FixedPoint;
using System.Threading;
using Timer = Robust.Shared.Timing.Timer;
namespace Content.Server.Chemistry.EntitySystems
{
@@ -25,6 +28,7 @@ namespace Content.Server.Chemistry.EntitySystems
SubscribeLocalEvent<PatchComponent, AfterInteractEvent>(OnAfterInteract);
SubscribeLocalEvent<PatchComponent, UseInHandEvent>(OnUseInHand);
SubscribeLocalEvent<PatchComponent, SolutionContainerChangedEvent>(OnSolutionChange);
}
private void OnPatchDoAfter(Entity<PatchComponent> entity, ref PatchDoAfterEvent args)
@@ -151,11 +155,7 @@ namespace Content.Server.Chemistry.EntitySystems
if (!targetSolution.CanAddSolution(removedSolution))
return true;
_reactive.DoEntityReaction(target.Value, removedSolution, ReactionMethod.Touch);
// Transfering only half of the solution via Injection method
removedSolution.ScaleSolution(0.5f);
_reactive.DoEntityReaction(target.Value, removedSolution, ReactionMethod.Injection);
_solutionContainers.TryAddSolution(targetSoln.Value, removedSolution);
ApplyOnSkin(patch,target, targetSoln, removedSolution);
QueueDel(patch);
_adminLogger.Add(LogType.ForceFeed, $"{_entMan.ToPrettyString(user):user} put a patch on {_entMan.ToPrettyString(target.Value):target} with a solution {SolutionContainerSystem.ToPrettyString(removedSolution):removedSolution} using a {_entMan.ToPrettyString(uid):using}");
@@ -163,7 +163,82 @@ namespace Content.Server.Chemistry.EntitySystems
return true;
}
static bool EligibleEntity([NotNullWhen(true)] EntityUid? entity, IEntityManager entMan, PatchComponent component)
/// <summary>
/// Applies solution via ReactionMethod.Touch
/// Applies until CancellationToken is not cancelled
/// if CancellationToken is cancelled starts ApplyIntoBloodStream
/// </summary>
private void ApplyOnSkin(Entity<PatchComponent> entity, EntityUid? target, Entity<SolutionComponent>? targetSoln, Solution solution)
{
CancellationToken token = entity.Comp.CancelTokenSourceSkin.Token;
Double applicationTime = (double) (entity.Comp.BaseApplicationTime + 2 * (solution.Volume / 5));
FixedPoint2 ups = 1 / applicationTime; // ups - units per second
var currentSolution = solution;
currentSolution.ScaleSolution((float)ups);
if (target.HasValue)
{
Timer.SpawnRepeating(TimeSpan.FromSeconds(1), () =>
{
if (token.IsCancellationRequested)
return;
_reactive.DoEntityReaction(target.Value, currentSolution, ReactionMethod.Touch);
}, token);
}
Timer.Spawn(TimeSpan.FromSeconds(applicationTime), () =>
{
OnRemoveSkin(entity);
ApplyIntoBloodStream(entity, target, targetSoln, solution);
});
}
/// <summary>
/// Almost similar to the ApplyOnSkin.
/// Applies solution into bloodstream.
/// </summary>
private void ApplyIntoBloodStream(Entity<PatchComponent> entity, EntityUid? target, Entity<SolutionComponent>? targetSoln, Solution solution)
{
CancellationToken token = entity.Comp.CancelTokenSourceBlood.Token;
Double applicationTime = (double) (entity.Comp.BaseApplicationTime + 2 * (solution.Volume / 5));
FixedPoint2 ups = (1 / applicationTime) / 2; // ups - units per second
var currentSolution = solution;
currentSolution.ScaleSolution((float)ups);
if (targetSoln.HasValue)
{
Timer.SpawnRepeating(TimeSpan.FromSeconds(1), () =>
{
if (token.IsCancellationRequested)
return;
_solutionContainers.TryAddSolution(targetSoln.Value, solution);
if (target.HasValue)
{
_reactive.DoEntityReaction(target.Value, solution, ReactionMethod.Touch);
}
}, token);
Timer.Spawn(TimeSpan.FromSeconds(applicationTime / 2), () => OnRemoveBlood(entity));
}
}
// Stops Timer, otherwise ApplyOnSkin and ApplyIntoTheBloodstream will last forever
private static void OnRemoveSkin(Entity<PatchComponent> entity)
{
entity.Comp.CancelTokenSourceSkin.Cancel();
}
private static void OnRemoveBlood(Entity<PatchComponent> entity)
{
entity.Comp.CancelTokenSourceBlood.Cancel();
}
private static bool EligibleEntity([NotNullWhen(true)] EntityUid? entity, IEntityManager entMan, PatchComponent component)
{
// Using patch only on mobs
return component.OnlyMobs

View File

@@ -12,5 +12,5 @@ public sealed partial class ERTMapComponent : Component
public EntityUid? Shuttle;
public static ResPath OutpostMap = new("/Maps/ERT/ERTStation.yml");
public static ResPath ShuttleMap = new("/Maps/ERT/ERTShuttle.yml");
//public static ResPath ShuttleMap = new("/Maps/ERT/ERTShuttle.yml");
}

View File

@@ -65,7 +65,7 @@ public sealed class ERTRecruitmentRule : StationEventSystem<ERTRecruitmentRuleCo
if (query.MoveNext(out uid, out var ertMapComponent))
{
component.Outpost = uid;
component.Shuttle = ertMapComponent.Shuttle;
//component.Shuttle = ertMapComponent.Shuttle;
component.MapId = ertMapComponent.MapId;
}
}
@@ -93,10 +93,12 @@ public sealed class ERTRecruitmentRule : StationEventSystem<ERTRecruitmentRuleCo
_chatSystem.DispatchStationAnnouncement(component.TargetStation.Value,Loc.GetString("ert-wait-message"),colorOverride: Color.Gold);
/*
if (TryComp<ShuttleComponent>(component.Shuttle, out var shuttle) && component.Outpost != null)
{
_shuttle.TryFTLDock(component.Shuttle.Value, shuttle, component.Outpost.Value);
}
*/
_recruitment.StartRecruitment(ERTRecruitmentRuleComponent.EventName);
}
@@ -167,6 +169,10 @@ public sealed class ERTRecruitmentRule : StationEventSystem<ERTRecruitmentRuleCo
var outpost = outpostGrids[0];
// Listen I just don't want it to overlap.
// RinKeeper
// Now Shuttle is already on Outpost grid, so we dont need that.
/*
if (!_map.TryLoad(mapId, ERTMapComponent.ShuttleMap.ToString(), out var grids, new MapLoadOptions {Offset = Vector2.One * 1000f}) || !grids.Any())
{
_logger.Error( $"Error loading grid {ERTMapComponent.ShuttleMap}!");
@@ -183,10 +189,11 @@ public sealed class ERTRecruitmentRule : StationEventSystem<ERTRecruitmentRuleCo
_mapManager.DeleteMap(mapId);
return false;
}
*/
var ERTMap = EnsureComp<ERTMapComponent>(outpost);
ERTMap.MapId = mapId;
ERTMap.Shuttle = shuttleId;
//ERTMap.Shuttle = shuttleId;
return true;
}

View File

@@ -21,8 +21,8 @@ public sealed partial class ERTRecruitmentRuleComponent : Component
[ViewVariables]
public EntityUid? Outpost;
[ViewVariables]
public EntityUid? Shuttle;
//[ViewVariables]
// public EntityUid? Shuttle;
[ViewVariables]
public EntityUid? TargetStation;
}

View File

@@ -1,4 +1,5 @@
using Content.Shared.DoAfter;
using System.Threading;
using Content.Shared.DoAfter;
using Content.Shared.FixedPoint;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
@@ -22,6 +23,9 @@ public sealed partial class PatchDoAfterEvent : SimpleDoAfterEvent
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class PatchComponent : Component
{
//[ViewVariables, DataField]
public CancellationTokenSource CancelTokenSourceSkin = new();
public CancellationTokenSource CancelTokenSourceBlood = new();
[ViewVariables, AutoNetworkedField]
public FixedPoint2 CurrentVolume;
@@ -32,9 +36,15 @@ public sealed partial class PatchComponent : Component
[DataField("solutionName")]
public string SolutionName = "patch";
// Application only on mobs
[DataField("onlyMobs")]
public bool OnlyMobs = true;
// Application time used in calculation final time
[DataField("applicationTime")]
public FixedPoint2 BaseApplicationTime = 10;
// Delay used in calculation final delay time
[ViewVariables(VVAccess.ReadWrite)]
[DataField("delay")]
public TimeSpan Delay = TimeSpan.FromSeconds(5);

View File

@@ -1,10 +1,19 @@
ghost-gui-return-to-body-button = Return to body
ghost-gui-ghost-warp-button = Ghost Warp
ghost-gui-ghost-roles-button = Ghost Roles ({$count})
ghost-gui-toggle-ghost-visibility-name = Toggle Ghosts
ghost-gui-toggle-ghost-visibility-desc = Toggle the visibility of other ghosts.
ghost-gui-toggle-ghost-visibility-popup = Toggled visibility of ghosts.
ghost-gui-toggle-lighting-manager-name = Toggle All Lighting
ghost-gui-toggle-lighting-manager-desc = Toggle all light rendering to better observe dark areas.
ghost-gui-toggle-lighting-manager-popup = Toggled all lighting.
ghost-gui-toggle-fov-name = Toggle FoV
ghost-gui-toggle-fov-desc = Toggles field-of-view in order to see what players see.
ghost-gui-toggle-fov-popup = Toggled field-of-view.
ghost-gui-scare-name = Boo!
ghost-gui-scare-desc = Scare your crew members because of boredom!
ghost-gui-toggle-ghost-hearing-name = Toggle Ghost Hearing
ghost-gui-toggle-ghost-hearing-desc = Toggle between hearing all messages and hearing only radio & nearby messages.
ghost-gui-toggle-hearing-popup-on = You can now hear all messages.
ghost-gui-toggle-hearing-popup-off = You can now only hear radio and nearby messages.

View File

@@ -0,0 +1,12 @@
action-name-show-solar-console = Solar Control Interface
action-description-show-solar-console = View a solar control interface.
action-name-show-communications-console = Communications Interface
action-description-show-communications-console = View a communications interface.
action-name-show-radar-console = Mass Scanner Interface
action-description-show-radar-console = View a mass scanner interface.
action-name-show-cargo-console = Cargo Ordering Interface
action-description-show-cargo-console = View a cargo ordering interface.
action-name-show-crew-monitoring-console = Crew Monitoring Interface
action-description-crew-monitoring-console = View a crew monitoring interface.
action-name-show-station-records-console = Station Records Interface
action-description-show-station-records-console = View a station records Interface

View File

@@ -11,16 +11,27 @@ ghost-gui-toggle-lighting-manager-popup = Рендеринг света был
ghost-gui-toggle-fov-name = Переключить поле зрения
ghost-gui-toggle-fov-desc = Переключить поле зрения чтобы видеть то же, что и игроки.
ghost-gui-toggle-fov-popup = Поле зрения было переключено.
ghost-gui-scare-name = Буу!
ghost-gui-scare-desc = Напугайте экипаж станции!
ghost-gui-toggle-ghost-hearing-name = Переключить видимость сообщений
ghost-gui-toggle-ghost-hearing-desc = Переключение между прослушиванием всех сообщений и прослушиванием только радиосвязи и ближайших сообщений.
ghost-gui-toggle-hearing-popup-on = Теперь вы слышите все сообщения.
ghost-gui-toggle-hearing-popup-off = Теперь вы можете слышать только радиосвязь и ближайшие сообщения.
ghost-target-window-title = Телепорт призрака
ghost-target-window-current-button = Телепорт в: { $name }
ghost-roles-window-title = Роли призраков
ghost-roles-window-request-role-button = Запросить
ghost-roles-window-request-role-button-timer = Запросить ({ $time }сек.)
ghost-roles-window-follow-role-button = Следовать
ghost-roles-window-no-roles-available-label = В настоящее время нет доступных ролей призраков.
ghost-return-to-body-title = Вернуться в тело
ghost-return-to-body-text = Вы возрождаетесь! Вернуться в свое тело?
ghost-roles-window-rules-footer = Кнопка станет доступна через { $time } секунд (эта задержка нужна, чтобы убедиться, что вы прочитали правила).
ghost-respawn-time-left = Минут осталось до возможности вернуться в раунд - { $time }.
ghost-respawn-max-players = Функция недоступна, игроков на сервере должно быть меньше { $players }.
ghost-respawn-window-title = Правила возвращения в раунд

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -102,8 +102,8 @@
- type: entity
id: ActionAGhostShowSolar
name: Solar Control Interface
description: View a solar control interface.
name: action-name-show-solar-console
description: action-description-show-solar-console
noSpawn: true
components:
- type: InstantAction
@@ -115,8 +115,8 @@
- type: entity
id: ActionAGhostShowCommunications
name: Communications Interface
description: View a communications interface.
name: action-name-show-communications-console
description: action-description-show-communications-console
noSpawn: true
components:
- type: InstantAction
@@ -128,8 +128,8 @@
- type: entity
id: ActionAGhostShowRadar
name: Mass Scanner Interface
description: View a mass scanner interface.
name: action-name-show-radar-console
description: action-description-show-radar-console
noSpawn: true
components:
- type: InstantAction
@@ -141,8 +141,8 @@
- type: entity
id: ActionAGhostShowCargo
name: Cargo Ordering Interface
description: View a cargo ordering interface.
name: action-name-show-cargo-console
description: action-description-show-cargo-console
noSpawn: true
components:
- type: InstantAction
@@ -154,8 +154,8 @@
- type: entity
id: ActionAGhostShowCrewMonitoring
name: Crew Monitoring Interface
description: View a crew monitoring interface.
name: action-name-show-crew-monitoring-console
description: action-description-crew-monitoring-console
noSpawn: true
components:
- type: InstantAction
@@ -167,8 +167,8 @@
- type: entity
id: ActionAGhostShowStationRecords
name: Station Records Interface
description: View a station records Interface
name: action-name-show-station-records-console
description: action-description-show-station-records-console
noSpawn: true
components:
- type: InstantAction

View File

@@ -51,8 +51,8 @@
- type: entity
id: ActionGhostBoo
name: Boo!
description: Scare your crew members because of boredom!
name: ghost-gui-scare-name
description: ghost-gui-scare-desc
noSpawn: true
components:
- type: InstantAction
@@ -63,8 +63,8 @@
- type: entity
id: ActionToggleLighting
name: Toggle All Lighting
description: Toggle all light rendering to better observe dark areas.
name: ghost-gui-toggle-lighting-manager-name
description: ghost-gui-toggle-lighting-manager-desc
noSpawn: true
components:
- type: InstantAction
@@ -75,8 +75,8 @@
- type: entity
id: ActionToggleFov
name: Toggle FoV
description: Toggles field-of-view in order to see what players see.
name: ghost-gui-toggle-fov-name
description: ghost-gui-toggle-fov-desc
noSpawn: true
components:
- type: InstantAction
@@ -87,8 +87,8 @@
- type: entity
id: ActionToggleGhosts
name: Toggle Ghosts
description: Toggle the visibility of other ghosts.
name: ghost-gui-toggle-ghost-visibility-name
description: ghost-gui-toggle-ghost-visibility-desc
noSpawn: true
components:
- type: InstantAction
@@ -99,8 +99,8 @@
- type: entity
id: ActionToggleGhostHearing
name: Toggle Ghost Hearing
description: Toggle between hearing all messages and hearing only radio & nearby messages.
name: ghost-gui-toggle-ghost-hearing-name
description: ghost-gui-toggle-ghost-hearing-desc
noSpawn: true
components:
- type: InstantAction

View File

@@ -50,8 +50,8 @@
patch:
maxVol: 40
reagents:
- ReagentId: Bicaridine
Quantity: 10
- ReagentId: StypticPowder
Quantity: 20
- type: entity
name: burn patch
@@ -64,5 +64,5 @@
patch:
maxVol: 40
reagents:
- ReagentId: Dermaline
Quantity: 10
- ReagentId: SilverSulfadiazine
Quantity: 20

View File

@@ -4,6 +4,9 @@
- WonderBox
- Polaris
- Scoupidia
- Void
- Triumph
- WhiteBox
- Bagel # Temporary
- Meta # Temporary
- Train # Temporary
# - Void

View File

@@ -268,15 +268,13 @@
meltingPoint: 700.0
boilingPoint: 1737.0
reactiveEffects:
Acidic:
methods: [ Touch ]
metabolisms:
Poison:
effects:
- !type:HealthChange
scaleByQuantity: true
damage:
types:
Heat: 0.5
Cellular: 1
Heat: 1
- type: reagent
id: Silicon

View File

@@ -1183,12 +1183,19 @@
scaleByQuantity: true
damage:
groups:
Brute: -2.5
Brute: -1.25
types:
Heat: -2.5
Shock: -2.5
Cold: -2.5
Poison: 0.66
Heat: -1.25
Shock: -1.25
Cold: -1.25
metabolisms:
Medicine:
effects:
- !type:HealthChange
conditions:
damage:
types:
Poison: 1
slippery: true
- type: reagent
@@ -1206,7 +1213,7 @@
scaleByQuantity: true
damage:
types:
Heat: -1
Heat: -2
metabolisms:
Medicine:
effects:
@@ -1214,7 +1221,7 @@
conditions:
damage:
types:
Heat: -1.0
Heat: -2.0
Poison: 0.5
- type: reagent
@@ -1232,7 +1239,7 @@
scaleByQuantity: true
damage:
groups:
Brute: -1
Brute: -2
metabolisms:
Medicine:
effects:
@@ -1240,6 +1247,6 @@
conditions:
damage:
groups:
Brute: -1
Brute: -2
types:
Poison: 0.5