|
5 | 5 | namespace Game.Server; |
6 | 6 |
|
7 | 7 | [LinkEntityToClass("func_breakable")] |
8 | | -public class Breakable : BaseEntity, IBreakableWithPropData; |
| 8 | +public class Breakable : BaseEntity, IBreakableWithPropData |
| 9 | +{ |
| 10 | + public void SetDmgModBullet(float dmgMod) => DmgModBullet = dmgMod; |
| 11 | + public void SetDmgModClub(float dmgMod) => DmgModClub = dmgMod; |
| 12 | + public void SetDmgModExplosive(float dmgMod) => DmgModExplosive = dmgMod; |
| 13 | + public float GetDmgModBullet() => DmgModBullet; |
| 14 | + public float GetDmgModClub() => DmgModClub; |
| 15 | + public float GetDmgModExplosive() => DmgModExplosive; |
| 16 | + public void SetExplosiveRadius(float radius) => ExplodeRadius = radius; |
| 17 | + public void SetExplosiveDamage(float damage) => ExplosionMagnitude = (int)damage; |
| 18 | + public float GetExplosiveRadius() => ExplodeRadius; |
| 19 | + public float GetExplosiveDamage() => ExplosionMagnitude; |
| 20 | + public void SetPhysicsDamageTable(ReadOnlySpan<char> tableName) => PhysicsDamageTableName = tableName.IsEmpty ? null : new(tableName); |
| 21 | + public ReadOnlySpan<char> GetPhysicsDamageTable() => PhysicsDamageTableName; |
| 22 | + public void SetBreakableModel(ReadOnlySpan<char> model) => BreakableModel = model.IsEmpty ? null : new(model); |
| 23 | + public ReadOnlySpan<char> GetBreakableModel() => BreakableModel; |
| 24 | + public void SetBreakableSkin(int skin) => BreakableSkin = skin; |
| 25 | + public int GetBreakableSkin() => BreakableSkin; |
| 26 | + public void SetBreakableCount(int count) => BreakableCount = count; |
| 27 | + public int GetBreakableCount() => BreakableCount; |
| 28 | + public void SetMaxBreakableSize(int size) => MaxBreakableSize = size; |
| 29 | + public int GetMaxBreakableSize() => MaxBreakableSize; |
| 30 | + public void SetPropDataBlocksLOS(bool blocksLOS) => SetBlocksLOS(blocksLOS); |
| 31 | + public void SetPropDataIsAIWalkable(bool blocksLOS) => SetAIWalkable(blocksLOS); |
| 32 | + public void SetBasePropData(ReadOnlySpan<char> propdata) => BasePropData = propdata.IsEmpty ? null : new(propdata); |
| 33 | + public ReadOnlySpan<char> GetBasePropData() => BasePropData; |
| 34 | + public void SetInteraction(PropDataInteractions interaction) => Interactions |= (1 << (int)interaction); |
| 35 | + public bool HasInteraction(PropDataInteractions interaction) => (Interactions & (1 << (int)interaction)) != 0; |
| 36 | + public void SetPhysicsMode(PhysicsMultiplayerMode mode) { } |
| 37 | + public PhysicsMultiplayerMode GetPhysicsMode() => PhysicsMultiplayerMode.Solid; |
| 38 | + public void SetMultiplayerBreakMode(MultiplayerBreak mode) { } |
| 39 | + public MultiplayerBreak GetMultiplayerBreakMode() => MultiplayerBreak.Default; |
| 40 | + |
| 41 | + protected float DmgModBullet; |
| 42 | + protected float DmgModClub; |
| 43 | + protected float DmgModExplosive; |
| 44 | + protected string? PhysicsDamageTableName; |
| 45 | + protected string? BreakableModel; |
| 46 | + protected int BreakableSkin; |
| 47 | + protected int BreakableCount; |
| 48 | + protected int MaxBreakableSize; |
| 49 | + protected string? BasePropData; |
| 50 | + protected int Interactions; |
| 51 | + protected int ExplosionMagnitude; |
| 52 | + protected float ExplodeRadius; |
| 53 | +} |
0 commit comments