(1cdaf2ba2) Make oxygen generator output decrease exponentially to make it easier to tune the output so there's enough oxygen regardless of the crew size when the generator is in a good condition, but not enough when it's damaged. Generator outputs should be adjusted a little higher now, for example multiplying them by 4 would mean the generator provides 100%-400% of the previous output when above 50% condition, and below that the output starts rapidly dropping.
This commit is contained in:
@@ -307,50 +307,6 @@ namespace Barotrauma
|
|||||||
|
|
||||||
//commands.Add(new Command("togglekarma", "togglekarma: Toggles the karma system.", null));
|
//commands.Add(new Command("togglekarma", "togglekarma: Toggles the karma system.", null));
|
||||||
|
|
||||||
commands.Add(new Command("enablecrewai", "enablecrewai: Enable the AI of the NPCs in the crew.", (string[] args) =>
|
|
||||||
{
|
|
||||||
HumanAIController.DisableCrewAI = false;
|
|
||||||
NewMessage("Crew AI enabled", Color.Green);
|
|
||||||
}, isCheat: true));
|
|
||||||
|
|
||||||
commands.Add(new Command("disableenemyai", "disableenemyai: Disable the AI of the Enemy characters (monsters).", (string[] args) =>
|
|
||||||
{
|
|
||||||
EnemyAIController.DisableEnemyAI = true;
|
|
||||||
NewMessage("Enemy AI disabled", Color.Red);
|
|
||||||
}, isCheat: true));
|
|
||||||
|
|
||||||
commands.Add(new Command("enableenemyai", "enableenemyai: Enable the AI of the Enemy characters (monsters).", (string[] args) =>
|
|
||||||
{
|
|
||||||
EnemyAIController.DisableEnemyAI = false;
|
|
||||||
NewMessage("Enemy AI enabled", Color.Green);
|
|
||||||
}, isCheat: true));
|
|
||||||
|
|
||||||
commands.Add(new Command("botcount", "botcount [x]: Set the number of bots in the crew in multiplayer.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("botspawnmode", "botspawnmode [fill/normal]: Set how bots are spawned in the multiplayer.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("autorestart", "autorestart [true/false]: Enable or disable round auto-restart.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("autorestartinterval", "autorestartinterval [seconds]: Set how long the server waits between rounds before automatically starting a new one. If set to 0, autorestart is disabled.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("autorestarttimer", "autorestarttimer [seconds]: Set the current autorestart countdown to the specified value.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("startwhenclientsready", "startwhenclientsready [true/false]: Enable or disable automatically starting the round when clients are ready to start.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("giveperm", "giveperm [id]: Grants administrative permissions to the player with the specified client ID.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("revokeperm", "revokeperm [id]: Revokes administrative permissions to the player with the specified client ID.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("giverank", "giverank [id]: Assigns a specific rank (= a set of administrative permissions) to the player with the specified client ID.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("givecommandperm", "givecommandperm [id]: Gives the player with the specified client ID the permission to use the specified console commands.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("revokecommandperm", "revokecommandperm [id]: Revokes permission to use the specified console commands from the player with the specified client ID.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("showperm", "showperm [id]: Shows the current administrative permissions of the client with the specified client ID.", null));
|
|
||||||
|
|
||||||
//commands.Add(new Command("togglekarma", "togglekarma: Toggles the karma system.", null));
|
|
||||||
|
|
||||||
commands.Add(new Command("kick", "kick [name]: Kick a player out of the server.", (string[] args) =>
|
commands.Add(new Command("kick", "kick [name]: Kick a player out of the server.", (string[] args) =>
|
||||||
{
|
{
|
||||||
if (GameMain.NetworkMember == null || args.Length == 0) return;
|
if (GameMain.NetworkMember == null || args.Length == 0) return;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ namespace Barotrauma.Items.Components
|
|||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Editable(ToolTip = "How much oxygen the machine generates when operating at full power."), Serialize(100.0f, true)]
|
[Editable(ToolTip = "How much oxygen the machine generates when operating at full power."), Serialize(400.0f, true)]
|
||||||
public float GeneratedAmount
|
public float GeneratedAmount
|
||||||
{
|
{
|
||||||
get { return generatedAmount; }
|
get { return generatedAmount; }
|
||||||
@@ -62,8 +62,13 @@ namespace Barotrauma.Items.Components
|
|||||||
}
|
}
|
||||||
|
|
||||||
CurrFlow = Math.Min(voltage, 1.0f) * generatedAmount * 100.0f;
|
CurrFlow = Math.Min(voltage, 1.0f) * generatedAmount * 100.0f;
|
||||||
|
|
||||||
//less effective when in bad condition
|
//less effective when in bad condition
|
||||||
CurrFlow *= MathHelper.Lerp(0.5f, 1.0f, item.Condition / item.MaxCondition);
|
float conditionMult = item.Condition / item.MaxCondition;
|
||||||
|
//100% condition = 100% oxygen
|
||||||
|
//50% condition = 25% oxygen
|
||||||
|
//20% condition = 4%
|
||||||
|
CurrFlow *= conditionMult * conditionMult;
|
||||||
|
|
||||||
UpdateVents(CurrFlow);
|
UpdateVents(CurrFlow);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user