@@ -283,30 +283,35 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
|||||||
private HumanoidCharacterProfile SetupWizardEntity(
|
private HumanoidCharacterProfile SetupWizardEntity(
|
||||||
EntityUid mob,
|
EntityUid mob,
|
||||||
StartingGearPrototype gear,
|
StartingGearPrototype gear,
|
||||||
bool endRoundOnDeath)
|
bool endRoundOnDeath,
|
||||||
|
bool randomPtofile = true)
|
||||||
{
|
{
|
||||||
EnsureComp<WizardComponent>(mob, out var component);
|
EnsureComp<WizardComponent>(mob, out var component);
|
||||||
component.EndRoundOnDeath = endRoundOnDeath;
|
component.EndRoundOnDeath = endRoundOnDeath;
|
||||||
EnsureComp<GlobalAntagonistComponent>(mob).AntagonistPrototype = "globalAntagonistWizard";
|
EnsureComp<GlobalAntagonistComponent>(mob).AntagonistPrototype = "globalAntagonistWizard";
|
||||||
|
|
||||||
var random = IoCManager.Resolve<IRobustRandom>();
|
if (randomPtofile)
|
||||||
var profile = HumanoidCharacterProfile.RandomWithSpecies().WithAge(random.Next(component.MinAge, component.MaxAge));
|
{
|
||||||
|
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 color = Color.FromHex(GetRandom(component.Color, "#B5B8B1"));
|
||||||
var hair = GetRandom(component.Hair, "HumanHairAfricanPigtails");
|
var hair = GetRandom(component.Hair, "HumanHairAfricanPigtails");
|
||||||
var facialHair = GetRandom(component.FacialHair, "HumanFacialHairAbe");
|
var facialHair = GetRandom(component.FacialHair, "HumanFacialHairAbe");
|
||||||
profile = profile.WithCharacterAppearance(
|
profile = profile.WithCharacterAppearance(
|
||||||
profile.WithCharacterAppearance(
|
|
||||||
profile.WithCharacterAppearance(
|
profile.WithCharacterAppearance(
|
||||||
profile.WithCharacterAppearance(
|
profile.WithCharacterAppearance(
|
||||||
profile.Appearance.WithHairStyleName(hair))
|
profile.WithCharacterAppearance(
|
||||||
.Appearance.WithFacialHairStyleName(facialHair))
|
profile.Appearance.WithHairStyleName(hair))
|
||||||
.Appearance.WithHairColor(color))
|
.Appearance.WithFacialHairStyleName(facialHair))
|
||||||
.Appearance.WithFacialHairColor(color));
|
.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);
|
_stationSpawning.EquipStartingGear(mob, gear);
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ public sealed class PryingSystem : EntitySystem
|
|||||||
// to be marked as handled.
|
// to be marked as handled.
|
||||||
return true;
|
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)
|
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);
|
var modEv = new GetPryTimeModifierEvent(user);
|
||||||
|
|
||||||
RaiseLocalEvent(target, ref modEv);
|
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,
|
BreakOnDamage = true,
|
||||||
BreakOnMove = true,
|
BreakOnMove = true,
|
||||||
@@ -166,7 +169,7 @@ public sealed class PryingSystem : EntitySystem
|
|||||||
return;
|
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);
|
_audioSystem.PlayPredicted(comp.UseSound, args.Used.Value, args.User);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public sealed partial class ToolTileCompatibleComponent : Component
|
|||||||
/// The time it takes to modify the tile.
|
/// The time it takes to modify the tile.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
||||||
public TimeSpan Delay = TimeSpan.FromSeconds(1);
|
public TimeSpan Delay = TimeSpan.FromSeconds(0);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether or not the tile being modified must be unobstructed
|
/// Whether or not the tile being modified must be unobstructed
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ offer-item-empty-hand = У тебя в руках нет ничего, что т
|
|||||||
offer-item-full-hand = Ваша рука занята
|
offer-item-full-hand = Ваша рука занята
|
||||||
offer-item-try-give = Вы предлагаете {$item} {$target}
|
offer-item-try-give = Вы предлагаете {$item} {$target}
|
||||||
offer-item-try-give-target = {$user} предлагает вам {$item}
|
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-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 = Вы прекращаете предлагать {$item} {$target}
|
||||||
offer-item-no-give-target = {$user} прекращает предлагать вам ($item)
|
offer-item-no-give-target = {$user} прекращает предлагать вам {$item}
|
||||||
Reference in New Issue
Block a user