v1.4.4.1 (Blood in the Water Update)
This commit is contained in:
@@ -739,6 +739,35 @@ namespace Barotrauma
|
||||
};
|
||||
}, isCheat: true));
|
||||
|
||||
|
||||
commands.Add(new Command("listsuitabletreatments", "listsuitabletreatments [character name]: List which items are the most suitable for treating the specified character. Useful for debugging medic AI.", (string[] args) =>
|
||||
{
|
||||
Character character = (args.Length == 0) ? Character.Controlled : FindMatchingCharacter(args);
|
||||
if (character != null)
|
||||
{
|
||||
Dictionary<Identifier, float> treatments = new Dictionary<Identifier, float>();
|
||||
character.CharacterHealth.GetSuitableTreatments(treatments, user: null);
|
||||
foreach (var treatment in treatments.OrderByDescending(t => t.Value))
|
||||
{
|
||||
Color color = Color.White;
|
||||
#if CLIENT
|
||||
color = ToolBox.GradientLerp(
|
||||
MathUtils.InverseLerp(-1000, 1000, treatment.Value),
|
||||
Color.Red, Color.Yellow, Color.White, Color.LightGreen);
|
||||
#endif
|
||||
NewMessage((int)treatment.Value + ": " + treatment.Key, color);
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
() =>
|
||||
{
|
||||
return new string[][]
|
||||
{
|
||||
Character.CharacterList.Select(c => c.Name).Distinct().OrderBy(n => n).ToArray()
|
||||
};
|
||||
}, isCheat: true));
|
||||
|
||||
commands.Add(new Command("revive", "revive [character name]: Bring the specified character back from the dead. If the name parameter is omitted, the controlled character will be revived.", (string[] args) =>
|
||||
{
|
||||
Character revivedCharacter = (args.Length == 0) ? Character.Controlled : FindMatchingCharacter(args);
|
||||
@@ -827,7 +856,7 @@ namespace Barotrauma
|
||||
}
|
||||
else if (eventPrefab != null)
|
||||
{
|
||||
var newEvent = eventPrefab.CreateInstance();
|
||||
var newEvent = eventPrefab.CreateInstance(GameMain.GameSession.EventManager.RandomSeed);
|
||||
if (newEvent == null)
|
||||
{
|
||||
NewMessage($"Could not initialize event {args[0]} because level did not meet requirements");
|
||||
@@ -2296,6 +2325,7 @@ namespace Barotrauma
|
||||
#endif
|
||||
}
|
||||
spawnedCharacter.GiveJobItems(spawnPoint);
|
||||
spawnedCharacter.GiveIdCardTags(spawnPoint);
|
||||
spawnedCharacter.Info.StartItemsGiven = true;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user