mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-16 21:17:39 +03:00
Gladiabot Tweaks (#1717)
Signed-off-by: stellar-novas <stellar_novas@riseup.net> (cherry picked from commit b3c27808a6cb00dec49d42e24f6a23b1da37d7c9)
This commit is contained in:
@@ -23,6 +23,10 @@ public sealed partial class NpcFactionSpriteStateSetterSystem : EntitySystem
|
||||
return;
|
||||
|
||||
SpriteComponent spriteComponent = _entityManager.GetComponent<SpriteComponent>(entity);
|
||||
spriteComponent.LayerSetState(0, new Robust.Client.Graphics.RSI.StateId(args.FactionID));
|
||||
|
||||
var rsi = spriteComponent.LayerGetActualRSI(0);
|
||||
|
||||
if(rsi != null && rsi.TryGetState(args.FactionID, out _))
|
||||
spriteComponent.LayerSetState(0, new Robust.Client.Graphics.RSI.StateId(args.FactionID));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,12 @@ public sealed partial class EmagReplaceFactionsComponent : Component
|
||||
[DataField(required: false)]
|
||||
public int StunSeconds = 5;
|
||||
|
||||
/// <summary>
|
||||
/// Should the component add factions to the existing list of factions instead of replacing them?
|
||||
/// </summary>
|
||||
[DataField(required:false)]
|
||||
public bool Additive = false;
|
||||
|
||||
/// <summary>
|
||||
/// Factions to replace from the original set.
|
||||
/// </summary>
|
||||
|
||||
@@ -40,7 +40,9 @@ public sealed class EmagReplaceFactionsSystem : EntitySystem
|
||||
newFactions.Add(comp.Factions[i]);
|
||||
}
|
||||
|
||||
_npcFactionSystem.ClearFactions(uid, false);
|
||||
if(!comp.Additive)
|
||||
_npcFactionSystem.ClearFactions(uid, false);
|
||||
|
||||
_npcFactionSystem.AddFactions(uid, newFactions);
|
||||
|
||||
if(comp.StunSeconds > 0)
|
||||
|
||||
@@ -33,6 +33,10 @@
|
||||
- GladiabotBlue
|
||||
- GladiabotGreen
|
||||
- GladiabotYellow
|
||||
- type: EmagReplaceFactions
|
||||
additive: true
|
||||
factions:
|
||||
- Syndicate
|
||||
- type: NpcFactionSpriteStateSetter
|
||||
- type: CombatMode
|
||||
- type: MeleeWeapon
|
||||
|
||||
@@ -7,6 +7,11 @@
|
||||
- PetsNT
|
||||
- Zombie
|
||||
- Revolutionary
|
||||
- GladiabotFFA
|
||||
- GladiabotRed
|
||||
- GladiabotGreen
|
||||
- GladiabotBlue
|
||||
- GladiabotYellow
|
||||
|
||||
- type: npcFaction
|
||||
id: NanoTrasen
|
||||
@@ -16,6 +21,7 @@
|
||||
- Xeno
|
||||
- Zombie
|
||||
- Revolutionary
|
||||
- Dragon
|
||||
|
||||
- type: npcFaction
|
||||
id: Mouse
|
||||
@@ -45,6 +51,11 @@
|
||||
- Zombie
|
||||
- Revolutionary
|
||||
- GeometerOfBlood
|
||||
- GladiabotFFA
|
||||
- GladiabotRed
|
||||
- GladiabotGreen
|
||||
- GladiabotBlue
|
||||
- GladiabotYellow
|
||||
|
||||
- type: npcFaction
|
||||
id: SimpleNeutral
|
||||
@@ -67,6 +78,11 @@
|
||||
- PetsNT
|
||||
- Zombie
|
||||
- Revolutionary
|
||||
- GladiabotFFA
|
||||
- GladiabotRed
|
||||
- GladiabotGreen
|
||||
- GladiabotBlue
|
||||
- GladiabotYellow
|
||||
|
||||
- type: npcFaction
|
||||
id: Zombie
|
||||
@@ -78,6 +94,11 @@
|
||||
- Passive
|
||||
- PetsNT
|
||||
- Revolutionary
|
||||
- GladiabotFFA
|
||||
- GladiabotRed
|
||||
- GladiabotGreen
|
||||
- GladiabotBlue
|
||||
- GladiabotYellow
|
||||
|
||||
- type: npcFaction
|
||||
id: Revolutionary
|
||||
@@ -119,6 +140,10 @@
|
||||
- GladiabotGreen
|
||||
- GladiabotBlue
|
||||
- GladiabotYellow
|
||||
- SimpleHostile
|
||||
- Xeno
|
||||
- Zombie
|
||||
- Dragon
|
||||
|
||||
- type: npcFaction
|
||||
id: GladiabotRed
|
||||
@@ -127,6 +152,10 @@
|
||||
- GladiabotGreen
|
||||
- GladiabotBlue
|
||||
- GladiabotYellow
|
||||
- SimpleHostile
|
||||
- Xeno
|
||||
- Zombie
|
||||
- Dragon
|
||||
|
||||
- type: npcFaction
|
||||
id: GladiabotGreen
|
||||
@@ -135,6 +164,10 @@
|
||||
- GladiabotRed
|
||||
- GladiabotBlue
|
||||
- GladiabotYellow
|
||||
- SimpleHostile
|
||||
- Xeno
|
||||
- Zombie
|
||||
- Dragon
|
||||
|
||||
- type: npcFaction
|
||||
id: GladiabotBlue
|
||||
@@ -143,6 +176,10 @@
|
||||
- GladiabotRed
|
||||
- GladiabotGreen
|
||||
- GladiabotYellow
|
||||
- SimpleHostile
|
||||
- Xeno
|
||||
- Zombie
|
||||
- Dragon
|
||||
|
||||
- type: npcFaction
|
||||
id: GladiabotYellow
|
||||
@@ -151,3 +188,7 @@
|
||||
- GladiabotRed
|
||||
- GladiabotGreen
|
||||
- GladiabotBlue
|
||||
- SimpleHostile
|
||||
- Xeno
|
||||
- Zombie
|
||||
- Dragon
|
||||
|
||||
Reference in New Issue
Block a user