[Fix] Хотфиксы пары вещей (#286)
* fix: педали теперь снова могут играть, если у них были выбраны фелиниды * fix: фикс спама от взаимодействия с цветками
This commit is contained in:
@@ -1109,7 +1109,11 @@ namespace Content.Client.Preferences.UI
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var species = _prototypeManager.EnumeratePrototypes<SpeciesPrototype>();
|
if (!_speciesList.Exists(x => x.ID == Profile.Species))
|
||||||
|
{
|
||||||
|
CSpeciesButton.Select(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
CSpeciesButton.Select(_speciesList.FindIndex(x => x.ID == Profile.Species));
|
CSpeciesButton.Select(_speciesList.FindIndex(x => x.ID == Profile.Species));
|
||||||
}
|
}
|
||||||
@@ -1321,20 +1325,19 @@ namespace Content.Client.Preferences.UI
|
|||||||
{
|
{
|
||||||
var allowedSpecies = new List<SpeciesPrototype>();
|
var allowedSpecies = new List<SpeciesPrototype>();
|
||||||
|
|
||||||
var rawSpecieList = _prototypeManager.EnumeratePrototypes<SpeciesPrototype>()
|
var rawSpecieList = _prototypeManager.EnumeratePrototypes<SpeciesPrototype>().Where(specie =>
|
||||||
.Where((specie) =>
|
{
|
||||||
|
switch (specie.RoundStart)
|
||||||
{
|
{
|
||||||
if (specie.RoundStart && (specie.SponsorOnly || specie.ForAdmins))
|
case true when specie.SponsorOnly || specie.ForAdmins:
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
}
|
case true:
|
||||||
else if (specie.RoundStart)
|
|
||||||
{
|
|
||||||
allowedSpecies.Add(specie);
|
allowedSpecies.Add(specie);
|
||||||
return false;
|
return false;
|
||||||
}
|
default:
|
||||||
return false;
|
return false;
|
||||||
}).ToList();
|
}
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
if (_sponsorsManager.TryGetInfo(out var sponsor))
|
if (_sponsorsManager.TryGetInfo(out var sponsor))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace Content.Shared.Plants
|
|||||||
if (args.Handled)
|
if (args.Handled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Rustle(uid, component);
|
Rustle(uid, component, args.User);
|
||||||
args.Handled = _stashSystem.TryHideItem(uid, args.User, args.Used);
|
args.Handled = _stashSystem.TryHideItem(uid, args.User, args.Used);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,24 +40,24 @@ namespace Content.Shared.Plants
|
|||||||
if (args.Handled)
|
if (args.Handled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Rustle(uid, component);
|
Rustle(uid, component, args.User);
|
||||||
|
|
||||||
var gotItem = _stashSystem.TryGetItem(uid, args.User);
|
var gotItem = _stashSystem.TryGetItem(uid, args.User);
|
||||||
if (!gotItem)
|
if (!gotItem)
|
||||||
{
|
{
|
||||||
var msg = Loc.GetString("potted-plant-hide-component-interact-hand-got-no-item-message");
|
var msg = Loc.GetString("potted-plant-hide-component-interact-hand-got-no-item-message");
|
||||||
_popupSystem.PopupEntity(msg, uid, args.User);
|
_popupSystem.PopupClient(msg, uid, args.User);
|
||||||
}
|
}
|
||||||
|
|
||||||
args.Handled = gotItem;
|
args.Handled = gotItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Rustle(EntityUid uid, PottedPlantHideComponent? component = null)
|
private void Rustle(EntityUid uid, PottedPlantHideComponent? component = null, EntityUid? user = null)
|
||||||
{
|
{
|
||||||
if (!Resolve(uid, ref component))
|
if (!Resolve(uid, ref component))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_audio.PlayPvs(component.RustleSound, uid, AudioParams.Default.WithVariation(0.25f));
|
_audio.PlayPredicted(component.RustleSound, uid, user, AudioParams.Default.WithVariation(0.25f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
bodyTypes:
|
bodyTypes:
|
||||||
- HumanNormal
|
- HumanNormal
|
||||||
sponsorOnly: true
|
sponsorOnly: true
|
||||||
forAmins: true
|
forAdmins: true
|
||||||
|
|
||||||
- type: markingPoints
|
- type: markingPoints
|
||||||
id: MobFelinidMarkingLimits
|
id: MobFelinidMarkingLimits
|
||||||
|
|||||||
Reference in New Issue
Block a user