diff --git a/Barotrauma/BarotraumaShared/Content/Items/Medical/medical.xml b/Barotrauma/BarotraumaShared/Content/Items/Medical/medical.xml index 6da2cc456..229e9bce8 100644 --- a/Barotrauma/BarotraumaShared/Content/Items/Medical/medical.xml +++ b/Barotrauma/BarotraumaShared/Content/Items/Medical/medical.xml @@ -3,8 +3,7 @@ @@ -31,8 +30,7 @@ @@ -53,23 +51,21 @@ - + @@ -82,19 +78,18 @@ - + - + @@ -103,19 +98,18 @@ - + - + @@ -128,12 +122,12 @@ - - + + - + - + - + - + - + - + - + @@ -218,50 +210,48 @@ - - + + - + - - + + - + - - + + - + - + + - + @@ -290,84 +281,79 @@ name="Chloral Hydrate" category="Material" spritecolor="1.0,1.0,1.0,0.8" - Tags="smallitem,chem,medical" - + Tags="smallitem,chem,medical" price="20"> - + - + - + - + - + - + - + - + @@ -375,19 +361,18 @@ - + - + @@ -395,19 +380,18 @@ - + - + @@ -415,19 +399,18 @@ - + - + @@ -435,19 +418,18 @@ - + - + @@ -455,11 +437,11 @@ - + - + diff --git a/Barotrauma/BarotraumaShared/Content/Items/Weapons/explosives.xml b/Barotrauma/BarotraumaShared/Content/Items/Weapons/explosives.xml index 26f91f0a5..24444fb0d 100644 --- a/Barotrauma/BarotraumaShared/Content/Items/Weapons/explosives.xml +++ b/Barotrauma/BarotraumaShared/Content/Items/Weapons/explosives.xml @@ -10,12 +10,12 @@ - + - + - + - + - + - + - + - + - + @@ -130,6 +129,6 @@ - + \ No newline at end of file diff --git a/Barotrauma/BarotraumaShared/Content/Items/Weapons/weapons.xml b/Barotrauma/BarotraumaShared/Content/Items/Weapons/weapons.xml index 2f6b71c45..7f0ac541a 100644 --- a/Barotrauma/BarotraumaShared/Content/Items/Weapons/weapons.xml +++ b/Barotrauma/BarotraumaShared/Content/Items/Weapons/weapons.xml @@ -107,8 +107,7 @@ @@ -126,8 +125,7 @@ diff --git a/Barotrauma/BarotraumaShared/Source/DebugConsole.cs b/Barotrauma/BarotraumaShared/Source/DebugConsole.cs index 7c237cb9d..adebef33a 100644 --- a/Barotrauma/BarotraumaShared/Source/DebugConsole.cs +++ b/Barotrauma/BarotraumaShared/Source/DebugConsole.cs @@ -722,12 +722,30 @@ namespace Barotrauma } })); + commands.Add(new Command("kill", "kill [character]: Immediately kills the specified character.", (string[] args) => + { + Character killedCharacter = null; + if (args.Length == 0) + { + killedCharacter = Character.Controlled; + } + else + { + killedCharacter = FindMatchingCharacter(args); + } + + if (killedCharacter != null) + { + killedCharacter.AddDamage(CauseOfDeath.Damage, killedCharacter.MaxHealth * 2, null); + } + })); + commands.Add(new Command("killmonsters", "killmonsters: Immediately kills all AI-controlled enemies in the level.", (string[] args) => { foreach (Character c in Character.CharacterList) { if (!(c.AIController is EnemyAIController)) continue; - c.AddDamage(CauseOfDeath.Damage, 10000.0f, null); + c.AddDamage(CauseOfDeath.Damage, c.MaxHealth * 2, null); } })); diff --git a/Barotrauma/BarotraumaShared/Source/Events/MonsterEvent.cs b/Barotrauma/BarotraumaShared/Source/Events/MonsterEvent.cs index c63780770..9c2ed6ec2 100644 --- a/Barotrauma/BarotraumaShared/Source/Events/MonsterEvent.cs +++ b/Barotrauma/BarotraumaShared/Source/Events/MonsterEvent.cs @@ -73,14 +73,14 @@ namespace Barotrauma { base.Init(); - monsters = SpawnMonsters(Rand.Range(minAmount, maxAmount, Rand.RandSync.Server)); + monsters = SpawnMonsters(Rand.Range(minAmount, maxAmount, Rand.RandSync.Server), false); if (GameSettings.VerboseLogging) { DebugConsole.NewMessage("Initialized MonsterEvent (" + monsters[0]?.SpeciesName + " x" + monsters.Length + ")", Color.White); } } - private Character[] SpawnMonsters(int amount) + private Character[] SpawnMonsters(int amount, bool createNetworkEvent) { if (disallowed) return null; @@ -101,7 +101,7 @@ namespace Barotrauma { spawnPos.X += Rand.Range(-0.5f, 0.5f, Rand.RandSync.Server); spawnPos.Y += Rand.Range(-0.5f, 0.5f, Rand.RandSync.Server); - monsters[i] = Character.Create(characterFile, spawnPos, null, GameMain.Client != null, true, false); + monsters[i] = Character.Create(characterFile, spawnPos, null, GameMain.Client != null, true, createNetworkEvent); } return monsters; @@ -127,7 +127,7 @@ namespace Barotrauma { if (monsters[i] == null || monsters[i].Removed || monsters[i].IsDead) { - monsters[i] = SpawnMonsters(1)[0]; + monsters[i] = SpawnMonsters(1, true)[0]; } } }