Фиксы (#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:
@@ -20,6 +20,7 @@ using Content.Server.Mind;
|
||||
using Content.Server.Singularity.EntitySystems;
|
||||
using Content.Server.Standing;
|
||||
using Content.Server.Weapons.Ranged.Systems;
|
||||
using Content.Shared._White.Antag;
|
||||
using Content.Shared._White.BetrayalDagger;
|
||||
using Content.Shared._White.Cult.Components;
|
||||
using Content.Shared._White.Events;
|
||||
@@ -184,6 +185,7 @@ public sealed class WizardSpellsSystem : EntitySystem
|
||||
SwapComponent<HeadRevolutionaryComponent>(uid, target);
|
||||
SwapComponent<PentagramComponent>(uid, target);
|
||||
SwapComponent<CultistComponent>(uid, target);
|
||||
SwapComponent<GlobalAntagonistComponent>(uid, target);
|
||||
|
||||
_mindSystem.TransferTo(mindId, target, mind: mind);
|
||||
|
||||
@@ -195,6 +197,10 @@ public sealed class WizardSpellsSystem : EntitySystem
|
||||
|
||||
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(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 targetHasComp = HasComp<T>(uid2);
|
||||
var hasComp = HasComp<T>(uidFrom);
|
||||
var targetHasComp = HasComp<T>(uidTo);
|
||||
|
||||
if (hasComp == targetHasComp)
|
||||
return;
|
||||
|
||||
if (hasComp)
|
||||
{
|
||||
EnsureComp<T>(uid2);
|
||||
RemComp<T>(uid1);
|
||||
EnsureComp<T>(uidTo);
|
||||
RemComp<T>(uidFrom);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (targetHasComp)
|
||||
if (!targetHasComp)
|
||||
{
|
||||
EnsureComp<T>(uid1);
|
||||
RemComp<T>(uid2);
|
||||
EnsureComp<T>(uidFrom);
|
||||
RemComp<T>(uidTo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -439,7 +439,7 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
||||
if (HasComp<WizardComponent>(uid))
|
||||
return;
|
||||
|
||||
MakeWizard(uid, rule, true);
|
||||
MakeWizard(uid, rule);
|
||||
}
|
||||
|
||||
private bool MakeWizard(EntityUid wizard, WizardRuleComponent rule,
|
||||
@@ -468,7 +468,7 @@ public sealed class WizardRuleSystem : GameRuleSystem<WizardRuleComponent>
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!SpawnMap((wizard, rule)))
|
||||
if (!SpawnMap((rule.Owner, rule)))
|
||||
{
|
||||
_sawmill.Info("Failed to load shuttle for wizard");
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user