Let species prototypes define valid sexes (Sex Refactor) (#11520)
This commit is contained in:
@@ -67,9 +67,7 @@ public sealed class VocalSystem : EntitySystem
|
||||
if (!_blocker.CanSpeak(uid))
|
||||
return false;
|
||||
|
||||
var sex = Sex.Male; //the default is male because requiring humanoid appearance for this is dogshit
|
||||
if (TryComp(uid, out HumanoidComponent? humanoid))
|
||||
sex = humanoid.Sex;
|
||||
var sex = CompOrNull<HumanoidComponent>(uid)?.Sex ?? Sex.Unsexed;
|
||||
|
||||
if (_random.Prob(component.WilhelmProbability))
|
||||
{
|
||||
@@ -89,7 +87,8 @@ public sealed class VocalSystem : EntitySystem
|
||||
SoundSystem.Play(component.FemaleScream.GetSound(), Filter.Pvs(uid), uid, pitchedParams);
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
SoundSystem.Play(component.UnsexedScream.GetSound(), Filter.Pvs(uid), uid, pitchedParams);
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user