Немного изменений (#463)

* Git Taburet

* Git Taburet2

* fix conflict
This commit is contained in:
Spatison
2024-07-19 15:52:56 +03:00
committed by GitHub
parent a8002843a3
commit 2454da3e8d
4 changed files with 30 additions and 22 deletions

View File

@@ -283,30 +283,35 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
private HumanoidCharacterProfile SetupWizardEntity(
EntityUid mob,
StartingGearPrototype gear,
bool endRoundOnDeath)
bool endRoundOnDeath,
bool randomPtofile = true)
{
EnsureComp<WizardComponent>(mob, out var component);
component.EndRoundOnDeath = endRoundOnDeath;
EnsureComp<GlobalAntagonistComponent>(mob).AntagonistPrototype = "globalAntagonistWizard";
var random = IoCManager.Resolve<IRobustRandom>();
var profile = HumanoidCharacterProfile.RandomWithSpecies().WithAge(random.Next(component.MinAge, component.MaxAge));
if (randomPtofile)
{
var random = IoCManager.Resolve<IRobustRandom>();
var profile = HumanoidCharacterProfile.RandomWithSpecies()
.WithAge(random.Next(component.MinAge, component.MaxAge));
var color = Color.FromHex(GetRandom(component.Color, "#B5B8B1"));
var hair = GetRandom(component.Hair, "HumanHairAfricanPigtails");
var facialHair = GetRandom(component.FacialHair, "HumanFacialHairAbe");
profile = profile.WithCharacterAppearance(
profile.WithCharacterAppearance(
var color = Color.FromHex(GetRandom(component.Color, "#B5B8B1"));
var hair = GetRandom(component.Hair, "HumanHairAfricanPigtails");
var facialHair = GetRandom(component.FacialHair, "HumanFacialHairAbe");
profile = profile.WithCharacterAppearance(
profile.WithCharacterAppearance(
profile.WithCharacterAppearance(
profile.Appearance.WithHairStyleName(hair))
.Appearance.WithFacialHairStyleName(facialHair))
.Appearance.WithHairColor(color))
.Appearance.WithFacialHairColor(color));
profile.WithCharacterAppearance(
profile.WithCharacterAppearance(
profile.Appearance.WithHairStyleName(hair))
.Appearance.WithFacialHairStyleName(facialHair))
.Appearance.WithHairColor(color))
.Appearance.WithFacialHairColor(color));
_humanoid.LoadProfile(mob, profile);
_humanoid.LoadProfile(mob, profile);
_metaData.SetEntityName(mob, GetRandom(component.Name, ""));
_metaData.SetEntityName(mob, GetRandom(component.Name, ""));
}
_stationSpawning.EquipStartingGear(mob, gear);

View File

@@ -99,7 +99,7 @@ public sealed class PryingSystem : EntitySystem
// to be marked as handled.
return true;
return StartPry(target, user, null, 0.1f, out id); // hand-prying is much slower
return StartPry(target, user, null, 10f, out id); // hand-prying is much slower
}
private bool CanPry(EntityUid target, EntityUid user, out string? message, PryingComponent? comp = null)
@@ -133,7 +133,10 @@ public sealed class PryingSystem : EntitySystem
var modEv = new GetPryTimeModifierEvent(user);
RaiseLocalEvent(target, ref modEv);
var doAfterArgs = new DoAfterArgs(EntityManager, user, TimeSpan.FromSeconds(modEv.BaseTime * modEv.PryTimeModifier / toolModifier), new DoorPryDoAfterEvent(), target, target, tool)
var time = TimeSpan.FromSeconds(!TryComp<AirlockComponent>(target, out var airlock) || !airlock.Powered ? 0 : modEv.BaseTime * modEv.PryTimeModifier * toolModifier); // WD EDIT
var doAfterArgs = new DoAfterArgs(EntityManager, user, time, new DoorPryDoAfterEvent(), target, target, tool)
{
BreakOnDamage = true,
BreakOnMove = true,
@@ -166,7 +169,7 @@ public sealed class PryingSystem : EntitySystem
return;
}
if (args.Used != null && comp != null)
if (args.Used != null && comp != null && door.State is not DoorState.Closing and not DoorState.Opening)
{
_audioSystem.PlayPredicted(comp.UseSound, args.Used.Value, args.User);
}

View File

@@ -18,7 +18,7 @@ public sealed partial class ToolTileCompatibleComponent : Component
/// The time it takes to modify the tile.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public TimeSpan Delay = TimeSpan.FromSeconds(1);
public TimeSpan Delay = TimeSpan.FromSeconds(0);
/// <summary>
/// Whether or not the tile being modified must be unobstructed

View File

@@ -2,8 +2,8 @@ offer-item-empty-hand = У тебя в руках нет ничего, что т
offer-item-full-hand = Ваша рука занята
offer-item-try-give = Вы предлагаете {$item} {$target}
offer-item-try-give-target = {$user} предлагает вам {$item}
offer-item-give = Вы передали {THE($item)} {$target}
offer-item-give = Вы передали {$item} {$target}
offer-item-give-other = {$user} передал {$item} {$target}
offer-item-give-target = {$user} передал вам ($item)
offer-item-give-target = {$user} передал вам {$item}
offer-item-no-give = Вы прекращаете предлагать {$item} {$target}
offer-item-no-give-target = {$user} прекращает предлагать вам ($item)
offer-item-no-give-target = {$user} прекращает предлагать вам {$item}