Фиксы (#488)
* add material storage component to whitemoose * fix pickaxe inventory size * fix free sponsor only races * invisible aghost no longer visible in ghost warp menu * add migration for BoxTrashbag * fix make wizard admin verb * fixed wizard components swap and new wizard marks as wizard in ghost warp menu now * Stop eating food if you drop it (#29854) * Stop eating food if you drop it * woops, unused param * comments --------- Co-authored-by: plykiya <plykiya@protonmail.com> * Eating and Drinking Doafter Change (#30060) My lawyer told me to do this Co-authored-by: plykiya <plykiya@protonmail.com> * ActivatableUI tweaks (#27448) * ActivatableUI tweaks * EntGotRemovedFromContainerMessage * A * Revert "ActivatableUI tweaks (#27448)" This reverts commit 5b311c6fdbf77db6838bdcf9993b98272d4ebeac. * fix eating food from containers * fix double captain duffel * add bible for chaplain loadout * possible bad fix for double security headsets --------- Co-authored-by: Plykiya <58439124+Plykiya@users.noreply.github.com> Co-authored-by: plykiya <plykiya@protonmail.com> Co-authored-by: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
This commit is contained in:
@@ -462,6 +462,9 @@ namespace Content.Server.Ghost
|
|||||||
if (HasComp<GlobalAntagonistComponent>(entity))
|
if (HasComp<GlobalAntagonistComponent>(entity))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (TryComp<InvisibilityComponent>(entity, out var invisibilityComponent) && invisibilityComponent.Invisible)
|
||||||
|
continue;
|
||||||
|
|
||||||
var playerDepartmentId = _prototypeManager.Index<DepartmentPrototype>("Specific").ID;
|
var playerDepartmentId = _prototypeManager.Index<DepartmentPrototype>("Specific").ID;
|
||||||
var playerJobName = "Неизвестно";
|
var playerJobName = "Неизвестно";
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using Content.Shared.Chemistry.Reagent;
|
|||||||
using Content.Shared.Database;
|
using Content.Shared.Database;
|
||||||
using Content.Shared.DoAfter;
|
using Content.Shared.DoAfter;
|
||||||
using Content.Shared.FixedPoint;
|
using Content.Shared.FixedPoint;
|
||||||
|
using Content.Shared.Hands.EntitySystems;
|
||||||
using Content.Shared.IdentityManagement;
|
using Content.Shared.IdentityManagement;
|
||||||
using Content.Shared.Interaction;
|
using Content.Shared.Interaction;
|
||||||
using Content.Shared.Interaction.Events;
|
using Content.Shared.Interaction.Events;
|
||||||
@@ -47,6 +48,7 @@ public sealed class DrinkSystem : SharedDrinkSystem
|
|||||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||||
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
[Dependency] private readonly SharedAudioSystem _audio = default!;
|
||||||
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
|
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
|
||||||
|
[Dependency] private readonly SharedHandsSystem _hands = default!;
|
||||||
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
|
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
|
||||||
[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
|
[Dependency] private readonly SolutionContainerSystem _solutionContainer = default!;
|
||||||
[Dependency] private readonly StomachSystem _stomach = default!;
|
[Dependency] private readonly StomachSystem _stomach = default!;
|
||||||
@@ -155,6 +157,9 @@ public sealed class DrinkSystem : SharedDrinkSystem
|
|||||||
_appearance.SetData(uid, FoodVisuals.Visual, drainAvailable.Float(), appearance);
|
_appearance.SetData(uid, FoodVisuals.Visual, drainAvailable.Float(), appearance);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tries to feed the drink item to the target entity
|
||||||
|
/// </summary>
|
||||||
private bool TryDrink(EntityUid user, EntityUid target, DrinkComponent drink, EntityUid item)
|
private bool TryDrink(EntityUid user, EntityUid target, DrinkComponent drink, EntityUid item)
|
||||||
{
|
{
|
||||||
if (!HasComp<BodyComponent>(target))
|
if (!HasComp<BodyComponent>(target))
|
||||||
@@ -209,9 +214,9 @@ public sealed class DrinkSystem : SharedDrinkSystem
|
|||||||
BreakOnDamage = true,
|
BreakOnDamage = true,
|
||||||
MovementThreshold = 0.01f,
|
MovementThreshold = 0.01f,
|
||||||
DistanceThreshold = 1.0f,
|
DistanceThreshold = 1.0f,
|
||||||
// Mice and the like can eat without hands.
|
// do-after will stop if item is dropped when trying to feed someone else
|
||||||
// TODO maybe set this based on some CanEatWithoutHands event or component?
|
// or if the item started out in the user's own hands
|
||||||
NeedHand = forceDrink,
|
NeedHand = forceDrink || _hands.IsHolding(user, item),
|
||||||
};
|
};
|
||||||
|
|
||||||
_doAfter.TryStartDoAfter(doAfterEventArgs);
|
_doAfter.TryStartDoAfter(doAfterEventArgs);
|
||||||
|
|||||||
@@ -95,6 +95,9 @@ public sealed class FoodSystem : EntitySystem
|
|||||||
args.Handled = result.Handled;
|
args.Handled = result.Handled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tries to feed the food item to the target entity
|
||||||
|
/// </summary>
|
||||||
public (bool Success, bool Handled) TryFeed(EntityUid user, EntityUid target, EntityUid food, FoodComponent foodComp)
|
public (bool Success, bool Handled) TryFeed(EntityUid user, EntityUid target, EntityUid food, FoodComponent foodComp)
|
||||||
{
|
{
|
||||||
//Suppresses eating yourself and alive mobs
|
//Suppresses eating yourself and alive mobs
|
||||||
@@ -185,9 +188,9 @@ public sealed class FoodSystem : EntitySystem
|
|||||||
BreakOnDamage = true,
|
BreakOnDamage = true,
|
||||||
MovementThreshold = 0.01f,
|
MovementThreshold = 0.01f,
|
||||||
DistanceThreshold = MaxFeedDistance,
|
DistanceThreshold = MaxFeedDistance,
|
||||||
// Mice and the like can eat without hands.
|
// do-after will stop if item is dropped when trying to feed someone else
|
||||||
// TODO maybe set this based on some CanEatWithoutHands event or component?
|
// or if the item started out in the user's own hands
|
||||||
NeedHand = forceFeed,
|
NeedHand = forceFeed || _hands.IsHolding(user, food),
|
||||||
};
|
};
|
||||||
|
|
||||||
_doAfter.TryStartDoAfter(doAfterArgs);
|
_doAfter.TryStartDoAfter(doAfterArgs);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ using Content.Server.Mind;
|
|||||||
using Content.Server.Singularity.EntitySystems;
|
using Content.Server.Singularity.EntitySystems;
|
||||||
using Content.Server.Standing;
|
using Content.Server.Standing;
|
||||||
using Content.Server.Weapons.Ranged.Systems;
|
using Content.Server.Weapons.Ranged.Systems;
|
||||||
|
using Content.Shared._White.Antag;
|
||||||
using Content.Shared._White.BetrayalDagger;
|
using Content.Shared._White.BetrayalDagger;
|
||||||
using Content.Shared._White.Cult.Components;
|
using Content.Shared._White.Cult.Components;
|
||||||
using Content.Shared._White.Events;
|
using Content.Shared._White.Events;
|
||||||
@@ -184,6 +185,7 @@ public sealed class WizardSpellsSystem : EntitySystem
|
|||||||
SwapComponent<HeadRevolutionaryComponent>(uid, target);
|
SwapComponent<HeadRevolutionaryComponent>(uid, target);
|
||||||
SwapComponent<PentagramComponent>(uid, target);
|
SwapComponent<PentagramComponent>(uid, target);
|
||||||
SwapComponent<CultistComponent>(uid, target);
|
SwapComponent<CultistComponent>(uid, target);
|
||||||
|
SwapComponent<GlobalAntagonistComponent>(uid, target);
|
||||||
|
|
||||||
_mindSystem.TransferTo(mindId, target, mind: mind);
|
_mindSystem.TransferTo(mindId, target, mind: mind);
|
||||||
|
|
||||||
@@ -195,6 +197,10 @@ public sealed class WizardSpellsSystem : EntitySystem
|
|||||||
|
|
||||||
TransferAllMagicActions(uid, target);
|
TransferAllMagicActions(uid, target);
|
||||||
|
|
||||||
|
// This is bad, but EnsureComp cant copy variables
|
||||||
|
if (TryComp<GlobalAntagonistComponent>(target, out var globalAntagonistComponent))
|
||||||
|
globalAntagonistComponent.AntagonistPrototype = "globalAntagonistWizard";
|
||||||
|
|
||||||
_standing.TryLieDown(uid);
|
_standing.TryLieDown(uid);
|
||||||
_standing.TryLieDown(target);
|
_standing.TryLieDown(target);
|
||||||
|
|
||||||
@@ -947,24 +953,26 @@ public sealed class WizardSpellsSystem : EntitySystem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SwapComponent<T>(EntityUid uid1, EntityUid uid2) where T : Component, new()
|
private void SwapComponent<T>(EntityUid uidFrom, EntityUid uidTo) where T : Component, new()
|
||||||
{
|
{
|
||||||
var hasComp = HasComp<T>(uid1);
|
var hasComp = HasComp<T>(uidFrom);
|
||||||
var targetHasComp = HasComp<T>(uid2);
|
var targetHasComp = HasComp<T>(uidTo);
|
||||||
|
|
||||||
if (hasComp == targetHasComp)
|
if (hasComp == targetHasComp)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (hasComp)
|
if (hasComp)
|
||||||
{
|
{
|
||||||
EnsureComp<T>(uid2);
|
EnsureComp<T>(uidTo);
|
||||||
RemComp<T>(uid1);
|
RemComp<T>(uidFrom);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (targetHasComp)
|
if (!targetHasComp)
|
||||||
{
|
{
|
||||||
EnsureComp<T>(uid1);
|
EnsureComp<T>(uidFrom);
|
||||||
RemComp<T>(uid2);
|
RemComp<T>(uidTo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -439,7 +439,7 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
|||||||
if (HasComp<WizardComponent>(uid))
|
if (HasComp<WizardComponent>(uid))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
MakeWizard(uid, rule, true);
|
MakeWizard(uid, rule);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool MakeWizard(EntityUid wizard, WizardRuleComponent rule,
|
private bool MakeWizard(EntityUid wizard, WizardRuleComponent rule,
|
||||||
@@ -468,7 +468,7 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!SpawnMap((wizard, rule)))
|
if (!SpawnMap((rule.Owner, rule)))
|
||||||
{
|
{
|
||||||
_sawmill.Info("Failed to load shuttle for wizard");
|
_sawmill.Info("Failed to load shuttle for wizard");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -227,9 +227,17 @@ public abstract partial class SharedHandsSystem
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsHolding(EntityUid uid, EntityUid? entity, [NotNullWhen(true)] out Hand? inHand, HandsComponent? handsComp = null)
|
public bool IsHolding(Entity<HandsComponent?> entity, [NotNullWhen(true)] EntityUid? item)
|
||||||
|
{
|
||||||
|
return IsHolding(entity, item, out _, entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsHolding(EntityUid uid, [NotNullWhen(true)] EntityUid? entity, [NotNullWhen(true)] out Hand? inHand, HandsComponent? handsComp = null)
|
||||||
{
|
{
|
||||||
inHand = null;
|
inHand = null;
|
||||||
|
if (entity == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!Resolve(uid, ref handsComp, false))
|
if (!Resolve(uid, ref handsComp, false))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -241,7 +249,6 @@ public abstract partial class SharedHandsSystem
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -201,16 +201,31 @@ namespace Content.Shared.Preferences
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This should eventually not be a visual change only.
|
// TODO: This should eventually not be a visual change only.
|
||||||
public static HumanoidCharacterProfile Random(HashSet<string>? ignoredSpecies = null)
|
public static HumanoidCharacterProfile Random(HashSet<string>? ignoredSpecies = null, bool includeSponsor = false)
|
||||||
{
|
{
|
||||||
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
|
var prototypeManager = IoCManager.Resolve<IPrototypeManager>();
|
||||||
var random = IoCManager.Resolve<IRobustRandom>();
|
var random = IoCManager.Resolve<IRobustRandom>();
|
||||||
|
|
||||||
|
// WD edit - fix free sponsor species
|
||||||
|
var speciesToIgnore = ignoredSpecies != null
|
||||||
|
? new HashSet<string>(ignoredSpecies)
|
||||||
|
: new HashSet<string>();
|
||||||
|
|
||||||
|
if (!includeSponsor)
|
||||||
|
{
|
||||||
|
var sponsorSpecies = prototypeManager.EnumeratePrototypes<SpeciesPrototype>()
|
||||||
|
.Where(x => x.SponsorOnly)
|
||||||
|
.Select(x => x.ID);
|
||||||
|
|
||||||
|
speciesToIgnore.UnionWith(sponsorSpecies);
|
||||||
|
}
|
||||||
|
|
||||||
var species = random.Pick(prototypeManager
|
var species = random.Pick(prototypeManager
|
||||||
.EnumeratePrototypes<SpeciesPrototype>()
|
.EnumeratePrototypes<SpeciesPrototype>()
|
||||||
.Where(x => ignoredSpecies == null ? x.RoundStart : x.RoundStart && !ignoredSpecies.Contains(x.ID))
|
.Where(x => !x.SponsorOnly && x.RoundStart && !speciesToIgnore.Contains(x.ID))
|
||||||
.ToArray()
|
.ToArray()
|
||||||
).ID;
|
).ID;
|
||||||
|
// WD edit end
|
||||||
|
|
||||||
return RandomWithSpecies(species);
|
return RandomWithSpecies(species);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9545,6 +9545,7 @@ entities:
|
|||||||
- type: NavMap
|
- type: NavMap
|
||||||
- type: BecomesStation
|
- type: BecomesStation
|
||||||
id: WhiteMooseStation
|
id: WhiteMooseStation
|
||||||
|
- type: MaterialStorage
|
||||||
- uid: 3058
|
- uid: 3058
|
||||||
components:
|
components:
|
||||||
- type: MetaData
|
- type: MetaData
|
||||||
@@ -77108,7 +77109,7 @@ entities:
|
|||||||
- stampedColor: '#006600FF'
|
- stampedColor: '#006600FF'
|
||||||
stampedName: stamp-component-stamped-name-centcom
|
stampedName: stamp-component-stamped-name-centcom
|
||||||
content: >-
|
content: >-
|
||||||
Совместная работа отделов повышает эффективность всех сотрудников. Попроси помощи и помоги другим и увидишь, как тебе проще стало летать в космос. Грабеж и хамство последнее, что ты должен делать.
|
Совместная работа отделов повышает эффективность всех сотрудников. Попроси помощи и помоги другим и увидишь, как тебе проще стало летать в космос. Грабеж и хамство последнее, что ты должен делать.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
size: Normal
|
size: Normal
|
||||||
shape:
|
shape:
|
||||||
- 0,0,2,0
|
- 0,0,2,0
|
||||||
- 1,1,1,2
|
- 1,1,1,1
|
||||||
sprite: Objects/Weapons/Melee/pickaxe.rsi
|
sprite: Objects/Weapons/Melee/pickaxe.rsi
|
||||||
storedRotation: -45
|
storedRotation: -45
|
||||||
- type: UseDelay
|
- type: UseDelay
|
||||||
|
|||||||
@@ -195,6 +195,15 @@
|
|||||||
back:
|
back:
|
||||||
- ArmamentsBeacon
|
- ArmamentsBeacon
|
||||||
|
|
||||||
|
- type: itemLoadout # WD
|
||||||
|
id: Bible
|
||||||
|
equipment: Bible
|
||||||
|
- type: startingGear
|
||||||
|
id: Bible
|
||||||
|
storage:
|
||||||
|
back:
|
||||||
|
- Bible
|
||||||
|
|
||||||
# PDA
|
# PDA
|
||||||
|
|
||||||
- type: itemLoadout # WD
|
- type: itemLoadout # WD
|
||||||
|
|||||||
@@ -67,7 +67,6 @@
|
|||||||
- CaptainBackpack
|
- CaptainBackpack
|
||||||
- CaptainSatchel
|
- CaptainSatchel
|
||||||
- CaptainDuffel
|
- CaptainDuffel
|
||||||
- CaptainDuffel
|
|
||||||
- CommonSatchelLeather # WD
|
- CommonSatchelLeather # WD
|
||||||
|
|
||||||
- type: loadoutGroup
|
- type: loadoutGroup
|
||||||
@@ -374,8 +373,11 @@
|
|||||||
- type: loadoutGroup # WD edit
|
- type: loadoutGroup # WD edit
|
||||||
id: ChaplainJobTrinkets
|
id: ChaplainJobTrinkets
|
||||||
name: loadout-group-job-trinkets
|
name: loadout-group-job-trinkets
|
||||||
|
minLimit: 2
|
||||||
|
maxLimit: 2
|
||||||
loadouts:
|
loadouts:
|
||||||
- ArmamentsBeacon
|
- ArmamentsBeacon
|
||||||
|
- Bible
|
||||||
|
|
||||||
- type: loadoutGroup
|
- type: loadoutGroup
|
||||||
id: ChaplainPDA
|
id: ChaplainPDA
|
||||||
@@ -1590,12 +1592,6 @@
|
|||||||
- BlackTie
|
- BlackTie
|
||||||
- RedTie
|
- RedTie
|
||||||
|
|
||||||
- type: loadoutGroup # WD
|
|
||||||
id: CommonSecurityHeadset
|
|
||||||
name: loadout-group-ears
|
|
||||||
loadouts:
|
|
||||||
- SecurityHeadset
|
|
||||||
|
|
||||||
- type: loadoutGroup # WD
|
- type: loadoutGroup # WD
|
||||||
id: CommonSecurityCommandHeadset
|
id: CommonSecurityCommandHeadset
|
||||||
name: loadout-group-ears
|
name: loadout-group-ears
|
||||||
|
|||||||
@@ -267,3 +267,5 @@ ComfyChairEngineering: OrangeComfyChair
|
|||||||
ComfyChairScience: PurpleComfyChair
|
ComfyChairScience: PurpleComfyChair
|
||||||
ComfyChairCargo: BrownComfyChair
|
ComfyChairCargo: BrownComfyChair
|
||||||
ComfyChairService: GreenComfyChair
|
ComfyChairService: GreenComfyChair
|
||||||
|
|
||||||
|
BoxTrashbag: TrashBag
|
||||||
|
|||||||
Reference in New Issue
Block a user