Changeling fixes (#23)

* - fix: Fix changeling popups

* - fix: Fix secret weights

* - tweak: Change tentacle arm default firing mode

* - tweak: Change armblade hit sound
This commit is contained in:
Aviu00
2024-02-03 19:53:28 +09:00
committed by GitHub
parent 16dcf8844f
commit 460201935d
4 changed files with 31 additions and 29 deletions

View File

@@ -119,43 +119,43 @@ public sealed partial class ChangelingSystem
{ {
if (!HasComp<HumanoidAppearanceComponent>(args.Target)) if (!HasComp<HumanoidAppearanceComponent>(args.Target))
{ {
_popup.PopupEntity("You can't absorb not humans!", args.Performer); _popup.PopupEntity("You can't absorb not humans!", args.Performer, args.Performer);
return; return;
} }
if (HasComp<AbsorbedComponent>(args.Target)) if (HasComp<AbsorbedComponent>(args.Target))
{ {
_popup.PopupEntity("This person already absorbed!", args.Performer); _popup.PopupEntity("This person already absorbed!", args.Performer, args.Performer);
return; return;
} }
if (!TryComp<DnaComponent>(args.Target, out var dnaComponent)) if (!TryComp<DnaComponent>(args.Target, out var dnaComponent))
{ {
_popup.PopupEntity("Unknown creature!", uid); _popup.PopupEntity("Unknown creature!", uid, uid);
return; return;
} }
if (component.AbsorbedEntities.ContainsKey(dnaComponent.DNA)) if (component.AbsorbedEntities.ContainsKey(dnaComponent.DNA))
{ {
_popup.PopupEntity("This DNA already absorbed!", uid); _popup.PopupEntity("This DNA already absorbed!", uid, uid);
return; return;
} }
if (!_stateSystem.IsDown(args.Target)) if (!_stateSystem.IsDown(args.Target))
{ {
_popup.PopupEntity("Target must be down!", args.Performer); _popup.PopupEntity("Target must be down!", args.Performer, args.Performer);
return; return;
} }
if (!TryComp<SharedPullableComponent>(args.Target, out var pulled)) if (!TryComp<SharedPullableComponent>(args.Target, out var pulled))
{ {
_popup.PopupEntity("You must pull target!", args.Performer); _popup.PopupEntity("You must pull target!", args.Performer, args.Performer);
return; return;
} }
if (!pulled.BeingPulled) if (!pulled.BeingPulled)
{ {
_popup.PopupEntity("You must pull target!", args.Performer); _popup.PopupEntity("You must pull target!", args.Performer, args.Performer);
return; return;
} }
@@ -175,7 +175,7 @@ public sealed partial class ChangelingSystem
if (component.AbsorbedEntities.Count <= 1 && !component.IsLesserForm) if (component.AbsorbedEntities.Count <= 1 && !component.IsLesserForm)
{ {
_popup.PopupEntity("You don't have any persons to transform!", uid); _popup.PopupEntity("You don't have any persons to transform!", uid, uid);
return; return;
} }
@@ -233,7 +233,7 @@ public sealed partial class ChangelingSystem
KillUser(uid, "Cellular"); KillUser(uid, "Cellular");
} }
_popup.PopupEntity("We beginning our regeneration.", uid); _popup.PopupEntity("We beginning our regeneration.", uid, uid);
_doAfterSystem.TryStartDoAfter( _doAfterSystem.TryStartDoAfter(
new DoAfterArgs(EntityManager, args.Performer, component.RegenerateDelay, new DoAfterArgs(EntityManager, args.Performer, component.RegenerateDelay,
@@ -250,13 +250,13 @@ public sealed partial class ChangelingSystem
{ {
if (_mobStateSystem.IsDead(uid) || component.IsRegenerating) if (_mobStateSystem.IsDead(uid) || component.IsRegenerating)
{ {
_popup.PopupEntity("We can do this right now!", uid); _popup.PopupEntity("We can do this right now!", uid, uid);
return; return;
} }
if (component.IsLesserForm) if (component.IsLesserForm)
{ {
_popup.PopupEntity("We're already in the lesser form!", uid); _popup.PopupEntity("We're already in the lesser form!", uid, uid);
return; return;
} }
@@ -271,7 +271,7 @@ public sealed partial class ChangelingSystem
{ {
if (!HasComp<HumanoidAppearanceComponent>(args.Target)) if (!HasComp<HumanoidAppearanceComponent>(args.Target))
{ {
_popup.PopupEntity("We can't transform that!", args.Performer); _popup.PopupEntity("We can't transform that!", args.Performer, args.Performer);
return; return;
} }
@@ -280,7 +280,7 @@ public sealed partial class ChangelingSystem
if (component.AbsorbedEntities.Count < 1) if (component.AbsorbedEntities.Count < 1)
{ {
_popup.PopupEntity("You don't have any persons to transform!", uid); _popup.PopupEntity("You don't have any persons to transform!", uid, uid);
return; return;
} }
@@ -313,7 +313,7 @@ public sealed partial class ChangelingSystem
if (HasComp<ChangelingComponent>(target)) if (HasComp<ChangelingComponent>(target))
{ {
_popup.PopupEntity("Transform virus was ineffective!", user); _popup.PopupEntity("Transform virus was ineffective!", user, user);
return; return;
} }
@@ -336,7 +336,7 @@ public sealed partial class ChangelingSystem
if (!HasComp<HumanoidAppearanceComponent>(args.Target) || if (!HasComp<HumanoidAppearanceComponent>(args.Target) ||
!HasComp<BlindableComponent>(args.Target)) !HasComp<BlindableComponent>(args.Target))
{ {
_popup.PopupEntity("We cannot sting that!", uid); _popup.PopupEntity("We cannot sting that!", uid, uid);
return; return;
} }
@@ -354,7 +354,7 @@ public sealed partial class ChangelingSystem
{ {
if (!HasComp<HumanoidAppearanceComponent>(args.Target)) if (!HasComp<HumanoidAppearanceComponent>(args.Target))
{ {
_popup.PopupEntity("We cannot sting that!", uid); _popup.PopupEntity("We cannot sting that!", uid, uid);
return; return;
} }
@@ -372,7 +372,7 @@ public sealed partial class ChangelingSystem
{ {
if (!HasComp<HumanoidAppearanceComponent>(args.Target)) if (!HasComp<HumanoidAppearanceComponent>(args.Target))
{ {
_popup.PopupEntity("We cannot sting that!", uid); _popup.PopupEntity("We cannot sting that!", uid, uid);
return; return;
} }
@@ -390,7 +390,7 @@ public sealed partial class ChangelingSystem
{ {
if (!HasComp<HumanoidAppearanceComponent>(args.Target)) if (!HasComp<HumanoidAppearanceComponent>(args.Target))
{ {
_popup.PopupEntity("We cannot sting that!", uid); _popup.PopupEntity("We cannot sting that!", uid, uid);
return; return;
} }
@@ -568,7 +568,7 @@ public sealed partial class ChangelingSystem
if (HasComp<AbsorbedComponent>(args.Target)) if (HasComp<AbsorbedComponent>(args.Target))
{ {
_popup.PopupEntity("You're lost.", args.Target.Value); _popup.PopupEntity("You're lost.", args.Target.Value, args.Target.Value);
component.IsRegenerating = false; component.IsRegenerating = false;
return; return;
} }
@@ -578,7 +578,7 @@ public sealed partial class ChangelingSystem
_rejuvenate.PerformRejuvenate(args.Target.Value); _rejuvenate.PerformRejuvenate(args.Target.Value);
_popup.PopupEntity("We're fully regenerated!", args.Target.Value); _popup.PopupEntity("We're fully regenerated!", args.Target.Value, args.Target.Value);
component.IsRegenerating = false; component.IsRegenerating = false;
@@ -823,7 +823,7 @@ public sealed partial class ChangelingSystem
if (!_handsSystem.TryGetEmptyHand(target, out var hand)) if (!_handsSystem.TryGetEmptyHand(target, out var hand))
{ {
_popup.PopupEntity("We need to have at least one empty hand!", target); _popup.PopupEntity("We need to have at least one empty hand!", target, target);
return; return;
} }
@@ -839,11 +839,11 @@ public sealed partial class ChangelingSystem
{ {
if (!_chemicalsSystem.RemoveChemicals(uid, component, quantity)) if (!_chemicalsSystem.RemoveChemicals(uid, component, quantity))
{ {
_popup.PopupEntity("We're lacking of chemicals!", uid); _popup.PopupEntity("We're lacking of chemicals!", uid, uid);
return false; return false;
} }
_popup.PopupEntity($"Used {quantity} of chemicals.", uid); _popup.PopupEntity($"Used {quantity} of chemicals.", uid, uid);
return true; return true;
} }

View File

@@ -271,7 +271,7 @@
- type: Gun - type: Gun
soundGunshot: /Audio/Effects/gib1.ogg soundGunshot: /Audio/Effects/gib1.ogg
fireRate: 0.3 fireRate: 0.3
selectedMode: PullItem selectedMode: PullMob
availableModes: availableModes:
- PullItem - PullItem
- PullMob - PullMob

View File

@@ -15,6 +15,8 @@
types: types:
Slash: 25 Slash: 25
Piercing: 15 Piercing: 15
soundHit:
path: /Audio/Weapons/bladeslice.ogg
- type: Item - type: Item
size: Normal size: Normal
sprite: Objects/Weapons/Melee/armblade.rsi sprite: Objects/Weapons/Melee/armblade.rsi

View File

@@ -1,10 +1,10 @@
- type: weightedRandom - type: weightedRandom
id: Secret id: Secret
weights: weights:
Traitor: 0.40 Traitor: 0.30
Nukeops: 0.20 Changeling: 0.25
Cult: 0.20 Nukeops: 0.15
Revolutionary: 0.10 Cult: 0.15
Revolutionary: 0.05
Zombie: 0.05 Zombie: 0.05
Survival: 0.05 Survival: 0.05
Changeling: 0.30