├── .gitignore └── Mechtrauma ├── CSharp ├── Client │ └── powerConnections.cs ├── RunConfig.xml └── Shared │ ├── CentralPump.cs │ ├── ControllablePowerContainer.cs │ ├── FusedJB.cs │ ├── GridAbsorber.cs │ ├── MTBoiler.cs │ ├── WaterDrain.cs │ ├── main.cs │ ├── powerConnections.cs │ └── simpleGenerator.cs ├── Images ├── CNC.png ├── Containers │ ├── Mechtrauma_Crates.png │ └── mechtrauma_cargo_containers.png ├── Gear │ ├── Expedition_DivingSuit.png │ ├── Expedition_DivingSuitb.png │ ├── armored_DivingSuit.png │ ├── fatboy.png │ ├── kit_captain.png │ ├── kit_plague_doctor.png │ ├── kit_utility.png │ ├── knight_light.png │ └── knight_lite.png ├── Generators │ └── seriesC.png ├── LEGACY │ ├── circulator_pump.png │ └── welder.png ├── Mechtrauma_Mounts.png ├── PDG500_instructions.png ├── Pumps │ ├── MT_PUMPS_LARGE.png │ └── MT_PUMPS_TALL.png ├── S5000D.png ├── Series5000D.png ├── TEST_DivingSuit.PNG ├── argon_station.png ├── argon_tank.png ├── battery_bank.png ├── boiler.png ├── boilerh.png ├── cargo_crane.png ├── cargo_hatch.png ├── closet.png ├── command_final.png ├── copper_pipe_h.png ├── diesel_fuel_barrel.png ├── diesel_fuel_can.png ├── diesel_fuel_tank.png ├── diesel_generator.png ├── dry_suit.png ├── electrical_panel.png ├── extinguisher_station.png ├── extinguisher_tank.png ├── fuse.png ├── gunners_chair.png ├── handtruck.png ├── keys.png ├── lcd.png ├── mechcab.png ├── mechtrauma.png ├── mechtrauma2.xcf ├── mechtrauma_banner.png ├── mechtrauma_command.png ├── mechtrauma_command_final.png ├── mechtrauma_containers.png ├── mechtrauma_crates.png ├── mechtrauma_electrical.png ├── mechtrauma_eys.png ├── mechtrauma_fabricators.png ├── mechtrauma_generator_cabinets.png ├── mechtrauma_generators.png ├── mechtrauma_icons.png ├── mechtrauma_logo.png ├── mechtrauma_oxygen.png ├── mechtrauma_pumps.png ├── mechtrauma_pumps_large.png ├── mechtrauma_pumps_tall.png ├── mechtrauma_rocket.png ├── mechtrauma_weapons.png ├── mt_pumps.png ├── mt_turrets.png ├── mt_turrets3.png ├── oil.png ├── oil2 (2).png ├── oil_barrel.png ├── oil_station.png ├── oxygen.png ├── oxygen_station.png ├── oxygen_supply.png ├── oxygentank_compressor.png ├── plague_doctor_mask.png ├── portable_diesel_generator.png ├── radiation_suit.png ├── radiation_suit2.png ├── reduction_gear.png ├── shipping_container.png ├── steam_turbine.png ├── turnout_gear1.png ├── turnout_gear2.png └── welder_pack.png ├── Localization ├── BrazilianPortuguese │ └── BrazilianPortuguese.xml ├── CastilianSpanish │ └── CastilianSpanish.xml ├── Chinese │ └── MechtraumaSCtext.xml ├── English │ └── English.xml ├── French │ └── French.xml ├── German │ └── German.xml ├── Japanese │ └── Japanese.xml ├── Korean │ └── Korean.xml ├── LatinamericanSpanish │ └── LatinamericanSpanish.xml ├── Polish │ └── Polish.xml ├── Russian │ └── Russian.xml └── Turkish │ └── Turkish.xml ├── Lua ├── Autorun │ └── init.lua ├── Scripts │ ├── Client │ │ ├── configgui.lua │ │ └── csluacheck.lua │ ├── Server │ │ ├── bacteria_analyzer.lua │ │ ├── biotrauma.lua │ │ ├── mechtrauma.lua │ │ ├── treatmentitems.lua │ │ ├── updateCounter.lua │ │ ├── updateHumans.lua │ │ └── updateItems.lua │ ├── Shared │ │ ├── biotraumaFunctions.lua │ │ ├── helperfunctions.lua │ │ ├── mechtraumaPower.lua │ │ └── mechtraumafunctions.lua │ ├── config.lua │ └── testing.lua └── defaultconfig.lua ├── Sound ├── airrifle.ogg ├── airrifle2.ogg ├── analyze.ogg ├── buzz.ogg ├── data-reveal-sound-6460.mp3 ├── dieselDeepRun.ogg ├── dieselDeepStart.ogg ├── diesel_loop.ogg ├── diesel_sound.ogg ├── diesel_sound_deep.ogg ├── diesel_sound_underwater.ogg ├── diesel_start.ogg ├── electric_compressor.ogg ├── item_interact.ogg ├── item_interact2.ogg ├── item_interact3.ogg ├── item_interact4.ogg ├── knight1.ogg ├── knight2.ogg ├── knight3.ogg ├── pressure_relief.ogg ├── pressure_relief2.ogg ├── pump_loop.ogg ├── receipt1.ogg ├── remove_tank.ogg ├── rocket_engine.mp3 └── screams_woman_2.ogg ├── XML ├── Legacy │ └── Legacy.xml ├── Mechtrauma_Afflictions.xml ├── Mechtrauma_Gear.xml ├── Mechtrauma_Generators.xml ├── Mechtrauma_Items.xml ├── Mechtrauma_Missions.xml ├── Mechtrauma_Pumps.xml └── Mechtrauma_UpgradeModules.xml ├── config.json └── filelist.xml /.gitignore: -------------------------------------------------------------------------------- 1 | .vscode/* 2 | -------------------------------------------------------------------------------- /Mechtrauma/CSharp/Client/powerConnections.cs: -------------------------------------------------------------------------------- 1 | /*** 2 | Modifies the gui drawing code for power connections to display the different colours for steam and kinetic grids. 3 | ***/ 4 | using System; 5 | using Barotrauma; 6 | using Barotrauma.Networking; 7 | using System.Reflection; 8 | using System.Collections.Generic; 9 | using Microsoft.Xna.Framework; 10 | using Microsoft.Xna.Framework.Graphics; 11 | using Barotrauma.Items.Components; 12 | using System.Linq; 13 | 14 | namespace Mechtrauma { 15 | partial class Mechtrauma: ACsMod { 16 | // Change the connection gui to show the steam and kinetic networks 17 | private void changeConnectionGUI() { 18 | // Make the connectionSprite publicly accessible 19 | FieldInfo spriteField = typeof(Barotrauma.Items.Components.Connection).GetField("connectionSprite", BindingFlags.Static | BindingFlags.NonPublic); 20 | 21 | // Override the DrawConnection function for connections 22 | // Most of the code is the same as the original just an extra if statements for colour picking 23 | GameMain.LuaCs.Hook.HookMethod("Barotrauma.Items.Components.Connection", 24 | typeof(Barotrauma.Items.Components.Connection).GetMethod("DrawConnection", BindingFlags.Instance | BindingFlags.NonPublic), 25 | (Object self, Dictionary args) => { 26 | // Assign parameters and helper variables for ease of use 27 | Barotrauma.Items.Components.Connection myself = (Barotrauma.Items.Components.Connection)self; 28 | 29 | SpriteBatch spriteBatch = args["spriteBatch"] as SpriteBatch; 30 | ConnectionPanel panel = args["panel"] as ConnectionPanel; 31 | Vector2 position = (Vector2)args["position"]; 32 | Vector2 labelPos = (Vector2)args["labelPos"]; 33 | Vector2 scale = (Vector2)args["scale"]; 34 | 35 | // get connection text 36 | string text = myself.DisplayName.Value.ToUpperInvariant(); 37 | 38 | //nasty -- original comment 39 | if (GUIStyle.GetComponentStyle("ConnectionPanelLabel")?.Sprites.Values.First().First() is UISprite labelSprite) 40 | { 41 | // Calculate an appropriate label size for the text 42 | Vector2 textSize = GUIStyle.SmallFont.MeasureString(text); 43 | Rectangle labelArea = new Rectangle(labelPos.ToPoint(), textSize.ToPoint()); 44 | labelArea.Inflate(10 * scale.X, 3 * scale.Y); 45 | 46 | // Set background colour based on the grid type 47 | Color colour = Color.SteelBlue; 48 | if (myself.Name.StartsWith("steam")) { 49 | colour = Color.DeepSkyBlue; 50 | } else if (myself.Name.StartsWith("kinetic")) { 51 | colour = Color.SaddleBrown; 52 | } else if (myself.Name.StartsWith("thermal")) { 53 | colour = Color.Orange; 54 | } else if (myself.Name.StartsWith("water")) { 55 | colour = Color.DodgerBlue; 56 | } else if (myself.IsPower) { 57 | colour = GUIStyle.Red; 58 | } 59 | 60 | labelSprite.Draw(spriteBatch, labelArea, colour); 61 | } 62 | 63 | // Draw text with an outline 64 | GUI.DrawString(spriteBatch, labelPos + Vector2.UnitY, text, Color.Black * 0.8f, font: GUIStyle.SmallFont); 65 | GUI.DrawString(spriteBatch, labelPos, text, GUIStyle.TextColorBright, font: GUIStyle.SmallFont); 66 | 67 | // Draw the connection sprite 68 | Sprite connectionSprite = spriteField.GetValue(self) as Sprite; 69 | float connectorSpriteScale = (35.0f / connectionSprite.SourceRect.Width) * panel.Scale; 70 | connectionSprite.Draw(spriteBatch, position, scale: connectorSpriteScale); 71 | 72 | // Prevent the original method from running 73 | return args; 74 | }, LuaCsHook.HookMethodType.Before, this); 75 | } 76 | } 77 | } 78 | 79 | 80 | -------------------------------------------------------------------------------- /Mechtrauma/CSharp/RunConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Standard 4 | Standard 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Mechtrauma/CSharp/Shared/CentralPump.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Barotrauma; 3 | using Barotrauma.Networking; 4 | using System.Reflection; 5 | using System.Collections.Generic; 6 | using Microsoft.Xna.Framework; 7 | using Barotrauma.Items.Components; 8 | using System.Linq; 9 | 10 | namespace Barotrauma.Items.Components 11 | { 12 | class CentralPump : Pump { 13 | FieldInfo flowPercentageField = typeof(Barotrauma.Items.Components.Pump).GetField("flowPercentage", BindingFlags.Instance | BindingFlags.NonPublic); 14 | FieldInfo currFlowField = typeof(Barotrauma.Items.Components.Pump).GetField("currFlow", BindingFlags.Instance | BindingFlags.NonPublic); 15 | FieldInfo pumpSpeedLockTimerField = typeof(Barotrauma.Items.Components.Pump).GetField("pumpSpeedLockTimer", BindingFlags.Instance | BindingFlags.NonPublic); 16 | FieldInfo isActiveLockTimerField = typeof(Barotrauma.Items.Components.Pump).GetField("isActiveLockTimer", BindingFlags.Instance | BindingFlags.NonPublic); 17 | 18 | protected void setFlowPercentage(float value) 19 | { 20 | flowPercentageField.SetValue(this, MathHelper.Clamp(value, -100.0f, 100.0f)); 21 | } 22 | 23 | protected void setCurrFlow(float value) 24 | { 25 | currFlowField.SetValue(this, value); 26 | } 27 | 28 | protected float getCurrFlow() 29 | { 30 | return (float)currFlowField.GetValue(this); 31 | } 32 | 33 | protected void updateTimers(float deltaTime) 34 | { 35 | pumpSpeedLockTimerField.SetValue(this, (float)pumpSpeedLockTimerField.GetValue(this) - deltaTime); 36 | isActiveLockTimerField.SetValue(this, (float)isActiveLockTimerField.GetValue(this) - deltaTime); 37 | } 38 | 39 | public float HullPercentage 40 | { 41 | get => hullPercentage; 42 | set => hullPercentage = value; 43 | } 44 | private float hullPercentage; 45 | 46 | public CentralPump(Item item, ContentXElement element) : base(item, element) { 47 | // call base constructor 48 | } 49 | 50 | public override void Update(float deltaTime, Camera cam) { 51 | updateTimers(deltaTime); 52 | 53 | if (!IsActive) { 54 | LuaCsSetup.PrintCsMessage("Drain not active"); 55 | return; 56 | } 57 | 58 | if (TargetLevel != null) { 59 | setFlowPercentage(((float)TargetLevel - HullPercentage) * 10.0f); 60 | } 61 | 62 | if (!HasPower) { 63 | return; 64 | } 65 | 66 | UpdateProjSpecific(deltaTime); 67 | 68 | ApplyStatusEffects(ActionType.OnActive, deltaTime, null); 69 | 70 | float powerFactor = Math.Min(currPowerConsumption <= 0.0f || MinVoltage <= 0.0f ? 1.0f : Voltage, MaxOverVoltageFactor); 71 | 72 | float flow = FlowPercentage / 100.0f * item.StatManager.GetAdjustedValue(ItemTalentStats.PumpMaxFlow, MaxFlow) * powerFactor; 73 | 74 | if (item.GetComponent() is { IsTinkering: true } repairable) 75 | { 76 | flow *= 1f + repairable.TinkeringStrength * 4.0f; 77 | } 78 | 79 | flow = item.StatManager.GetAdjustedValue(ItemTalentStats.PumpSpeed, flow); 80 | 81 | //less effective when in a bad condition 82 | flow *= MathHelper.Lerp(0.5f, 1.0f, item.Condition / item.MaxCondition); 83 | 84 | setCurrFlow(flow); 85 | } 86 | 87 | /// 88 | /// Power consumption of the Pump. Only consume power when active and adjust consumption based on condition. 89 | /// 90 | public override float GetCurrentPowerConsumption(Connection connection = null) 91 | { 92 | //There shouldn't be other power connections to this 93 | if (!IsActive) 94 | { 95 | return 0; 96 | } 97 | 98 | if (connection == powerIn) { 99 | currPowerConsumption = powerConsumption * Math.Abs(FlowPercentage / 100.0f); 100 | //pumps consume more power when in a bad condition 101 | item.GetComponent()?.AdjustPowerConsumption(ref currPowerConsumption); 102 | 103 | return currPowerConsumption; 104 | } 105 | 106 | return -1; 107 | } 108 | 109 | void UpdateProjSpecific(float deltaTime) { 110 | // Place holder 111 | } 112 | 113 | 114 | public override PowerRange MinMaxPowerOut(Connection connection, float load = 0) { 115 | if (connection == powerOut) { 116 | return new PowerRange(0, MaxFlow); 117 | } 118 | return PowerRange.Zero; 119 | } 120 | 121 | // Pump will output positive or negative power to indicate flow direction 122 | public override float GetConnectionPowerOut(Connection connection, float power, PowerRange minMaxPower, float load) { 123 | if (connection == powerOut) { 124 | return MathHelper.Clamp(getCurrFlow(), -MaxFlow, MaxFlow); 125 | } 126 | return 0.0f; 127 | } 128 | 129 | } 130 | } -------------------------------------------------------------------------------- /Mechtrauma/CSharp/Shared/ControllablePowerContainer.cs: -------------------------------------------------------------------------------- 1 | /*** 2 | Modified power container that can be turned on and off 3 | ***/ 4 | using System; 5 | using Barotrauma; 6 | using Barotrauma.Networking; 7 | using System.Reflection; 8 | using System.Collections.Generic; 9 | using Microsoft.Xna.Framework; 10 | using Barotrauma.Items.Components; 11 | using System.Linq; 12 | 13 | namespace Barotrauma.Items.Components 14 | { 15 | class ControllablePowerContainer : PowerContainer { 16 | 17 | [Editable, Serialize(true, IsPropertySaveable.Yes, description: "Turn the power container output on and off", alwaysUseInstanceValues: true)] 18 | public bool IsOn { 19 | get => isOn; 20 | set => isOn = value; 21 | } 22 | private bool isOn = true; 23 | 24 | public ControllablePowerContainer(Item item, ContentXElement element) : base(item, element) { 25 | // call base constructor 26 | isOn = true; 27 | } 28 | 29 | public override PowerRange MinMaxPowerOut(Connection connection, float load = 0) { 30 | // Return zero power if the output is off 31 | if (connection == powerOut && !isOn) { 32 | return PowerRange.Zero; 33 | } 34 | return base.MinMaxPowerOut(connection, load); 35 | } 36 | 37 | // Add custom toggle and set state signals which can be used to turn the output on and off 38 | public override void ReceiveSignal(Signal signal, Connection connection) 39 | { 40 | if (item.Condition <= 0.0f || connection.IsPower) { return; } 41 | 42 | // Call base method to handle other signals 43 | base.ReceiveSignal(signal, connection); 44 | 45 | if (connection.Name == "toggle") 46 | { 47 | if (signal.value == "0") { return; } 48 | SetState(!IsOn, false); 49 | } 50 | else if (connection.Name == "set_state") 51 | { 52 | SetState(signal.value != "0", false); 53 | } 54 | } 55 | 56 | // SetState function to handle setting output state and relevant networking 57 | public void SetState(bool on, bool isNetworkMessage) 58 | { 59 | #if CLIENT 60 | if (GameMain.Client != null && !isNetworkMessage) { return; } 61 | #endif 62 | 63 | #if SERVER 64 | if (on != IsOn && GameMain.Server != null) 65 | { 66 | item.CreateServerEvent(this); 67 | } 68 | #endif 69 | 70 | IsOn = on; 71 | } 72 | 73 | // Add isOn boolean to the server network event 74 | #if SERVER 75 | public void ServerEventWrite(IWriteMessage msg, Client c, NetEntityEvent.IData extraData = null) 76 | { 77 | base.ServerEventWrite(msg, c, extraData); 78 | msg.WriteBoolean(isOn); 79 | } 80 | #endif 81 | 82 | // Read isOn boolean from the client network event 83 | #if CLIENT 84 | public void ClientEventRead(IReadMessage msg, float sendingTime) 85 | { 86 | // Keep track of whether delayedCorrection will occur, so we don't read the msg 87 | bool delayedCorrection = correctionTimer > 0.0f; 88 | 89 | // Call base method to handle original network event 90 | base.ClientEventRead(msg, sendingTime); 91 | 92 | // Skip reading the msg if delayedCorrection will occur 93 | if (delayedCorrection) { 94 | return; 95 | } 96 | 97 | SetState(msg.ReadBoolean(), true); 98 | } 99 | #endif 100 | } 101 | } -------------------------------------------------------------------------------- /Mechtrauma/CSharp/Shared/FusedJB.cs: -------------------------------------------------------------------------------- 1 | /*** 2 | Custom Junction box that checks for a fuse and will break connection if the fuse is broken 3 | ***/ 4 | using System; 5 | using Barotrauma; 6 | using Barotrauma.Networking; 7 | using System.Reflection; 8 | using System.Collections.Generic; 9 | using Microsoft.Xna.Framework; 10 | using System.Linq; 11 | using System.Xml.Linq; 12 | using Barotrauma.Items.Components; 13 | 14 | namespace Barotrauma.Items.Components 15 | { 16 | class FusedJB : PowerTransfer { 17 | public bool BrokenFuse { 18 | get => brokenFuse; 19 | set 20 | { 21 | // Only update if the value has changed 22 | if (value != brokenFuse) { 23 | brokenFuse = value; 24 | flagConnections(item.Connections); 25 | } 26 | } 27 | } 28 | 29 | private bool brokenFuse = false; 30 | 31 | public FusedJB(Item item, ContentXElement element) : base(item, element) { 32 | // call base constructor 33 | } 34 | 35 | // Update check fuse condition and update flag 36 | public override void Update(float deltaTime, Camera cam) { 37 | base.Update(deltaTime, cam); 38 | 39 | // Check JB inventory 40 | ItemInventory inv = item.OwnInventory; 41 | if (inv != null) { 42 | 43 | // Get condition of the first item in the JB inventory 44 | Item? invItem = inv.GetItemAt(0); 45 | float itemCond = invItem?.Condition ?? 0.0f; 46 | BrokenFuse = itemCond <= 0.0f; 47 | } 48 | } 49 | 50 | // Flag to the power grid that connections need to be updated (Important for the power grid cache to know) 51 | private void flagConnections(List connections) { 52 | foreach (Connection c in connections) 53 | { 54 | if (c.IsPower) 55 | { 56 | Powered.ChangedConnections.Add(c); 57 | foreach (Connection conn in c.Recipients) 58 | { 59 | Powered.ChangedConnections.Add(conn); 60 | } 61 | } 62 | } 63 | } 64 | } 65 | } -------------------------------------------------------------------------------- /Mechtrauma/CSharp/Shared/GridAbsorber.cs: -------------------------------------------------------------------------------- 1 | /*** 2 | Adds grid absorption device that absorb over voltage in turn for damaging themselves 3 | This is primarily utilised by steam regulators 4 | ***/ 5 | using System; 6 | using Barotrauma; 7 | using Barotrauma.Networking; 8 | using System.Reflection; 9 | using System.Collections.Generic; 10 | using Microsoft.Xna.Framework; 11 | using Barotrauma.Items.Components; 12 | using System.Linq; 13 | 14 | namespace Barotrauma.Items.Components 15 | { 16 | class GridAbsorber : Powered { 17 | [Editable, Serialize(500.0f, IsPropertySaveable.Yes, description: "Max power the device can absorb in an overvoltage event", alwaysUseInstanceValues: true)] 18 | public float MaxPowerAbsorption { get => maxPowerAbsorption; set => maxPowerAbsorption = value; } 19 | 20 | private float maxPowerAbsorption; 21 | 22 | public GridAbsorber(Item item, ContentXElement element) : base(item, element) { 23 | // call base constructor 24 | } 25 | 26 | // Update function to damage the device depending on how much power it is absorbing 27 | public override void Update(float deltaTime, Camera cam) { 28 | base.Update(deltaTime, cam); 29 | 30 | // Check if the device should take damage 31 | if (item.Repairables.Any() && item.Condition > 0.0f && CurrPowerConsumption < 0) { 32 | // calculate the amount of damage to be done 33 | float damageCondition = MathHelper.Clamp(CurrPowerConsumption / MaxPowerAbsorption * deltaTime * 3, -1, 0); 34 | item.Condition += damageCondition; 35 | } 36 | } 37 | 38 | public override float GetCurrentPowerConsumption(Connection connection) { 39 | // Check if power absorber and is input connection 40 | if (connection == powerIn) { 41 | // If not broken then flag as power source 42 | return item.Condition > 0.0f ? -1.0f : 0.0f; 43 | } 44 | 45 | return 0; 46 | } 47 | 48 | public override PowerRange MinMaxPowerOut(Connection connection, float load) { 49 | // Indicate max absorption capabilities 50 | if (connection == powerIn) { 51 | float scaler = MathHelper.Min(item.Condition / 5, 1.0f); 52 | return new PowerRange(0, MaxPowerAbsorption * scaler); 53 | } 54 | 55 | return PowerRange.Zero; 56 | } 57 | 58 | public override float GetConnectionPowerOut(Connection connection, float power, PowerRange minMaxPower, float load) { 59 | // Check if input connection 60 | if (connection == powerIn) { 61 | float maxConsumption = MinMaxPowerOut(connection, load).Max; 62 | float powerexcess = MathHelper.Max(power - load, 0.0f); 63 | float powerAbsorbed = 0.0f; 64 | 65 | // Prevent NaN errors 66 | if (minMaxPower.Max > 0) { 67 | // Calculate how much power to absorb accounting for other power absorbers 68 | powerAbsorbed = -MathHelper.Clamp(powerexcess / minMaxPower.Max * maxConsumption, 0.0f, maxConsumption); 69 | } 70 | 71 | // Update CurrPowerConsumption for status effects to be informed 72 | CurrPowerConsumption = powerAbsorbed; 73 | return powerAbsorbed; 74 | } 75 | 76 | return 0; 77 | } 78 | 79 | } 80 | } -------------------------------------------------------------------------------- /Mechtrauma/CSharp/Shared/MTBoiler.cs: -------------------------------------------------------------------------------- 1 | /*** 2 | Modified Power container designed to be used as an advance boiler 3 | ***/ 4 | using System; 5 | using Barotrauma; 6 | using Barotrauma.Networking; 7 | using System.Reflection; 8 | using System.Collections.Generic; 9 | using Microsoft.Xna.Framework; 10 | using Barotrauma.Items.Components; 11 | using System.Linq; 12 | 13 | namespace Barotrauma.Items.Components 14 | { 15 | class MTBoiler : PowerContainer { 16 | 17 | public MTBoiler(Item item, ContentXElement element) : base(item, element) { 18 | // call base constructor 19 | } 20 | 21 | // Power consumption starts high during initial charge up then drops off to normal scaling after around 5% charge 22 | public override float GetCurrentPowerConsumption(Connection connection) { 23 | if (connection == powerIn) { 24 | float newLoad = 0; 25 | if (Capacity - Charge <= 1) { 26 | newLoad = (Capacity - Charge) * RechargeSpeed; 27 | } else { 28 | newLoad = RechargeSpeed * (1 + (float)Math.Pow(3, 0.0030103f - ChargePercentage)); 29 | } 30 | 31 | if (float.IsNegative(newLoad)) { 32 | newLoad = 0.0f; 33 | } 34 | 35 | return newLoad; 36 | } else { 37 | return base.GetCurrentPowerConsumption(connection); 38 | } 39 | } 40 | 41 | public override PowerRange MinMaxPowerOut(Connection connection, float load = 0) { 42 | if (connection == powerOut) { 43 | float maxOut = MaxOutPut; 44 | 45 | // Scale the output capabilities down when below 25% charge 46 | if (ChargePercentage <= 25) { 47 | maxOut *= ChargePercentage / 25; 48 | } 49 | 50 | // Disable output when device is below 10% condition 51 | if (item.Condition < 10) { 52 | maxOut = 0; 53 | } 54 | 55 | maxOut = MathHelper.Clamp(maxOut, 0, MaxOutPut); 56 | return new PowerRange(0, maxOut); 57 | } 58 | return base.MinMaxPowerOut(connection, load); 59 | } 60 | 61 | // Past 75% charge scale the load to cause overloading of the grid up to 2x at 100% charge 62 | public override float GetConnectionPowerOut(Connection connection, float power, PowerRange minMaxPower, float load) { 63 | float loadScaler = 1; 64 | if (connection == powerOut && ChargePercentage >= 75) { 65 | loadScaler += (ChargePercentage - 75) / 25; 66 | } 67 | return base.GetConnectionPowerOut(connection, power, minMaxPower, load * loadScaler); 68 | } 69 | 70 | // Clamp input consumption so that initial charge up doesn't speed up the charge rate 71 | public override void GridResolved(Connection conn) 72 | { 73 | if (conn == powerIn) 74 | { 75 | //Increase charge based on how much power came in from the grid and clamped to the Max Charge Rate 76 | Charge += (Math.Clamp(CurrPowerConsumption, 0, RechargeSpeed) * Voltage) / 60 * UpdateInterval * Efficiency; 77 | } 78 | else 79 | { 80 | base.GridResolved(conn); 81 | } 82 | } 83 | } 84 | } 85 | 86 | -------------------------------------------------------------------------------- /Mechtrauma/CSharp/Shared/WaterDrain.cs: -------------------------------------------------------------------------------- 1 | /*** 2 | Simple generator component for Mechtrauma that allows for configurable power output and tolerance. 3 | Using negative 'PowerConsumption' variable to provide power to the grid. While positive to add a load. 4 | And the 'PowerTolerance' variable to allow for snapping to the grid demand. 5 | ***/ 6 | using System; 7 | using Barotrauma; 8 | using Barotrauma.Networking; 9 | using System.Reflection; 10 | using System.Collections.Generic; 11 | using Microsoft.Xna.Framework; 12 | using Barotrauma.Items.Components; 13 | using System.Linq; 14 | 15 | namespace Barotrauma.Items.Components 16 | { 17 | class WaterDrain : Powered { 18 | 19 | [Editable, Serialize(80.0f, IsPropertySaveable.No, description: "How fast the item pumps water in/out when operating at 100%.", alwaysUseInstanceValues: true)] 20 | public float MaxFlow 21 | { 22 | get => maxFlow; 23 | set => maxFlow = value; 24 | } 25 | private float maxFlow = 80.0f; 26 | 27 | [Editable, Serialize(true, IsPropertySaveable.Yes, alwaysUseInstanceValues: true)] 28 | 29 | public bool IsInfected 30 | { 31 | get => isInfected; 32 | set => isInfected = value; 33 | } 34 | private bool isInfected = false; 35 | 36 | public float CurrFlow 37 | { 38 | get => Math.Abs(currFlow); 39 | } 40 | private float currFlow; 41 | 42 | public override bool UpdateWhenInactive => true; 43 | 44 | private float isActiveLockTimer; 45 | 46 | public WaterDrain(Item item, ContentXElement element) : base(item, element) 47 | { 48 | IsActive = true; 49 | } 50 | 51 | public override void Update(float deltaTime, Camera cam) 52 | { 53 | isActiveLockTimer -= deltaTime; 54 | 55 | if (!IsActive) 56 | { 57 | return; 58 | } 59 | 60 | if (item.CurrentHull == null) { return; } 61 | 62 | item.CurrentHull.WaterVolume += MaxFlow * Voltage * deltaTime * Timing.FixedUpdateRate; 63 | if (item.CurrentHull.WaterVolume > item.CurrentHull.Volume) { item.CurrentHull.Pressure += 30.0f * deltaTime; } 64 | } 65 | 66 | /// 67 | /// Power consumption of the Pump. Only consume power when active and adjust consumption based on condition. 68 | /// 69 | public override float GetCurrentPowerConsumption(Connection connection = null) 70 | { 71 | //There shouldn't be other power connections to this 72 | if (connection == powerOut && IsActive) 73 | { 74 | return MaxFlow; 75 | } 76 | 77 | return 0; 78 | } 79 | 80 | public override void GridResolved(Connection conn) 81 | { 82 | if (conn == powerOut) 83 | { 84 | // Correct voltage to allow negative voltage 85 | if (powerOut.Grid != null && powerOut.Grid.Power < 0 && powerOut.Grid.Voltage == 0) { 86 | float newVoltage = powerOut.Grid.Power / MathHelper.Max(powerOut.Grid.Load, 1E-10f); 87 | 88 | // Clamp voltage between -1000 to 1000 89 | if (newVoltage > 1000) { 90 | newVoltage = 1000.0f; 91 | } else if (newVoltage < -1000) { 92 | newVoltage = -1000; 93 | } 94 | 95 | powerOut.Grid.Voltage = newVoltage; 96 | } 97 | } 98 | } 99 | 100 | public override void ReceiveSignal(Signal signal, Connection connection) 101 | { 102 | if (IsInfected) { return; } 103 | 104 | if (connection.Name == "toggle") 105 | { 106 | IsActive = !IsActive; 107 | isActiveLockTimer = 0.1f; 108 | } 109 | else if (connection.Name == "set_active") 110 | { 111 | IsActive = signal.value != "0"; 112 | isActiveLockTimer = 0.1f; 113 | } 114 | } 115 | 116 | } 117 | } -------------------------------------------------------------------------------- /Mechtrauma/CSharp/Shared/main.cs: -------------------------------------------------------------------------------- 1 | /*** 2 | Main class for Mechtrauma 3 | Initialises the necessary functions and helps make the mod files more managable. 4 | Ensures only specific functions are called if its a client or server 5 | ***/ 6 | using System; 7 | using Barotrauma; 8 | using System.Reflection; 9 | using System.Collections.Generic; 10 | using System.Linq; 11 | 12 | namespace Mechtrauma { 13 | partial class Mechtrauma: ACsMod { 14 | public Mechtrauma() { 15 | //LuaCsSetup.PrintCsMessage("Started Mechtrauma"); 16 | 17 | // Change the power connection rules to isolate the steam, power, water and kinetic networks. 18 | changePowerRules(); 19 | 20 | #if SERVER 21 | //GameMain.Server?.SendChatMessage("Started Mechtrauma"); 22 | 23 | #elif CLIENT 24 | //GameMain.Client?.SendChatMessage("Started Mechtrauma"); 25 | changeConnectionGUI(); 26 | #endif 27 | } 28 | 29 | // Place holder 30 | public override void Stop() { 31 | // stopping code, e.g. save custom data 32 | #if SERVER 33 | // server-side code 34 | 35 | #elif CLIENT 36 | // client-side code 37 | 38 | #endif 39 | } 40 | } 41 | } -------------------------------------------------------------------------------- /Mechtrauma/CSharp/Shared/powerConnections.cs: -------------------------------------------------------------------------------- 1 | /*** 2 | Modifies the rules of power connections to allow for there to be steam and kinetic grids. 3 | Lots of other functions have to be tampered with to allow for proper implementation of this. 4 | ***/ 5 | using System; 6 | using Barotrauma; 7 | using Barotrauma.Networking; 8 | using System.Reflection; 9 | using System.Collections.Generic; 10 | using Microsoft.Xna.Framework; 11 | using Barotrauma.Items.Components; 12 | using System.Linq; 13 | 14 | namespace Mechtrauma { 15 | partial class Mechtrauma: ACsMod { 16 | 17 | // Change the power connection rules to isolate the steam, power and kinetic networks. 18 | private void changePowerRules() { 19 | // Changes the power connections limits to create steam and kinetic grids as well as the power grid. 20 | GameMain.LuaCs.Hook.HookMethod("Barotrauma.Items.Components.Powered", 21 | typeof(Barotrauma.Items.Components.Powered).GetMethod("ValidPowerConnection", BindingFlags.Static | BindingFlags.Public), 22 | (object self, Dictionary args) => { 23 | 24 | Connection conn1 = (Connection)args["conn1"]; 25 | Connection conn2 = (Connection)args["conn2"]; 26 | 27 | // Don't connect devices that aren't on the power pin or are broken 28 | if (!conn1.IsPower || !conn2.IsPower || conn1.Item.Condition <= 0.0f || conn2.Item.Condition <= 0.0f || 29 | conn1.Item.HasTag("disconnected") || conn2.Item.HasTag("disconnected")) { 30 | return false; 31 | } 32 | 33 | FusedJB device = conn1.Item.GetComponent(); 34 | if (device != null && device.BrokenFuse) { 35 | return false; 36 | } 37 | 38 | device = conn2.Item.GetComponent(); 39 | if (device != null && device.BrokenFuse) { 40 | return false; 41 | } 42 | 43 | // Check if its a steam connection, if so, only connect steam connections 44 | if (conn1.Name.StartsWith("steam") || conn2.Name.StartsWith("steam")) { 45 | return conn1.Name.StartsWith("steam") && conn2.Name.StartsWith("steam") && ( 46 | conn1.IsOutput != conn2.IsOutput || 47 | conn1.Name == "steam" || 48 | conn2.Name == "steam" || 49 | conn1.Item.HasTag("steamjb") || 50 | conn2.Item.HasTag("steamjb") 51 | ); 52 | } else if (conn1.Name.StartsWith("kinetic") || conn2.Name.StartsWith("kinetic")) { 53 | // Check if its a kinetic connection, if so, only connect kinetic connections 54 | return conn1.Name.StartsWith("kinetic") && conn2.Name.StartsWith("kinetic") && ( 55 | conn1.IsOutput != conn2.IsOutput || 56 | conn1.Name == "kinetic" || 57 | conn2.Name == "kinetic" || 58 | conn1.Item.HasTag("kineticjb") || 59 | conn2.Item.HasTag("kineticjb") 60 | ); 61 | } else if (conn1.Name.StartsWith("thermal") || conn2.Name.StartsWith("thermal")) { 62 | // Check if its a thermal connection, if so, only connect thermal connections 63 | return conn1.Name.StartsWith("thermal") && conn2.Name.StartsWith("thermal") && ( 64 | conn1.IsOutput != conn2.IsOutput || 65 | conn1.Name == "thermal" || 66 | conn2.Name == "thermal" || 67 | conn1.Item.HasTag("thermaljb") || 68 | conn2.Item.HasTag("thermaljb") 69 | ); 70 | } else if (conn1.Name.StartsWith("water") || conn2.Name.StartsWith("water")) { 71 | // Check if its a water connection, if so, only connect water connections 72 | return conn1.Name.StartsWith("water") && conn2.Name.StartsWith("water") && ( 73 | conn1.IsOutput != conn2.IsOutput || 74 | conn1.Name == "water" || 75 | conn2.Name == "water" || 76 | conn1.Item.HasTag("waterjb") || 77 | conn2.Item.HasTag("waterjb") 78 | ); 79 | } 80 | 81 | // let the original function handle the rest 82 | return null; 83 | }, LuaCsHook.HookMethodType.Before, this); 84 | 85 | // Grab the isPower property 86 | PropertyInfo isPowerField = typeof(Barotrauma.Items.Components.Connection).GetProperty("IsPower", BindingFlags.Instance | BindingFlags.Public); 87 | 88 | // Change the item connection loading to allow for steam and kinetic networks 89 | // After the constructor correctly set the isPower property, for the steam and kinetic networks 90 | GameMain.LuaCs.Hook.HookMethod("Barotrauma.Items.Components.Connection", 91 | typeof(Barotrauma.Items.Components.Connection).GetConstructor(new[] { typeof(ContentXElement), typeof(ConnectionPanel), typeof(IdRemap) }), 92 | (object self, Dictionary args) => { 93 | switch(((Barotrauma.Items.Components.Connection)self).Name) { 94 | case "steam": 95 | case "steam_out": 96 | case "steam_in": 97 | isPowerField.SetValue(self, true); 98 | break; 99 | case "kinetic": 100 | case "kinetic_out": 101 | case "kinetic_in": 102 | isPowerField.SetValue(self, true); 103 | break; 104 | case "thermal": 105 | case "thermal_out": 106 | case "thermal_in": 107 | isPowerField.SetValue(self, true); 108 | break; 109 | case "water": 110 | case "water_out": 111 | case "water_in": 112 | isPowerField.SetValue(self, true); 113 | break; 114 | } 115 | 116 | return args; 117 | }, LuaCsHook.HookMethodType.After, this); 118 | 119 | // Make powerIn and powerOut fields publically accessible 120 | FieldInfo powerOutField = typeof(Barotrauma.Items.Components.Powered).GetField("powerOut", BindingFlags.Instance | BindingFlags.NonPublic); 121 | FieldInfo powerInField = typeof(Barotrauma.Items.Components.Powered).GetField("powerIn", BindingFlags.Instance | BindingFlags.NonPublic); 122 | 123 | // Correctly assign the powerIn and powerOut for the steam and kinetic networks 124 | GameMain.LuaCs.Hook.HookMethod("Barotrauma.Items.Components.Powered", 125 | typeof(Barotrauma.Items.Components.Powered).GetMethod("OnItemLoaded", BindingFlags.Instance | BindingFlags.Public), 126 | (object self, Dictionary args) => { 127 | Item item = (self as Barotrauma.Items.Components.Powered).Item; 128 | 129 | 130 | if (item.Connections == null) { return args; } 131 | 132 | if (item.HasTag("mtpriority")) { 133 | GameMain.LuaCs.Game.AddPriorityItem(item); 134 | } 135 | 136 | // Get the highest priority device for this item 137 | PowerPriority priority = PowerPriority.Default;; 138 | foreach (var dev in item.GetComponents()) { 139 | PowerPriority currPrior = PowerPriority.Default; 140 | if (dev is RelayComponent) { 141 | currPrior = PowerPriority.Relay; 142 | } else if (dev is PowerContainer) { 143 | currPrior = PowerPriority.Battery; 144 | } else if (dev is Reactor) { 145 | currPrior = PowerPriority.Reactor; 146 | } else if (dev.Item.HasTag("powerabsorber")) { 147 | currPrior = (PowerPriority)10; 148 | } 149 | 150 | if (currPrior > priority) { 151 | priority = currPrior; 152 | } 153 | } 154 | 155 | // Find the powerIn and powerOut connections and assign them 156 | foreach (Connection c in item.Connections) 157 | { 158 | if (!c.IsPower) { continue; } 159 | 160 | c.Priority = priority; 161 | switch (c.Name) { 162 | case "steam_out": 163 | case "kinetic_out": 164 | case "thermal_out": 165 | case "water_out": 166 | powerOutField.SetValue(self, c); 167 | break; 168 | case "kinetic_in": 169 | case "steam_in": 170 | case "thermal_in": 171 | case "water_in": 172 | powerInField.SetValue(self, c); 173 | break; 174 | case "steam": 175 | case "kinetic": 176 | case "thermal": 177 | case "water": 178 | if (c.IsOutput) { 179 | powerOutField.SetValue(self, c); 180 | } else { 181 | powerInField.SetValue(self, c); 182 | } 183 | break; 184 | } 185 | } 186 | 187 | return args; 188 | }, LuaCsHook.HookMethodType.After, this); 189 | 190 | // Remove the power_in pin from the relay check as it causes an uncessary warning that doesn't affect it's functionality 191 | FieldInfo relayDictField = typeof(Barotrauma.Items.Components.RelayComponent).GetField("connectionPairs", BindingFlags.Static | BindingFlags.NonPublic); 192 | Dictionary relayDict = relayDictField.GetValue(null) as Dictionary; 193 | relayDict.Remove("power_in"); 194 | } 195 | } 196 | } -------------------------------------------------------------------------------- /Mechtrauma/CSharp/Shared/simpleGenerator.cs: -------------------------------------------------------------------------------- 1 | /*** 2 | Simple generator component for Mechtrauma that allows for configurable power output and tolerance. 3 | Using negative 'PowerConsumption' variable to provide power to the grid. While positive to add a load. 4 | And the 'PowerTolerance' variable to allow for snapping to the grid demand. 5 | ***/ 6 | using System; 7 | using Barotrauma; 8 | using Barotrauma.Networking; 9 | using System.Reflection; 10 | using System.Collections.Generic; 11 | using Microsoft.Xna.Framework; 12 | using Barotrauma.Items.Components; 13 | using System.Linq; 14 | 15 | namespace Barotrauma.Items.Components 16 | { 17 | class SimpleGenerator : Powered { 18 | 19 | public override bool UpdateWhenInactive => true; 20 | 21 | private bool isOn = false; 22 | [Editable, Serialize(false, IsPropertySaveable.Yes, description: "Is the generator on.", alwaysUseInstanceValues: true)] 23 | public bool IsOn { 24 | get=>isOn; 25 | set=>isOn=value; 26 | } 27 | 28 | public float PowerTolerance { 29 | get => powerTolerance; 30 | set => powerTolerance = MathHelper.Clamp(value, 0.0f, 1.0f); 31 | } 32 | private float powerTolerance = 0.0f; 33 | 34 | // used by network events for clients to update power consumption 35 | [Editable, Serialize(0.0f, IsPropertySaveable.Yes, description: "Power to generate.", alwaysUseInstanceValues: true)] 36 | public float PowerToGenerate { 37 | get => powerToGenerate; 38 | set => powerToGenerate = value; 39 | } 40 | private float powerToGenerate = 0.0f; 41 | 42 | [Editable, Serialize(0.0f, IsPropertySaveable.Yes, description: "Configurable Maximum power output of the device.", alwaysUseInstanceValues: true)] 43 | public float MaxPowerOut { 44 | get => maxPowerOut; 45 | set => maxPowerOut = value; 46 | } 47 | private float maxPowerOut = 0.0f; 48 | 49 | public SimpleGenerator(Item item, ContentXElement element) : base(item, element) { 50 | IsActive = true; 51 | PowerTolerance = 0.0f; 52 | } 53 | 54 | public Connection PowerOut {get=>powerOut;} 55 | 56 | public float GridLoad { 57 | get { 58 | if (powerOut == null || powerOut.Grid == null) { 59 | return 0.0f; 60 | } 61 | 62 | return powerOut.Grid.Load; 63 | } 64 | } 65 | 66 | public override float GetCurrentPowerConsumption(Connection connection) { 67 | if (connection == powerIn || !IsOn) { 68 | return 0.0f; 69 | } 70 | 71 | return (PowerConsumption >= 0 ? PowerConsumption : -1.0f); 72 | } 73 | 74 | // Calculate the min and max power output of the device for the given tolerance 75 | public override PowerRange MinMaxPowerOut(Connection connection, float load = 0) { 76 | if (connection == powerOut) { 77 | float minOut = -PowerConsumption * (1 - PowerTolerance); 78 | float maxOut = -PowerConsumption * (1 + PowerTolerance); 79 | return new PowerRange(minOut, maxOut, MaxPowerOut); 80 | } 81 | return PowerRange.Zero; 82 | } 83 | 84 | // Calculate power output alongside other simple generators in the same network to snap within their tolerances 85 | public override float GetConnectionPowerOut(Connection connection, float power, PowerRange minMaxPower, float load) { 86 | if (connection == powerOut && minMaxPower.Max > 0) { 87 | PowerRange myRange = MinMaxPowerOut(connection, load); 88 | 89 | float ratio = MathHelper.Max((load - power - minMaxPower.Min) / (minMaxPower.Max - minMaxPower.Min), 0); 90 | if (float.IsInfinity(ratio)) 91 | { 92 | ratio = 0; 93 | } 94 | 95 | return MathHelper.Clamp(ratio * (myRange.Max - myRange.Min) + myRange.Min, myRange.Min, myRange.Max); 96 | } 97 | return 0.0f; 98 | } 99 | 100 | public override void Update(float deltaTime, Camera cam) 101 | { 102 | 103 | if (IsOn) { 104 | base.Update(deltaTime, cam); 105 | } 106 | item.SendSignal(IsOn ? "1" : "0", "state_out"); 107 | 108 | } 109 | 110 | public override void ReceiveSignal(Signal signal, Connection connection) 111 | { 112 | if (connection.Name == "toggle") 113 | { 114 | IsOn = !IsOn; 115 | } 116 | else if (connection.Name == "set_state") 117 | { 118 | IsOn = signal.value != "0"; 119 | } 120 | } 121 | 122 | } 123 | } -------------------------------------------------------------------------------- /Mechtrauma/Images/CNC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/CNC.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Containers/Mechtrauma_Crates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Containers/Mechtrauma_Crates.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Containers/mechtrauma_cargo_containers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Containers/mechtrauma_cargo_containers.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Gear/Expedition_DivingSuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Gear/Expedition_DivingSuit.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Gear/Expedition_DivingSuitb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Gear/Expedition_DivingSuitb.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Gear/armored_DivingSuit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Gear/armored_DivingSuit.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Gear/fatboy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Gear/fatboy.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Gear/kit_captain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Gear/kit_captain.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Gear/kit_plague_doctor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Gear/kit_plague_doctor.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Gear/kit_utility.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Gear/kit_utility.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Gear/knight_light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Gear/knight_light.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Gear/knight_lite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Gear/knight_lite.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Generators/seriesC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Generators/seriesC.png -------------------------------------------------------------------------------- /Mechtrauma/Images/LEGACY/circulator_pump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/LEGACY/circulator_pump.png -------------------------------------------------------------------------------- /Mechtrauma/Images/LEGACY/welder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/LEGACY/welder.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Mechtrauma_Mounts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Mechtrauma_Mounts.png -------------------------------------------------------------------------------- /Mechtrauma/Images/PDG500_instructions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/PDG500_instructions.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Pumps/MT_PUMPS_LARGE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Pumps/MT_PUMPS_LARGE.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Pumps/MT_PUMPS_TALL.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Pumps/MT_PUMPS_TALL.png -------------------------------------------------------------------------------- /Mechtrauma/Images/S5000D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/S5000D.png -------------------------------------------------------------------------------- /Mechtrauma/Images/Series5000D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/Series5000D.png -------------------------------------------------------------------------------- /Mechtrauma/Images/TEST_DivingSuit.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/TEST_DivingSuit.PNG -------------------------------------------------------------------------------- /Mechtrauma/Images/argon_station.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/argon_station.png -------------------------------------------------------------------------------- /Mechtrauma/Images/argon_tank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/argon_tank.png -------------------------------------------------------------------------------- /Mechtrauma/Images/battery_bank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/battery_bank.png -------------------------------------------------------------------------------- /Mechtrauma/Images/boiler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/boiler.png -------------------------------------------------------------------------------- /Mechtrauma/Images/boilerh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/boilerh.png -------------------------------------------------------------------------------- /Mechtrauma/Images/cargo_crane.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/cargo_crane.png -------------------------------------------------------------------------------- /Mechtrauma/Images/cargo_hatch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/cargo_hatch.png -------------------------------------------------------------------------------- /Mechtrauma/Images/closet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/closet.png -------------------------------------------------------------------------------- /Mechtrauma/Images/command_final.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/command_final.png -------------------------------------------------------------------------------- /Mechtrauma/Images/copper_pipe_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/copper_pipe_h.png -------------------------------------------------------------------------------- /Mechtrauma/Images/diesel_fuel_barrel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/diesel_fuel_barrel.png -------------------------------------------------------------------------------- /Mechtrauma/Images/diesel_fuel_can.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/diesel_fuel_can.png -------------------------------------------------------------------------------- /Mechtrauma/Images/diesel_fuel_tank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/diesel_fuel_tank.png -------------------------------------------------------------------------------- /Mechtrauma/Images/diesel_generator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/diesel_generator.png -------------------------------------------------------------------------------- /Mechtrauma/Images/dry_suit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/dry_suit.png -------------------------------------------------------------------------------- /Mechtrauma/Images/electrical_panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/electrical_panel.png -------------------------------------------------------------------------------- /Mechtrauma/Images/extinguisher_station.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/extinguisher_station.png -------------------------------------------------------------------------------- /Mechtrauma/Images/extinguisher_tank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/extinguisher_tank.png -------------------------------------------------------------------------------- /Mechtrauma/Images/fuse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/fuse.png -------------------------------------------------------------------------------- /Mechtrauma/Images/gunners_chair.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/gunners_chair.png -------------------------------------------------------------------------------- /Mechtrauma/Images/handtruck.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/handtruck.png -------------------------------------------------------------------------------- /Mechtrauma/Images/keys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/keys.png -------------------------------------------------------------------------------- /Mechtrauma/Images/lcd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/lcd.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechcab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechcab.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma2.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma2.xcf -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_banner.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_command.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_command.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_command_final.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_command_final.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_containers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_containers.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_crates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_crates.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_electrical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_electrical.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_eys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_eys.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_fabricators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_fabricators.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_generator_cabinets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_generator_cabinets.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_generators.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_generators.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_icons.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_logo.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_oxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_oxygen.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_pumps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_pumps.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_pumps_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_pumps_large.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_pumps_tall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_pumps_tall.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_rocket.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mechtrauma_weapons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mechtrauma_weapons.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mt_pumps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mt_pumps.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mt_turrets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mt_turrets.png -------------------------------------------------------------------------------- /Mechtrauma/Images/mt_turrets3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/mt_turrets3.png -------------------------------------------------------------------------------- /Mechtrauma/Images/oil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/oil.png -------------------------------------------------------------------------------- /Mechtrauma/Images/oil2 (2).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/oil2 (2).png -------------------------------------------------------------------------------- /Mechtrauma/Images/oil_barrel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/oil_barrel.png -------------------------------------------------------------------------------- /Mechtrauma/Images/oil_station.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/oil_station.png -------------------------------------------------------------------------------- /Mechtrauma/Images/oxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/oxygen.png -------------------------------------------------------------------------------- /Mechtrauma/Images/oxygen_station.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/oxygen_station.png -------------------------------------------------------------------------------- /Mechtrauma/Images/oxygen_supply.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/oxygen_supply.png -------------------------------------------------------------------------------- /Mechtrauma/Images/oxygentank_compressor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/oxygentank_compressor.png -------------------------------------------------------------------------------- /Mechtrauma/Images/plague_doctor_mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/plague_doctor_mask.png -------------------------------------------------------------------------------- /Mechtrauma/Images/portable_diesel_generator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/portable_diesel_generator.png -------------------------------------------------------------------------------- /Mechtrauma/Images/radiation_suit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/radiation_suit.png -------------------------------------------------------------------------------- /Mechtrauma/Images/radiation_suit2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/radiation_suit2.png -------------------------------------------------------------------------------- /Mechtrauma/Images/reduction_gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/reduction_gear.png -------------------------------------------------------------------------------- /Mechtrauma/Images/shipping_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/shipping_container.png -------------------------------------------------------------------------------- /Mechtrauma/Images/steam_turbine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/steam_turbine.png -------------------------------------------------------------------------------- /Mechtrauma/Images/turnout_gear1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/turnout_gear1.png -------------------------------------------------------------------------------- /Mechtrauma/Images/turnout_gear2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/turnout_gear2.png -------------------------------------------------------------------------------- /Mechtrauma/Images/welder_pack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Images/welder_pack.png -------------------------------------------------------------------------------- /Mechtrauma/Localization/Chinese/MechtraumaSCtext.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 显微分析仪 5 | 生化创伤:用于分析细菌、霉菌、真菌等微生物的显微分析仪。 6 | 细菌样本A4 7 | 经过提纯的A4细菌样本。 8 | A4抗菌药 9 | 针对A4细菌的抗菌药。 10 | 霉菌 11 | 一种不明真菌。 12 | 13 | 铜管(水平) 14 | 可调整长短的水平铜管。 15 | 货物起重机 16 | 快把货吊起来! 17 | 液晶显示屏电视 18 | 液晶显示屏电视 19 | 20 | 货物舱门 21 | 需要运输尺寸超大的货物时你会需要这玩意。 22 | 23 | 文字显示器(大) 24 | 大号文字显示器 25 | 文字显示器(小) 26 | 设计用于最多显示三位数的场景。 27 | 均值组件 28 | 输出收到的输入信号的平均值。需要lua。 29 | 保险丝 30 | 保险丝。 31 | 熔断器板 32 | 装有保险丝的继电器面板,适时熔断以防止电流过高。 33 | 电器面板 34 | 电器面板。 35 | 电池组 36 | 电池组。 37 | 38 | 钥匙 39 | 出门记得带钥匙。 40 | PeasantPrime箱 41 | PeasantPrime箱 42 | 备用供氧罐 43 | 可携带的大号氧气罐,用于为内燃机提供备用氧气。 44 | 防火氧气罐 45 | 防火氧气罐。 46 | 大号氧气罐 47 | 只能用于充氧站的大号氧气罐。 48 | 手推车 49 | 用它来搬运重物,别把背伤了。 50 | 柴油灌装车 51 | 移动式柴油灌装站。 52 | 机油灌装车 53 | 移动式机油灌装站。 54 | 氩气罐 55 | 用于灌装。 56 | 电焊枪 57 | 使用氩气的电焊枪。 58 | 灭火器干粉罐 59 | 用于灌装。 60 | S5灭火器 61 | 只能持续5秒的小型灭火器,可以装在工具带里。 62 | L100灭火器 63 | 大号灭火器,能装在消防战斗服里。 64 | 65 | 气枪 66 | 威力低,但是容易获取和补充的武器。 67 | 铅弹 68 | 气枪弹药。 69 | 炮手椅 70 | 坐好再操炮。 71 | 电磁枪(MT) 72 | 另一种颜色的电磁枪。 73 | .50口径炮塔 74 | 电磁枪的昂贵替代品,好处在于其不需要电力就能开火。 75 | .50口径炮塔装弹器 76 | .50口径炮塔对应的装弹器。 77 | .50口径弹药箱 78 | .50口径炮塔对应的弹药。 79 | 50 cal bolt 80 | 50 cal bolt 81 | 82 | 铁废料 83 | 记得回收! 84 | 铝废料 85 | 记得回收! 86 | 铜废料 87 | 记得回收! 88 | 89 | 封闭式轴承 90 | 用于零件制造的机械部件。 91 | 轴承套 92 | 用于整修磨损的轴承。 93 | 润滑油罐 94 | 一罐润滑油。能加工成独立的润滑油包。 95 | 润滑油包 96 | 用于机械维修的润滑油包。 97 | 铜质绕组 98 | 用于维修电机的铜质绕组。 99 | 100 | 滤油器 101 | 能过滤杂质,延长机油使用寿命。 102 | 轴承 103 | 用于机械维修的轴承。 104 | 电机 105 | 机械设备使用的电动机,俗称马达。 106 | 循环泵 107 | 机械设备使用的循环泵。 108 | 传动齿轮 109 | 机械部件,用于减速机。 110 | 涡轮叶片 111 | 机械部件,用于蒸汽轮机。 112 | CO2滤罐 113 | 装于氧气排放口,用于从空气中过滤二氧化碳。 114 | 115 | 罐装机油 116 | 里面装着昂贵的发动机润滑油。 117 | 桶装机油 118 | 里面装着昂贵的发动机润滑油。 119 | 柴油燃料罐 120 | 一罐5加仑的柴油。 121 | 柴油燃料桶 122 | 一桶50加仑的柴油。 123 | 124 | 小水泵 125 | 用于进/排水。 126 | 水泵 127 | 用于进/排水。 128 | 水泵阀门 129 | 装在潜艇外壳上用于进/排水的阀门。 130 | 氧气灌装压缩机 131 | 将船舱内的氧气压入氧气罐以供使用。 132 | 充氧站 133 | 用于在紧急情况下快速加注或放空氧气罐。 134 | 氧气排放口 135 | 记得定期清洁,并定期更换CO2滤罐。 136 | 制氧机 137 | 机械创伤版本的制氧机。 138 | 加油站 139 | 里面装着昂贵的发动机润滑油。 140 | CNC机械加工台 141 | 机械,成就梦想! 142 | 维修台 143 | 维修潜水服和装备的专用加工台。 144 | 灭火器灌装站 145 | 用于灌装。 146 | 氩气灌装站 147 | 用于灌装。 148 | 149 | 蒸汽锅炉 150 | 通过电力加热水产生蒸汽。 151 | 蒸汽轮机 152 | 蒸汽推动涡轮叶片输出扭矩。 153 | 减速机 154 | 将蒸汽轮机产生的扭矩转化为水平推力。 155 | 156 | 蒸汽锅炉(节能版) 157 | 通过电力加热水产生蒸汽。组件损耗速度降低50%。 158 | 蒸汽轮机(节能版) 159 | 蒸汽推动涡轮叶片输出扭矩。组件损耗速度降低50%。 160 | 减速机(节能版) 161 | 将蒸汽轮机产生的高速低扭矩转换为低速高扭矩,输出水平推力。组件损耗速度降低50%。 162 | 柴油燃料箱 163 | 舰用柴油燃料箱。能用燃料桶灌装燃料罐。 164 | 165 | s1500D柴油发电机 166 | 紧急备用柴油发电机,默认功率1500kW。 167 | s5000D柴油发电机 168 | 柴油发电机,默认功率5000kW。 169 | PDG500柴油发电机 170 | 便携式柴油发电机,默认功率500kw。 171 | 焚化炉 172 | 能让你在巡回中处理掉不想要的物品。 173 | 垃圾桶(MT) 174 | 能让你在巡回中处理掉不想要的物品。 175 | 176 | 储物柜 177 | 整理好你自己的东西!能装大又重的物品。 178 | 储物箱 179 | 用来储存物品,比储物柜容量更大。 180 | 货柜(开启) 181 | 整理好你自己的东西! 182 | 货柜(关闭) 183 | 整理好你自己的东西! 184 | 便捷储柜 185 | 便于紧急情况快速取用。 186 | 作业服柜 187 | 用于存放各式作业服。 188 | 189 | 机修工具背心 190 | 机械工需要携带大量的工具和机械组件。 191 | 工程背包 192 | 工程师需要携带大量的工具和机械组件。 193 | 瘟疫医生面具 194 | 瘟疫医生面具。 195 | 196 | 197 | 重装防化服 198 | 用于进行危险操作的重度防护压力服。额定深度:4500米。抗火,抗辐射,抗外伤。 199 | 200 | 辐射防护服 201 | 提供对辐射的保护效果。 202 | 消防战斗服 203 | 能装备防火氧气罐和L100灭火器。 204 | 干式潜水服 205 | 低压作业服。主要用于潜水艇内部的维修工作,这能减少潜水服的磨损。 206 | 探险潜水服 207 | 探险潜水服。 208 | 装甲潜水服 209 | 专为战斗设计,功能强于外观。 210 | 中世纪盔甲 211 | 来自地球15世纪中期的遗物。绝美的艺术品! 212 | 213 | 瘟疫医生服 214 | 瘟疫医生服 215 | 实用工作服 216 | 实用工作服。 217 | 船长服 218 | 做船长真好。 219 | 220 | PeasantPrime运输任务 221 | 如果你的潜艇上还有空位,我们正在找人运输一堆PeasantPrime箱到[location2],运费[reward]马克。 222 | PeasantPrime箱已成功运抵目的地! 你为推动猖獗的消费主义做出了自己的贡献。 223 | 224 | 储存柜 225 | 用来储存小件物品。 226 | 紧急断路器 227 | 用于紧急切断电源。 228 | 229 | 蒸汽输入 230 | 蒸汽输出 231 | 动能输入 232 | 动能输出 233 | 234 | -------------------------------------------------------------------------------- /Mechtrauma/Localization/Japanese/Japanese.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 銅パイプの水平 4 | 再配置可能な水平銅パイプ。 5 | 顕微鏡分析器 6 | 生体腫:細菌、カビ、真菌などの顕微鏡分析器。 7 | 細菌サンプルA4 8 | A4の洗練された細菌サンプル。 9 | A4抗菌性 10 | A4細菌の抗菌性。 11 | 12 | 未知の真菌。 13 | TextDisPlayLarge 14 | TextDisPlayLarge 15 | textdisplay_short_tight 16 | 3桁の条件などの短い数値用に設計されています。 17 | LCDテレビ 18 | LCDテレビ 19 | 平均コンポーネント 20 | 結合された入力信号の平均を出力します。 Luaが必要です。 21 | 農民の箱 22 | 農民の箱 23 | エアライフル 24 | 低電力、非常にアクセスしやすく、簡単に補充された武器。 25 | 鉛ペレット 26 | エアライフル弾薬。 27 | ゴーナーズチェア 28 | 座ったまま。 29 | Mt Coilgun 30 | コイルガンの代替色。 31 | 50 Calタレット 32 | コイルガンに代わる費用のかかるが、発射する力を吐き出さない。 33 | 50 Cal Loader 34 | 50 Calタレット用の弾薬ローダー。 35 | 50 Cal Ammobox 36 | 50 Calタレット用の弾薬ローダー。 37 | 50 Cal Bolt 38 | 50 Cal Bolt 39 | ヒューズパネル 40 | 過電圧のための犠牲ヒューズを備えた電気リレーパネル。 41 | 電気パネル 42 | 電気パネル。 43 | キーボタン 44 | キーボタン。 45 | バッテリーバンク 46 | 5000kWの最大出力を備えた広大なストレージ容量(エディターでは変更できません)。水没したときに機能しません。 47 | バッテリーバンク 48 | 5000kWの最大出力を備えた広大なストレージ容量(エディターでは変更できません)。水没したときに機能しません。 49 | ヒューズ 50 | ヒューズ 51 | 密封されたベアリング 52 | 部品製造の機械的成分。 53 | ベアリングスリーブ 54 | 使用済みのベアリングを取り戻すため。 55 | グリース缶 56 | グリースの缶。個々のグリースパケットに製造します。 57 | グリースパケット 58 | 機械的な修理と製造のためのグリースパケット。 59 | 銅巻線 60 | 電気モーターを賠償するための銅巻線。 61 | オイルフィルター 62 | ブラックゴールドを救います。 63 | ベアリング 64 | 機械的な修理のためのベアリング。 65 | 電気モーター 66 | 機械の修理のための機械的部分。 67 | サーキュレーターポンプ 68 | 機械用のサーキュレーターポンプ。 69 | ドライブギア 70 | 減速装置などのマシンで使用します。 71 | タービンブレード 72 | 蒸気タービンなどの機械で使用します。 73 | スクラップスチール 74 | リサイクルを忘れないでください! 75 | スクラップアルミニウム 76 | リサイクルを忘れないでください! 77 | スクラップ銅 78 | リサイクルを忘れないでください! 79 | 小さなウォーターポンプ 80 | 水を動かすため。 81 | ウォーターポンプ 82 | 水を動かすため。 83 | ウォーターポンプゲート 84 | 動く水が必要です。 85 | 酸素タンクコンプレッサー 86 | 使用するために船体酸素をタンクに圧縮します。 87 | 耐火性酸素タンク 88 | 耐火性酸素タンク 89 | 酸素タンクが大きい 90 | 酸素ステーションでのみ使用するために、大きな酸素タンク。 91 | 酸素タンクステーション 92 | 酸素タンクをすばやく補充し、緊急時に酸素を放出するため。 93 | 酸素ベント 94 | 定期的に掃除します。 Repalce CO2フィルターを定期的に。 95 | CO2フィルター 96 | 大気からCO2をフィルタリングするため。 97 | 酸素供給 98 | 酸素発生器に代わるメカトラウマ。 99 | 油缶 100 | 黒金。 101 | オイルバレル 102 | 黒金。 103 | 石油ステーション 104 | 黒金。 105 | 溶接機 106 | アルゴンガスを使用する電気溶接機。 107 | ハンドトラック 108 | これを使用して重いものを動かしてください。背中を傷つけないでください。 109 | ストレージクローゼット 110 | あなた自身の後に掃除してください!これは、大きくてかさばるアイテムを保存するためのスペースです。 111 | ストレージコンテナ 112 | キャビネットよりも大きいストレージコンテナ。 113 | 貨物容器が開いています。 114 | あなた自身の後に掃除してください! 115 | 貨物容器は閉じた。 116 | あなた自身の後に掃除してください! 117 | 貨物クレーン。 118 | 貨物の男性を巻き上げ! 119 | 貨物ハッチ。 120 | 時々、あなたは大きなものを動かす必要があります。 121 | クイックキャビネット 122 | 緊急時のクイックアクセス。 123 | CNCメカニカル製造業者 124 | あなたの夢の現実をメカ! 125 | 修理テーブル 126 | ダイビングスーツとギアを賠償するための専用の製造業者。 127 | アルゴンタンク 128 | 補充。 129 | 消火器ステーション 130 | 補充。 131 | DintinguisuseRtank 132 | 補充。 133 | S5_EXTINGUISHER 134 | ベルトに着用できる小さな5秒の消火器。 135 | L100-EXTINGUISHER 136 | ターンギアで使用するための大きな消火器。 137 | アルゴン駅 138 | 補充。 139 | 蒸気ボイラ 140 | 蒸気を生成します。 141 | 蒸気タービン 142 | 蒸気エネルギーを運動エンゲリーに変換します。 143 | 減速ギア 144 | 高速低トルクを低速高トルクに変換します。 145 | ギアロッカー 146 | ギアを保管するため。 147 | ペストドクターマスク 148 | ペストドクターマスク 149 | 放射線スーツ 150 | 放射線の最良の保護。 151 | 放射線スーツ 152 | 放射線スーツ 153 | 投票用品 154 | 耐火性酸素タンクとL100消火器を装備します。 155 | ドライスーツ 156 | 低圧スーツ。サブで修理を行い、ダイビングスーツの摩耗や裂け目を減らすのに役立ちます。 157 | 遠征ダイビングスーツ 158 | 遠征ダイビングスーツ 159 | 装甲ダイビングスーツ 160 | 戦闘用に設計され、フォームオーバーフォームのファイブ。 161 | 鎧のスーツ 162 | 地球からの15世紀半ばの遺物。これは芸術作品です! 163 | ペストドクターキット 164 | ペストドクターキット 165 | ユーティリティキット 166 | ユーティリティキット。 167 | キャプテンキット 168 | キャプテンになるのは良いことです。 169 | ディーゼル燃料缶 170 | ディーゼル燃料の5ガロン缶。 171 | ディーゼル燃料樽 172 | ディーゼル燃料の50ガロンバレル。 173 | ディーゼル燃料タンク 174 | 船のディーゼル燃料タンク。樽から缶を補充します。 175 | ディーゼル発電機 176 | 炭素、電力から。 1500kW 177 | S5000D 178 | 炭素、電力から。 179 | ポータブルディーゼルジェネレーター 180 | 外出先のパワー! 181 | キー 182 | 彼らなしで家を出ないでください。 183 | ごみ箱 184 | さようならIDカード! 185 | 焼却炉 186 | 不要なアイテムを中央に処分します。 187 | メカトラウマのゴミ箱 188 | 不要なアイテムを中央に処分します。 189 | メカニックツールベスト 190 | メカニックには多くのツールとパーツがあります。 191 | エンジニアリングバックパック 192 | エンジニアは、多くのツールと部品を搭載しています。 193 | 農民の出荷 194 | 輸送機に余分なスペースがある場合は、[報酬]マークの報酬のために[location2]に荷物農民の箱を届ける人を探しています。 195 | 農民の箱は正常に配達されました!あなたはramp延する消費主義を可能にするために自分の役割を果たしました。 196 | 農民用の蒸気ボイラー 197 | 蒸気を生成します。 -50%部品劣化速度。 198 | 農民用の蒸気タービン 199 | 蒸気エネルギーを運動エンゲリーに変換します。 -50%部品劣化速度。 200 | 農民向けの減速装置 201 | 高速低トルクを低速高トルクに変換します。 -50%部品劣化速度。 202 | 脂肪少年 203 | 危険な仕事のための重度のシールド圧力訴訟。定格深さ:4,500。火、放射線、肉の傷に耐性があります。 204 | ストレージキャビネット 205 | 小さなアイテムを保存するため。 206 | 緊急切断 207 | 緊急電源の切断。 208 | 酸素移動タンク 209 | 燃焼エンジンにバックアップ酸素を提供するのに役立つ大きなポータブル酸素タンク。 210 | ディーゼルトランスファートラック 211 | モバイルディーゼル移動ステーション。 212 | オイルトランスファートラック 213 | モバイルオイルトランスファーステーション。 214 | 215 | 脂肪少年 216 | 危険な仕事のための重度のシールド圧力訴訟。定格深さ:4,500。火、放射線、肉の傷に耐性があります。 217 | 218 | Steam_Inlet 219 | Steam_Out 220 | Kinetic_Inlet 221 | Kinetic_Out 222 | 223 | -------------------------------------------------------------------------------- /Mechtrauma/Localization/Korean/Korean.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 구리 파이프 수평 4 | 수평 구리 파이프. 5 | 현미경 분석기 6 | Biotrauma : 박테리아, 곰팡이, 곰팡이 등을위한 현미경 분석기 7 | 박테리아 샘플 A4 8 | A4의 정제 된 박테리아 샘플. 9 | A4 항균 10 | A4 박테리아의 항균. 11 | 진균류 12 | 알 수없는 곰팡이. 13 | TextDisplayLarge 14 | TextDisplayLarge 15 | TextDisplay_short_tight 16 | 3 자리 조건과 같은 짧은 숫자로 설계되었습니다. 17 | LCD TV 18 | LCD TV 19 | 평균 구성 요소 20 | 결합 된 입력 신호의 평균을 출력합니다. LUA가 필요합니다. 21 | PEANTORPRIME BOX 22 | PEANTORPRIME BOX 23 | 항공 소총 24 | 저전력, 접근성이 뛰어나고 쉽게 배달되는 무기. 25 | 리드 펠렛 26 | 항공 소총 탄약. 27 | Gonners 의자 28 | 앉아 있습니다. 29 | MT 코일건 30 | 코일 총의 대체 색상. 31 | 50 CAL 포탑 32 | 코일건에 대한 비용이 많이 드는 대안이지만 발사 할 힘이 없습니다. 33 | 50 CAL 로더 34 | 50 CAL 포탑의 탄약 로더. 35 | 50 Cal Ammobox 36 | 50 CAL 포탑의 탄약 로더. 37 | 50 cal 볼트 38 | 50 cal 볼트 39 | 퓨즈 패널 40 | 과전압에 대한 희생 퓨즈가있는 전기 릴레이 패널. 41 | 전기 패널 42 | 전기 패널. 43 | 키 버튼 44 | 키 버튼. 45 | 배터리 뱅크 46 | 5000kW 최대 출력의 광대 한 스토리지 용량 (편집기에서는 변경할 수 없습니다). 침수시 작동하지 않습니다. 47 | 배터리 뱅크 48 | 5000kW 최대 출력의 광대 한 스토리지 용량 (편집기에서는 변경할 수 없습니다). 침수시 작동하지 않습니다. 49 | 퓨즈 50 | 퓨즈 51 | 밀봉 된 베어링 52 | 부품 제조를위한 기계적 구성 요소. 53 | 베어링 슬리브 54 | 중고 베어링을 개조하기 위해. 55 | 그리스 할 수 있습니다 56 | 그리스 캔. 개별 그리스 패킷으로 제작하십시오. 57 | 그리스 패킷 58 | 기계적 수리 및 제조를위한 그리스 패킷. 59 | 구리 권선 60 | 전기 모터를 재구성하기위한 구리 권선. 61 | 오일 필터 62 | 블랙 골드를 절약합니다. 63 | 베어링 64 | 기계 수리를위한 베어링. 65 | 전기 모터 66 | 기계 수리를위한 기계적 부분. 67 | 순환기 펌프 68 | 기계 용 원형 펌프. 69 | 드라이브 기어 70 | 감소 기어와 같은 기계에서 사용합니다. 71 | 터빈 블레이드 72 | 증기 터빈과 같은 기계에서 사용합니다. 73 | 스크랩 스틸 74 | 재활용하는 것을 잊지 마십시오!. 75 | 스크랩 알루미늄 76 | 재활용하는 것을 잊지 마십시오!. 77 | 스크랩 구리 78 | 재활용하는 것을 잊지 마십시오!. 79 | 작은 워터 펌프 80 | 움직이는 물을 위해. 81 | 물 펌프 82 | 움직이는 물을 위해. 83 | 워터 펌프 게이트 84 | 움직이는 물이 필요합니다. 85 | 산소 탱크 압축기 86 | 선체 산소를 사용하기 위해 탱크로 압축합니다. 87 | 내화성 산소 탱크 88 | 내화성 산소 탱크 89 | 산소 탱크가 큽니다 90 | 산소 스테이션에서만 사용하기 위해서만 큰 산소 탱크. 91 | 산소 탱크 스테이션 92 | 산소 탱크를 신속하게 보충하고 응급 상황에서 산소를 방출합니다. 93 | 산소 통풍구 94 | 정기적으로 청소하십시오. Repalce CO2 필터 정기적으로 필터. 95 | CO2 필터 96 | 대기에서 CO2를 필터링하기 위해. 97 | 산소 공급 98 | 산소 발생기에 대한 대안. 99 | 오일 캔 100 | 블랙 골드. 101 | 오일 배럴 102 | 블랙 골드. 103 | 석유소 104 | 블랙 골드. 105 | 용접공 106 | 아르곤 가스를 사용하는 전기 용접기. 107 | 손수레 108 | 이것을 사용하여 무거운 물건을 움직입니다. 등을 다치게하지 마십시오. 109 | 스토리지 옷장 110 | 직접 청소하십시오! 이것은 크고 부피가 큰 품목을 저장하기위한 공간입니다. 111 | 스토리지 컨테이너 112 | 캐비닛보다 큰 저장 용기. 113 | 화물 컨테이너가 열립니다. 114 | 직접 청소하십시오!. 115 | 화물 컨테이너가 닫혔습니다. 116 | 직접 청소하십시오!. 117 | 화물 크레인. 118 | 화물 남자를 들어 올리십시오! 119 | 화물 해치. 120 | 때로는 큰 일을 움직여야합니다. 121 | 빠른 캐비닛 122 | 비상 사태에 대한 빠른 액세스. 123 | CNC 기계식 제작자 124 | 당신의 꿈의 현실을 me습니다!. 125 | 수리 테이블 126 | 다이빙 슈트와 장비를 기본하기위한 전용 제작자. 127 | 아르곤 탱크 128 | 다시 채우다. 129 | 소화기 스테이션 130 | 다시 채우다. 131 | Extinguishertank 132 | 다시 채우다. 133 | S5_ExtingUisher 134 | 벨트에 착용 할 수있는 작은 5 초 소화기. 135 | L100-extinguisher 136 | Turnour 장비에 사용하기위한 대규모 소화기. 137 | 아르곤 스테이션 138 | 다시 채우다. 139 | 스팀 보일러 140 | 증기를 생성합니다. 141 | 증기 터빈 142 | 증기 에너지를 운동 에너지로 변환합니다. 143 | 감소 기어 144 | 고속 저 토크를 저속 고 토크로 변환합니다. 145 | 기어 로커 146 | 장비 저장 용. 147 | 전염병 의사 마스크 148 | 전염병 의사 마스크 149 | 방사 정장 150 | 방사선에 대한 최상의 보호. 151 | 방사 정장 152 | 방사 정장 153 | 투표율 기어 154 | 내화성 산소 탱크와 L100 소화기가 장착됩니다. 155 | 마른 정장 156 | 저압복. 서브에서 수리하고 다이빙 슈트의 마모를 줄이는 데 유용합니다. 157 | 원정 다이빙복 158 | 원정 다이빙복 159 | 장갑 다이빙복 160 | 전투를 위해 설계되었습니다. 161 | 갑옷의 양복 162 | 지구에서 15 세기 중반 유물. 이것은 예술 작품입니다! 163 | 전염병 닥터 키트 164 | 전염병 닥터 키트 165 | 유틸리티 키트 166 | 유틸리티 키트. 167 | 선장 키트 168 | 선장이되는 것이 좋습니다. 169 | 디젤 연료는 할 수 있습니다 170 | 디젤 연료의 5Gallon 캔. 171 | 디젤 연료 배럴 172 | 디젤 연료의 50gallon 배럴. 173 | 디젤 연료 탱크 174 | 선박의 디젤 연료 탱크. 배럴에서 캔을 리필합니다. 175 | 디젤 생성기 176 | 탄소, 전력에서. 1500kW 177 | S5000D 178 | 탄소, 전력에서. 179 | 휴대용 디젤 발전기 180 | 이동 중에 전원! 181 | 열쇠 182 | 그들없이 집을 떠나지 마십시오. 183 | 쓰레기통 184 | 안녕 ID 카드! 185 | 소각로 186 | 원치 않는 항목을 중간에 폐기하십시오. 187 | Mechtrauma Trash Can 188 | 원치 않는 항목을 중간에 폐기하십시오. 189 | 기계 공구 조끼 190 | 기계공은 많은 도구와 부품을 가지고 있습니다. 191 | 엔지니어링 배낭 192 | 엔지니어는 많은 도구와 부품을 운반합니다. 193 | PEANTORPRIME SHIPMENT 194 | 교통편에 여분의 공간이 있다면, 우리는 누군가가 [보상] 마크의 보상을 위해 [location2]에로드 농민 프라이움 상자를 배달하기를 찾고 있습니다. 195 | PEANTORPRIME 상자가 성공적으로 전달되었습니다! 당신은 만연한 소비주의를 가능하게하기 위해 당신의 역할을 수행했습니다. 196 | 농민을위한 증기 보일러 197 | 증기를 생성합니다. -50% 부품 악화 속도. 198 | 농민을위한 증기 터빈 199 | 증기 에너지를 운동 에너지로 변환합니다. -50% 부품 악화 속도. 200 | 농민을위한 감소 장비 201 | 고속 저 토크를 저속 고 토크로 변환합니다. -50% 부품 악화 속도. 202 | 뚱보 소년 203 | 위험한 일자리를위한 압력 소송이 많이 보호됩니다. 정격 깊이 : 4,500. 화재, 방사선 및 살 상처에 저항합니다. 204 | 스토리지 캐비닛 205 | 작은 품목을 저장합니다. 206 | 비상 분리 207 | 비상 전력 분리. 208 | 산소 전달 탱크 209 | 연소 엔진에 백업 산소를 제공하는 데 유용한 대형 휴대용 산소 탱크. 210 | 디젤 이송 트럭 211 | 모바일 디젤 전송 스테이션. 212 | 석유 이송 트럭 213 | 모바일 오일 이송 스테이션. 214 | 215 | 뚱보 소년 216 | 위험한 일자리를위한 압력 소송이 많이 보호됩니다. 정격 깊이 : 4,500. 화재, 방사선 및 살 상처에 저항합니다. 217 | 218 | Steam_Inlet 219 | Steam_Out 220 | Kinetic_Inlet 221 | Kinetic_Out 222 | 223 | -------------------------------------------------------------------------------- /Mechtrauma/Localization/Turkish/Turkish.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | Bakır boru yatay 4 | Yeniden boyutlandırılabilir yatay bakır boru. 5 | Mikroskobik analizör 6 | Biotrauma: Bakteri, küf, mantar vb. İçin mikroskobik analizör 7 | Bakteriyel Örnek A4 8 | A4'ün rafine bir bakteriyel örneği. 9 | A4 antibakteriyel 10 | A4 bakterileri için bir antibakteriyel. 11 | Mantar 12 | Bilinmeyen bir mantar. 13 | textdisplaylarge 14 | textdisplaylarge 15 | textdisplay_short_tight 16 | 3 haneli koşulu gibi kısa sayı için tasarlanmıştır. 17 | LCD televizyon 18 | LCD televizyon 19 | Ortalama bileşen 20 | Birleştirilmiş giriş sinyallerinin ortalamasını çıkarır. Lua gerektirir. 21 | Köylü kutusu 22 | Köylü kutusu 23 | Hava tüfeği 24 | Düşük güç, son derece erişilebilir ve kolayca tekrarlanan bir silah. 25 | Kurşun peleti 26 | Hava tüfeği mühimmat. 27 | Gonners Sandalyesi 28 | Yerinizden kalkmayın. 29 | Mt Coilgun 30 | Bobin tabancaları için alternatif bir renk. 31 | 50 cal taret 32 | Coilgun'a pahalı bir alternatif ama ateş etme gücünü yok etmiyor. 33 | 50 Cal Loader 34 | 50 cal taret için mühimmat yükleyici. 35 | 50 Cal Ammobox 36 | 50 cal taret için mühimmat yükleyici. 37 | 50 Cal Bolt 38 | 50 Cal Bolt 39 | Sigorta paneli 40 | Aşırı gerilim için kurban sigortalı bir elektrik röle paneli. 41 | Elektrik paneli 42 | Elektrik paneli. 43 | Anahtar Düğmesi 44 | Anahtar düğmesi. 45 | Şarj Bankası 46 | 5000kW maksimum çıkışla geniş depolama kapasitesi (editörde değiştirilemez). Batırıldığında çalışmaz. 47 | Şarj Bankası 48 | 5000kW maksimum çıkışla geniş depolama kapasitesi (editörde değiştirilemez). Batırıldığında çalışmaz. 49 | Sigorta 50 | Sigorta 51 | Kapalı yatak 52 | Parça imalatı için mekanik bileşen. 53 | Yatak kolu 54 | Kullanılmış rulmanları yeniden oluşturmak için. 55 | Gres olabilir 56 | Bir kutu gres. Ayrı gres paketlerine imal edin. 57 | Gres paketi 58 | Mekanik onarım ve imalat için gres paketi. 59 | Bakır sargılar 60 | Elektrikli motorları yeniden canlandırmak için bakır sargılar. 61 | Yağ filtresi 62 | Siyah altın tasarrufu sağlar. 63 | Rulman 64 | Mekanik onarımlar için rulman. 65 | Elektrik motoru 66 | Makine onarımları için mekanik parça. 67 | Sirkülatör pompası 68 | Makineler için sirkülatör pompası. 69 | Sürücü dişlisi 70 | Azaltma dişlisi gibi makinelerde kullanım için. 71 | Türbin bıçağı 72 | Buhar türbini gibi makinelerde kullanım için. 73 | Hurda çelik 74 | Geri dönüştürmeyi unutma!. 75 | Hurda alüminyum 76 | Geri dönüştürmeyi unutma!. 77 | Hurda bakır 78 | Geri dönüştürmeyi unutma!. 79 | Küçük su pompası 80 | Hareketli su için. 81 | Su Pompası 82 | Hareketli su için. 83 | Su pompası kapısı 84 | Hareketli su gerektirir. 85 | Oksijen tankı kompresörü 86 | Gövde oksijenini kullanım için tanklara sıkıştırır. 87 | Yangına dayanıklı oksijen tankı 88 | Yangına dayanıklı oksijen tankı 89 | Oksijen tankı büyük 90 | Büyük oksijen tankı, sadece oksijen istasyonlarında kullanım için. 91 | Oksijen tank istasyonu 92 | Oksijen tanklarını hızlı bir şekilde yeniden doldurmak ve acil bir durumda oksijeni serbest bırakmak için. 93 | Oksijen havalandırma 94 | Düzenli olarak temizleyin. Düzenli olarak CO2 filtresi. 95 | CO2 Filtresi 96 | CO2'yi atmosferden filtrelemek için. 97 | Oksijen kaynağı 98 | Mechtrauma oksijen jeneratörüne alternatif. 99 | Yağ tenekesi 100 | Siyah altın. 101 | Petrol namlusu 102 | Siyah altın. 103 | Petrol istasyonu 104 | Siyah altın. 105 | Kaynakçı 106 | Argon gazı kullanan bir elektrikli kaynakçı. 107 | El arabası 108 | Bunu ağır şeyleri hareket ettirmek için kullanın. Sırtını incitme. 109 | Depo dolabı 110 | Kendinizden sonra temizleyin! Bu, büyük, hantal eşyaları depolamak için bir alandır. 111 | Saklama kabı 112 | Depolama kabı, bir dolaptan daha büyük. 113 | Kargo konteyneri açık. 114 | Kendinizden sonra temizleyin!. 115 | Kargo kabı kapalı. 116 | Kendinizden sonra temizleyin!. 117 | Kargo vinç. 118 | Kargo adamlarını kaldırın! 119 | Kargo kapağı. 120 | Bazen büyük şeyleri hareket ettirmeniz gerekir. 121 | Hızlı dolap 122 | Acil durumlar için hızlı erişim. 123 | CNC mekanik imalatçısı 124 | Hayalinizdeki gerçeklik!. 125 | Onarım masası 126 | Dalış kıyafetleri ve dişlileri yeniden düzenlemek için özel imalatçı. 127 | Argon tankı 128 | Yeniden doldurma. 129 | Söndürücü istasyonu 130 | Yeniden doldurma. 131 | Söndürme 132 | Yeniden doldurma. 133 | S5_extinguisher 134 | Kemerinizde giyilebilen küçük bir 5 saniyelik söndürücü. 135 | L100-Extinguisher 136 | Turnour teçhizatında kullanım için büyük bir söndürücü. 137 | Argon istasyonu 138 | Yeniden doldurma. 139 | Buhar kazanı 140 | Buhar üretir. 141 | Buhar türbünü 142 | Buhar enerjisini kinetik büyütmeye dönüştürür. 143 | Azaltma dişlisi 144 | Yüksek hızlı düşük torku düşük hızlı yüksek torka dönüştürür. 145 | Vites şeridi 146 | Dişli depolamak için. 147 | Veba Doktor Maskesi 148 | Veba Doktor Maskesi 149 | Radyasyon kıyafeti 150 | Radyasyon için en iyi koruma. 151 | Radyasyon kıyafeti 152 | Radyasyon kıyafeti 153 | Katılım teçhizatı 154 | Yangına dayanıklı bir oksijen tankı ve bir L100 söndürücü ile donatın. 155 | Kuru takım elbise 156 | Düşük basınçlı takım. Altta onarım yapmak ve dalış kıyafetlerinde aşınma ve yıpranma azaltmak için kullanışlıdır. 157 | Keşif Dalış Takımı 158 | Keşif Dalış Takımı 159 | Zırhlı dalış kıyafeti 160 | Savaş için tasarlanmış, form üzerinde firma. 161 | Koruyucu zırh 162 | Dünya'dan 15. yüzyılın ortalarında kalıntı. Bu bir sanat eseri! 163 | Veba Doktor Kiti 164 | Veba Doktor Kiti 165 | Kamu hizmeti kiti 166 | Fayda kiti. 167 | Kaptanlar Kiti 168 | Kaptan olmak güzel. 169 | Dizel yakıt kutusu 170 | 5gallon kutu dizel yakıt. 171 | Dizel yakıt namlu 172 | 50 gallon namlu dizel yakıt. 173 | Dizel yakıt deposu 174 | Geminin dizel yakıt deposu. Barellardan kutuları doldurur. 175 | Dizel jeneratör 176 | Karbondan, güç. 1500kw 177 | S5000D 178 | Karbondan, güç. 179 | Taşınabilir dizel jeneratör 180 | Hareket halindeyken güç! 181 | Anahtarlar 182 | Onlarsız evden ayrılmayın. 183 | Çöp tenekesi 184 | Hoşçakal Kimlik Kartları! 185 | Yakma fırını 186 | İstenmeyen eşyaların orta aşınması. 187 | Mechtrauma çöp kutusu 188 | İstenmeyen eşyaların orta aşınması. 189 | Mekanik Takım Yeleği 190 | Bir tamirci birçok araç ve parça taşır. 191 | Mühendislik sırt çantası 192 | Bir mühendis birçok araç ve parça taşır. 193 | Köylü sevkiyatı 194 | Taşımanızda ekstra alanınız varsa, [Location2] 'e [ödül] işaretlerinin bir ödülü için bir yük köylü kutuları teslim etmeyi arıyoruz. 195 | Köylü kutuları başarıyla teslim edildi! Yaygın tüketiciliği sağlamak için üzerinize düşeni yaptınız. 196 | Köylüler için buhar kazan 197 | Buhar üretir. % -50 parça bozulma hızı. 198 | Köylüler için buhar türbini 199 | Buhar enerjisini kinetik büyütmeye dönüştürür. % -50 parça bozulma hızı. 200 | Köylüler için indirgeme dişlisi 201 | Yüksek hızlı düşük torku düşük hızlı yüksek torka dönüştürür. % -50 parça bozulma hızı. 202 | Şişko 203 | Tehlikeli işler için ağır korumalı basınç kıyafeti. Nominal Derinlik: 4.500. Ateşe, radyasyona ve et yaralarına dirençli. 204 | Saklama kabini 205 | Küçük öğeleri saklamak için. 206 | Acil durum bağlantısı 207 | Acil Durum Gücü Bağlantısı. 208 | Oksijen transfer tankı 209 | Yanma motorlarına yedek oksijen sağlamak için yararlı olan büyük bir portatif oksijen tankı. 210 | Dizel transfer kamyonu 211 | Mobil dizel transfer istasyonu. 212 | Petrol transfer kamyonu 213 | Mobil Yağ Transfer İstasyonu. 214 | 215 | Şişko 216 | Tehlikeli işler için ağır korumalı basınç kıyafeti. Nominal Derinlik: 4.500. Ateşe, radyasyona ve et yaralarına dirençli. 217 | 218 | Steam_Inlet 219 | Steam_Out 220 | Kinetic_Inlet 221 | Kinetic_Out 222 | -------------------------------------------------------------------------------- /Mechtrauma/Lua/Autorun/init.lua: -------------------------------------------------------------------------------- 1 | MT = {} -- Mechtrauma 2 | BT = {} -- Biotrauma 3 | 4 | 5 | MT.Name="Mechtrauma" 6 | MT.Version = "1.2.0" 7 | MT.VersionNum = 01020000 -- seperated into groups of two digits: 01020304 -> 1.2.3h4; major, minor, patch, hotfix 8 | MT.Path = table.pack(...)[1] 9 | 10 | -- register mechtrauma as a neurotrauma "expansion" 11 | MT.MinNTVersion = "A1.8.1" 12 | MT.MinNTVersionNum = 01080100 13 | Timer.Wait(function() if NTC ~= nil and NTC.RegisterExpansion ~= nil then NTC.RegisterExpansion(MT) end end,1) 14 | 15 | 16 | -- config loading 17 | if not File.Exists(MT.Path .. "/config.json") then 18 | 19 | -- create default config if there is no config file 20 | MT.Config = dofile(MT.Path .. "/Lua/defaultconfig.lua") 21 | File.Write(MT.Path .. "/config.json", json.serialize(MT.Config)) 22 | 23 | else 24 | 25 | -- load existing config 26 | MT.Config = json.parse(File.Read(MT.Path .. "/config.json")) 27 | 28 | -- add missing entries 29 | local defaultConfig = dofile(MT.Path .. "/Lua/defaultconfig.lua") 30 | for key, value in pairs(defaultConfig) do 31 | if MT.Config[key] == nil then 32 | MT.Config[key] = value 33 | end 34 | end 35 | end 36 | 37 | -- SHARED: client/server code 38 | 39 | -- functions 40 | dofile(MT.Path.."/Lua/Scripts/Shared/helperFunctions.lua") 41 | dofile(MT.Path.."/Lua/Scripts/Shared/biotraumaFunctions.lua") 42 | dofile(MT.Path.."/Lua/Scripts/Shared/mechtraumaFunctions.lua") 43 | 44 | -- SHARED: client/server code 45 | dofile(MT.Path.."/Lua/Scripts/Shared/mechtraumaPower.lua") 46 | 47 | 48 | -- SERVER: server-side code (also run in singleplayer) 49 | if (Game.IsMultiplayer and SERVER) or not Game.IsMultiplayer then 50 | 51 | -- Version and expansion display 52 | Timer.Wait(function() Timer.Wait(function() 53 | local runstring = "\n/// Running Mechtrauma V "..MT.Version.." ///\n" 54 | 55 | -- add dashes 56 | local linelength = string.len(runstring)+4 57 | local i = 0 58 | while i < linelength do runstring=runstring.."-" i=i+1 end 59 | 60 | -- if you were to ever create mechtrauma expansions then here would be the place 61 | -- to print them out alongside the mechtrauma version 62 | 63 | print(runstring) 64 | end,1) end,1) 65 | 66 | -- this is where we run all the other lua files 67 | dofile(MT.Path.."/Lua/Scripts/Server/treatmentItems.lua") 68 | dofile(MT.Path.."/Lua/Scripts/Server/mechtrauma.lua") 69 | dofile(MT.Path.."/Lua/Scripts/Server/biotrauma.lua") 70 | dofile(MT.Path.."/Lua/Scripts/Server/updateCounter.lua") 71 | dofile(MT.Path.."/Lua/Scripts/Server/updateItems.lua") 72 | dofile(MT.Path.."/Lua/Scripts/Server/updateHumans.lua") 73 | dofile(MT.Path.."/Lua/Scripts/testing.lua") 74 | end 75 | 76 | -- CLIENT: side-code 77 | if CLIENT then 78 | dofile(MT.Path.."/Lua/Scripts/Client/configgui.lua") 79 | dofile(MT.Path.."/Lua/Scripts/Client/csluacheck.lua") 80 | end 81 | 82 | -- PERFORMANCE FIX: 83 | Hook.Add("roundStart", "MT.roundStart", function() 84 | -- DO NOT REMOVE - corrects power grid desyncs from the performance fix mod 85 | Game.poweredUpdateInterval = 1 86 | end) 87 | -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/Client/csluacheck.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | This example shows how to create a basic custom GUI. The GUI will appear top right of your in game screen. 3 | --]] 4 | 5 | if SERVER then return end -- we don't want server to run GUI code. 6 | 7 | if not CSActive then 8 | local menuOpen = false 9 | 10 | -- our main frame where we will put our custom GUI 11 | local frame = GUI.Frame(GUI.RectTransform(Vector2(1, 1)), nil) 12 | frame.CanBeFocused = false 13 | 14 | -- menu frame 15 | local menu = GUI.Frame(GUI.RectTransform(Vector2(1, 1), frame.RectTransform, GUI.Anchor.Center), nil) 16 | menu.CanBeFocused = false 17 | menu.Visible = true 18 | 19 | -- put a button that goes behind the menu content, so we can close it when we click outside 20 | local closeButton = GUI.Button(GUI.RectTransform(Vector2(1, 1), menu.RectTransform, GUI.Anchor.Center), "", GUI.Alignment.Center, nil) 21 | closeButton.OnClicked = function () 22 | menu.Visible = not menu.Visible 23 | end 24 | 25 | -- a button top right of our screen to open a sub-frame menu 26 | local button = GUI.Button(GUI.RectTransform(Vector2(0.2, 0.2), frame.RectTransform, GUI.Anchor.TopRight), "!PROBLEM! CsForBarotrauma is not enabled!", GUI.Alignment.Center, "GUIButtonSmall") 27 | button.RectTransform.AbsoluteOffset = Point(25, 50) 28 | button.OnClicked = function () 29 | menu.Visible = not menu.Visible 30 | end 31 | 32 | local menuContent = GUI.Frame(GUI.RectTransform(Vector2(0.4, 0.2), menu.RectTransform, GUI.Anchor.Center)) 33 | local menuList = GUI.ListBox(GUI.RectTransform(Vector2(1, 1), menuContent.RectTransform, GUI.Anchor.BottomCenter)) 34 | 35 | local coloredText = GUI.TextBlock(GUI.RectTransform(Vector2(1, 0.2), menuList.Content.RectTransform), "!PROBLEM! CsForBarotrauma is not enabled!", nil, nil, GUI.Alignment.Center) coloredText.TextColor = Color(255, 0, 0) 36 | 37 | local coloredText = GUI.TextBlock(GUI.RectTransform(Vector2(1, 0.2), menuList.Content.RectTransform), "CsForBarotrauma is not enabled! This is a required mod and Mechtrauma will not function without it!", nil, nil, GUI.Alignment.Center) coloredText.TextColor = Color(255, 0, 0) 38 | local coloredText = GUI.TextBlock(GUI.RectTransform(Vector2(1, 0.2), menuList.Content.RectTransform), "Make sure that you are subscribed to CsForBarotrauma the steam workshop and that it is enabled.", nil, nil, GUI.Alignment.Center) coloredText.TextColor = Color(255, 0, 0) 39 | 40 | 41 | 42 | Hook.Patch("Barotrauma.GameScreen", "AddToGUIUpdateList", function() 43 | frame.AddToGUIUpdateList() 44 | end) 45 | end -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/Server/bacteria_analyzer.lua: -------------------------------------------------------------------------------- 1 | 2 | 3 | Hook.Add("mechtraumaBacteriaAnalyze.OnUse", "BT.bacteriaAnalyze", function(effect, deltaTime, item, targets, worldPosition, client) 4 | local fungusPrefab = ItemPrefab.GetItemPrefab("spore_fungus") 5 | local samplePrefab = ItemPrefab.GetItemPrefab("bacterial_sample_a4") 6 | 7 | local outcome = math.random(250) 8 | local terminal = item.GetComponentString("Terminal") 9 | 10 | 11 | 12 | if outcome > 0 then 13 | --print("sucess, spawning an item with an outcome of:", outcome) 14 | Entity.Spawner.AddItemToSpawnQueue(samplePrefab, item.OwnInventory, nil, nil, function(item) end) 15 | -- attempt to clear the previous message 16 | -- terminal.ReceiveSignal(Signal(1),term.Connections[4]) 17 | terminal.ShowMessage = "*******POSITIVE*******" 18 | terminal.ShowMessage = "Compound A4 has been identified in sample tube." 19 | 20 | 21 | if SERVER then 22 | 23 | terminal.SyncHistory() 24 | end 25 | 26 | 27 | else 28 | terminal.ShowMessage = "*******NEGATIVE*******" 29 | terminal.ShowMessage = "No known compound has been identified." 30 | 31 | print("failure, not spawning an item with an outcome of:", outcome) 32 | print(item.GetComponentString("ItemContainer")) 33 | end 34 | 35 | end) 36 | 37 | -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/Server/biotrauma.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | Hook.Add("mechtraumaVentInterval.OnActive", "examples.Mechtrauma", function(effect, deltaTime, item, targets, worldPosition, client) 3 | 4 | local fungusPrefab = ItemPrefab.GetItemPrefab("spore_fungus") 5 | local outcome = 666 math.random(100000) 6 | 7 | if outcome == 666 then 8 | -- print("sucess, spawning an item with an outcome of:", outcome) 9 | Entity.Spawner.AddItemToSpawnQueue(fungusPrefab, item.OwnInventory, nil, nil, function(item) end) 10 | else 11 | 12 | -- print("failure, not spawning an item with an outcome of:", outcome) 13 | -- print(item.GetComponentString("ItemContainer")) 14 | end 15 | 16 | end)]] 17 | 18 | Hook.Add("mechtraumaBacteriaAnalyze.OnUse", "BT.bacteriaAnalyze", function(effect, deltaTime, item, targets, worldPosition, client) 19 | local fungusPrefab = ItemPrefab.GetItemPrefab("spore_fungus") 20 | local samplePrefab = ItemPrefab.GetItemPrefab("bacterial_sample_a4") 21 | 22 | local outcome = math.random(250) 23 | local terminal = item.GetComponentString("Terminal") 24 | 25 | 26 | 27 | if outcome > 0 then -- this is a hack the disables failure 28 | --print("sucess, spawning an item with an outcome of:", outcome) 29 | Entity.Spawner.AddItemToSpawnQueue(samplePrefab, item.OwnInventory, nil, nil, function(item) end) 30 | -- attempt to clear the previous message 31 | -- terminal.ReceiveSignal(Signal(1),term.Connections[4]) 32 | terminal.ShowMessage = "*******POSITIVE*******" 33 | terminal.ShowMessage = "Compound A4 has been identified in sample tube." 34 | 35 | 36 | if SERVER then 37 | 38 | terminal.SyncHistory() 39 | end 40 | 41 | 42 | else 43 | terminal.ShowMessage = "*******NEGATIVE*******" 44 | terminal.ShowMessage = "No known compound has been identified." 45 | 46 | --print("failure, not spawning an item with an outcome of:", outcome) 47 | --print(item.GetComponentString("ItemContainer")) 48 | end 49 | 50 | end) 51 | 52 | -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/Server/treatmentitems.lua: -------------------------------------------------------------------------------- 1 | 2 | Hook.Add("item.applyTreatment", "MT.itemused", function(item, usingCharacter, targetCharacter, limb) 3 | 4 | if -- invalid use, dont do anything 5 | item == nil or 6 | usingCharacter == nil or 7 | targetCharacter == nil or 8 | limb == nil 9 | then return end 10 | 11 | local identifier = item.Prefab.Identifier.Value 12 | 13 | local methodtorun = MT.ItemMethods[identifier] -- get the function associated with the identifer 14 | if(methodtorun~=nil) then 15 | -- run said function 16 | methodtorun(item, usingCharacter, targetCharacter, limb) 17 | return 18 | end 19 | 20 | -- startswith functions 21 | for key,value in pairs(MT.ItemStartsWithMethods) do 22 | if HF.StartsWith(identifier,key) then 23 | value(item, usingCharacter, targetCharacter, limb) 24 | return 25 | end 26 | end 27 | 28 | end) 29 | 30 | -- storing all of the item-specific functions in a table 31 | MT.ItemMethods = {} -- with the identifier as the key 32 | MT.ItemStartsWithMethods = {} -- with the start of the identifier as the key 33 | 34 | 35 | -- misc 36 | 37 | --[[ 38 | MT.ItemMethods.exampleidentifier = function(item, usingCharacter, targetCharacter, limb) 39 | HF.AddAffliction(targetCharacter,"radiationsickness",1,usingCharacter) 40 | end 41 | ]] 42 | 43 | -- startswith region begins 44 | 45 | -- none yet 46 | 47 | -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/Server/updateCounter.lua: -------------------------------------------------------------------------------- 1 | -- centralized counter for both human and item updates 2 | MT.UpdateCooldown = 0 3 | MT.UpdateInterval = 120 4 | MT.Deltatime = MT.UpdateInterval/60 -- Time in seconds that transpires between updates 5 | 6 | MT.PriorityUpdateCooldown = 0 7 | MT.PriorityUpdateInterval = 15 8 | MT.PriorityDeltatime = MT.UpdateInterval/60 -- Time in seconds that transpires between updates 9 | 10 | 11 | Hook.Add("think", "MT.update", function() 12 | 13 | -- only run updates if the game is running 14 | if MT.HF.GameIsRunning() then 15 | MT.UpdateCooldown = MT.UpdateCooldown-1 16 | if (MT.UpdateCooldown <= 0) then 17 | MT.UpdateCooldown = MT.UpdateInterval 18 | MT.updateHumans() 19 | MT.updateItems() 20 | end 21 | end 22 | end) 23 | 24 | 25 | --[[ 26 | MT.PriorityUpdateCooldown = MT.PriorityUpdateCooldown-1 27 | if (MT.PriorityUpdateCooldown <= 0) then 28 | MT.PriorityUpdateCooldown = MT.PriorityUpdateInterval 29 | --priority updates here 30 | end]] 31 | -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/Server/updateHumans.lua: -------------------------------------------------------------------------------- 1 | 2 | -- gets run once every two seconds 3 | function MT.updateHumans() 4 | 5 | local updateHumans = {} 6 | local amountHumans = 0 7 | 8 | -- fetch characters to update 9 | for key, character in pairs(Character.CharacterList) do 10 | if (character.IsHuman and not character.IsDead) then 11 | table.insert(updateHumans, character) 12 | amountHumans = amountHumans + 1 13 | end 14 | end 15 | 16 | -- we spread the characters out over the duration of an update so that the load isnt done all at once 17 | for key, value in pairs(updateHumans) do 18 | -- make sure theyre still alive and human 19 | if (value ~= nil and not value.Removed and value.IsHuman and not value.IsDead) then 20 | Timer.Wait(function () 21 | if (value ~= nil and not value.Removed and value.IsHuman and not value.IsDead) then 22 | MT.UpdateHuman(value) end 23 | end, ((key + 1) / amountHumans) * MT.Deltatime * 1000) 24 | end 25 | end 26 | end 27 | 28 | -- some local functions to avoid code duplicates 29 | local limbtypes = { 30 | LimbType.Torso, 31 | LimbType.Head, 32 | LimbType.LeftArm, 33 | LimbType.RightArm, 34 | LimbType.LeftLeg, 35 | LimbType.RightLeg, 36 | } 37 | 38 | -- define all the afflictions and their update functions 39 | MT.Afflictions = { 40 | 41 | -- That dastardly spore infection of yours 42 | spore_infection={max=400,update=function(c,i) 43 | if c.stats.stasis then return end -- don't do anything if in stasis 44 | if c.afflictions[i].strength < 1 then return end -- don't do anything if the affliction isn't present 45 | 46 | -- if this line wasnt commented out, it would adjust the affliction strength 47 | -- of whoever has it by "gain" per second 48 | -- this is better for performance than the XML method of strengthchange, 49 | -- because it only happens once every 2 seconds and doesn't require additional networking 50 | -- of the interval timers 51 | 52 | -- c.afflictions[i].strength = c.afflictions[i].strength + gain * MT.Deltatime 53 | 54 | 55 | -- this is where we *properly* cause symptoms! 56 | if NTC ~= nil then 57 | -- shortness of breath (and all other bad stuff) starts at 100 strength 58 | if c.afflictions[i].strength > 100 then 59 | NTC.SetSymptomTrue(c.character,"dyspnea",2) 60 | 61 | local respiratoryArrestChance = ((c.afflictions[i].strength-100)/150) * 0.02 62 | local seizureChance = ((c.afflictions[i].strength-100)/150) * 0.05 63 | 64 | if MT.HF.Chance(respiratoryArrestChance) then 65 | NTC.SetSymptomTrue(c.character,"triggersym_respiratoryarrest",1) 66 | end 67 | 68 | if MT.HF.Chance(seizureChance) then 69 | NTC.SetSymptomTrue(c.character,"triggersym_seizure",1) 70 | end 71 | end 72 | else 73 | -- consider giving some adverse effects in case neurotrauma isnt enabled 74 | end 75 | end 76 | }, 77 | -- electrocution 78 | electrocution={max=200,update=function(c,i) 79 | if c.afflictions[i].strength < 1 then return end -- don't do anything if the affliction isn't present 80 | 81 | local electrocutionExponent = 1.1 82 | local stunStrength = 4 83 | local burnStrength = (c.afflictions[i].strength) / 5 ^ electrocutionExponent 84 | local fibrillationStrength = burnStrength ^ electrocutionExponent 85 | print("Fibrilation applied: ", fibrillationStrength) 86 | print("Burn applied: ", burnStrength) 87 | 88 | -- check for Neurotrauma 89 | if NTC ~= nil then 90 | --electrocution effects 91 | MT.HF.AddAffliction(c.character,"burn",burnStrength) 92 | --MT.HF.AddAffliction(c.character,"stun",stunStrength) 93 | if c.afflictions[i].strength > 20 then MT.HF.Fibrillate(c.character,fibrillationStrength) end -- anything over 2000kW 94 | else 95 | --vanilla electrocution effects 96 | burnStrength = burnStrength * 2 97 | MT.HF.AddAffliction(c.character,"burn",burnStrength) 98 | MT.HF.AddAffliction(c.character,"stun",stunStrength) 99 | end 100 | 101 | c.afflictions[i].strength = 0 -- electrocution is punctiliar, once it's happened it happened and only the symptoms remain. 102 | end 103 | }, 104 | 105 | -- co2 poisoning 106 | co2_poisoning={max=1000,update=function(c,i) 107 | if c.stats.stasis then return end -- don't do anything if in stasis 108 | if c.afflictions[i].strength < 1 then return end -- don't do anything if the affliction isn't present 109 | 110 | -- shortness of breath (and all other bad stuff) starts at 50 strength 111 | if c.afflictions[i].strength > 50 then 112 | if NTC ~= nil then 113 | NTC.SetSymptomTrue(c.character,"dyspnea",2) 114 | end 115 | 116 | -- i recommend doing some research on what co2 poisoning does irl 117 | -- it definitely doesnt suck the oxygen out of your blood (your implementation used to give hypoxemia) 118 | MT.HF.AddAffliction(c.character,"oxygenlow",MT.HF.Clamp( 119 | (c.afflictions[i].strength-50)/10, 120 | 0,20 121 | )) 122 | end 123 | end 124 | }, 125 | } 126 | -- define all the limb specific afflictions and their update functions 127 | MT.LimbAfflictions = { 128 | 129 | --[[ 130 | example={update=function(c,limbaff,i,type) 131 | -- removes itself 1% per second 132 | limbaff[i].strength = limbaff[i].strength-1*MT.Deltatime 133 | end 134 | } 135 | 136 | steam_burn={max=200,update=function(c,limbaff,i) 137 | if limbaff[i].strength < 50 then 138 | limbaff[i].strength = limbaff[i].strength - (c.afflictions.immunity.prev/3000 + HF.Clamp(limbaff.bandaged.strength,0,1)*0.1)*c.stats.healingrate*NT.Deltatime 139 | end 140 | end 141 | }]] 142 | 143 | } 144 | -- define the stats, states and multipliers 145 | MT.CharStats = { 146 | stasis={getter=function(c) return NT~=nil and MT.HF.HasAffliction(c.character,"stasis") end} 147 | } 148 | 149 | 150 | function MT.UpdateHuman(character) 151 | 152 | local charData = {character=character,afflictions={},stats={}} 153 | 154 | -- fetch all the current affliction data 155 | for identifier,data in pairs(MT.Afflictions) do 156 | local strength = MT.HF.GetAfflictionStrength(character,identifier,data.default or 0) 157 | charData.afflictions[identifier] = {prev=strength,strength=strength} 158 | end 159 | -- fetch and calculate all the current stats 160 | for identifier,data in pairs(MT.CharStats) do 161 | if data.getter ~= nil then charData.stats[identifier] = data.getter(charData) 162 | else charData.stats[identifier] = data.default or 1 end 163 | end 164 | -- update non-limb-specific afflictions 165 | for identifier,data in pairs(MT.Afflictions) do 166 | if data.update ~= nil then 167 | data.update(charData,identifier) end 168 | end 169 | 170 | 171 | -- update and apply limb specific stuff 172 | local function FetchLimbData(type) 173 | local keystring = tostring(type).."afflictions" 174 | charData[keystring] = {} 175 | for identifier,data in pairs(MT.LimbAfflictions) do 176 | local strength = MT.HF.GetAfflictionStrengthLimb(character,type,identifier,data.default or 0) 177 | charData[keystring][identifier] = {prev=strength,strength=strength} 178 | end 179 | end 180 | local function UpdateLimb(type) 181 | local keystring = tostring(type).."afflictions" 182 | for identifier,data in pairs(MT.LimbAfflictions) do 183 | if data.update ~= nil then 184 | data.update(charData,charData[keystring],identifier,type) end 185 | end 186 | end 187 | local function ApplyLimb(type) 188 | local keystring = tostring(type).."afflictions" 189 | for identifier,data in pairs(charData[keystring]) do 190 | local newval = MT.HF.Clamp( 191 | data.strength, 192 | MT.LimbAfflictions[identifier].min or 0, 193 | MT.LimbAfflictions[identifier].max or 100) 194 | if newval ~= data.prev then 195 | if MT.LimbAfflictions[identifier].apply == nil then 196 | MT.HF.SetAfflictionLimb(character,identifier,type,newval) 197 | else 198 | MT.LimbAfflictions[identifier].apply(charData,identifier,type,newval) 199 | end 200 | end 201 | end 202 | end 203 | 204 | -- stasis completely halts activity in limbs 205 | if not charData.stats.stasis then 206 | for type in limbtypes do 207 | FetchLimbData(type) 208 | end 209 | for type in limbtypes do 210 | UpdateLimb(type) 211 | end 212 | for type in limbtypes do 213 | ApplyLimb(type) 214 | end 215 | end 216 | 217 | -- non-limb-specific late update (useful for things that use stats that are altered by limb specifics) 218 | for identifier,data in pairs(MT.Afflictions) do 219 | if data.lateupdate ~= nil then 220 | data.lateupdate(charData,identifier) end 221 | end 222 | 223 | -- apply non-limb-specific changes 224 | for identifier,data in pairs(charData.afflictions) do 225 | local newval = MT.HF.Clamp( 226 | data.strength, 227 | MT.Afflictions[identifier].min or 0, 228 | MT.Afflictions[identifier].max or 100) 229 | if newval ~= data.prev then 230 | if MT.Afflictions[identifier].apply == nil then 231 | MT.HF.SetAffliction(character,identifier,newval) 232 | else 233 | MT.Afflictions[identifier].apply(charData,identifier,newval) 234 | end 235 | end 236 | end 237 | end -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/Server/updateItems.lua: -------------------------------------------------------------------------------- 1 | 2 | -- Establish Mechtrauma item cache 3 | MT.itemCache = {} 4 | MT.itemCacheCount = 0 5 | MT.oxygenVentCount = 0 6 | 7 | --table of tag functions - this is for mapping items to update functions 8 | MT.tagfunctions = { 9 | divingSuit={ 10 | tags={"deepdiving","diving"}, 11 | update=MT.F.divingSuit 12 | }, 13 | fuseBox={ 14 | tags={"fusebox"}, 15 | update=MT.F.fuseBox 16 | }, 17 | oxygenVentSpawn={ --move to BT function table some day 18 | tags={"oxygenventspawn"}, 19 | update=BT.F.oxygenVentSpawn 20 | }, 21 | centralComputerNeeded={ 22 | tags={"ccn"}, 23 | update=MT.F.centralComputerNeeded 24 | }, 25 | dieselGenerator={ 26 | tags={"dieselGenerator"}, 27 | update=MT.F.dieselGenerator 28 | }, 29 | steamBoiler={ 30 | tags={"steamBoiler"}, 31 | update=MT.F.steamBoiler 32 | }, 33 | steamTurbine={ 34 | tags={"steamturbine"}, 35 | update=MT.F.steamTurbine 36 | }, 37 | reductionGear={ 38 | tags={"reductionGear"}, 39 | update=MT.F.reductionGear 40 | }, 41 | centralComputer={ 42 | tags={"centralcomputer"}, 43 | update=MT.F.centralComputer 44 | }, 45 | keyIgnition={ 46 | tags={"keyignition"}, 47 | update=MT.F.keyIgnition 48 | } 49 | } 50 | 51 | -- run once per MT.Deltatime (2 seconds) by updateCounter.lua 52 | function MT.updateItems() 53 | local updateItemsCounter = 0 54 | 55 | -- we spread the item updates out over the duration of an update so that the load isnt done all at once 56 | for key, value in pairs(MT.itemCache) do 57 | -- make sure the items still exists 58 | if (key ~= nil and not key.Removed) then 59 | Timer.Wait(function () 60 | if (key ~= nil and not key.Removed) then 61 | MT.UpdateItem(key) 62 | updateItemsCounter = updateItemsCounter + 1 63 | end 64 | end, ((updateItemsCounter + 1) / MT.itemCacheCount) * MT.Deltatime * 1000) 65 | end 66 | end 67 | end 68 | 69 | -- called once for each item in MT.itemCache 70 | function MT.UpdateItem(item) 71 | -- loop through the tag functions to see if we have a matching function for the item tag(s) 72 | for tagfunctiondata in MT.tagfunctions do 73 | -- see if all required tags are present on the item 74 | local hasalltags = true 75 | for tag in tagfunctiondata.tags do 76 | if not item.HasTag(tag) then 77 | hasalltags = false 78 | break 79 | end 80 | end 81 | -- call the function if all required tags are present 82 | if hasalltags then 83 | tagfunctiondata.update(item) 84 | end 85 | end 86 | 87 | end 88 | 89 | -- adds eligible items to the item cache 90 | function MT.CacheItem(item) 91 | 92 | if not MT.itemCache[item] then 93 | -- CHECK: should this item be in the cache 94 | if item.HasTag("mtu") or item.HasTag("mtupdate") then 95 | -- CHECK: if the item is already in the cache, if not - add it. 96 | MT.itemCache[item] = {} 97 | MT.itemCache[item].counter = 0 98 | MT.itemCacheCount = MT.itemCacheCount + 1 99 | 100 | -- this is here so that we don't double up execute on initialization and item creation 101 | if item.Prefab.Identifier.Value == "oxygen_vent" then 102 | -- count the oxygen vents when you populate the cache 103 | MT.oxygenVentCount = MT.oxygenVentCount + 1 104 | end 105 | 106 | elseif item.HasTag("diving") and item.HasTag("deepdiving") then -- I don't like this but it's for compatability 107 | MT.itemCache[item] = {} 108 | MT.itemCache[item].counter = 0 109 | MT.itemCacheCount = MT.itemCacheCount + 1 110 | end 111 | 112 | end 113 | end 114 | 115 | 116 | -- INITIALIZATION: loop through the item list and and cache eligible items 117 | for k, item in pairs(Item.ItemList) do 118 | MT.CacheItem(item) 119 | end 120 | 121 | --[[ INITIALIZATION: loop through the item list and count the oxygen vents 122 | for k, item in pairs(Item.ItemList) do 123 | if item.Prefab.Identifier.Value == "oxygen_vent" then 124 | print(item) 125 | oxygenVentCount = oxygenVentCount + 1 126 | end 127 | end]] 128 | 129 | 130 | 131 | Hook.Add("roundStart", "MT.roundStart2", function() 132 | 133 | -- this is how many items we found in the MT.itemCache 134 | print("There are: ", MT.itemCacheCount, " items in the MT.itemCache.") 135 | print("There are: ", MT.oxygenVentCount, " oxygen vents.") 136 | end) 137 | 138 | -- check new items and add matches to the MT.itemCache 139 | Hook.add("item.created", "MT.newItem", function(item) 140 | MT.CacheItem(item) 141 | end) 142 | 143 | -- end of round housekeeping 144 | Hook.Add("roundEnd", "MT.roundEnd", function() 145 | -- clear the update item cache so we don't carry anything over accidentally 146 | MT.itemCache = {} 147 | MT.itemCacheCount = 0 148 | -- track that the round is over 149 | 150 | end) 151 | -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/Shared/biotraumaFunctions.lua: -------------------------------------------------------------------------------- 1 | BT.F = {} 2 | 3 | -- FUNGUS: Spawn fungus 4 | function BT.F.oxygenVentSpawn(item) 5 | 6 | local fungusPrefab = ItemPrefab.GetItemPrefab("spore_fungus") 7 | 8 | --if disabled in config do nothing. 9 | if MT.Config.ventSpawnRate > 0 and item.GetComponentString("Vent").OxygenFlow > 0 then 10 | -- spawn events take MT.oxygenVentCount into consideration because spawn event probability is shared between the vents 11 | -- probability: target spawns per hour / spawn chances per hour 12 | 13 | -- DEBUG PRINTING: 14 | -- print(MT.Config.ventSpawnRate,"/",(3600 / MT.Deltatime * MT.oxygenVentCount)) 15 | if MT.HF.Probability(MT.Config.ventSpawnRate, (3600 / MT.Deltatime * MT.oxygenVentCount)) then 16 | Entity.Spawner.AddItemToSpawnQueue(fungusPrefab, item.OwnInventory, nil, nil, function(item) end) 17 | 18 | end 19 | end 20 | end -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/Shared/mechtraumaPower.lua: -------------------------------------------------------------------------------- 1 | MT.GridUpdateCooldown = 0 2 | MT.GridUpdateInterval = 1 3 | MT.gridCyclestime = MT.GridUpdateInterval/60 -- Time in seconds that transpires between updates 4 | 5 | -- engine ignition types 6 | function MT.F.relayIgnition(item) 7 | local ignition = item.GetComponentString("RelayComponent").IsOn 8 | return ignition 9 | end 10 | 11 | function MT.F.sGeneratorIgnition(item) 12 | local ignition = MT.HF.findComponent(item, "SimpleGenerator").IsOn 13 | return ignition 14 | end 15 | 16 | --table for dieselEngine models 17 | MT.DE = { 18 | s5000D={ 19 | maxHorsePower=5000*1.5, 20 | oilSlots=2, 21 | filterSlots=1, 22 | dieselFuelSlots=6, 23 | auxOxygenSlots=3, 24 | name="s5000D", 25 | ignitionType=MT.F.sGeneratorIgnition 26 | }, 27 | s3000D={ 28 | maxHorsePower=3000*1.5, 29 | oilSlots=1, 30 | filterSlots=1, 31 | dieselFuelSlots=4, 32 | auxOxygenSlots=2, 33 | name="s3000D", 34 | ignitionType=MT.F.sGeneratorIgnition 35 | }, 36 | sC2500Da={ 37 | maxHorsePower=2500*1.5, 38 | oilSlots=2, 39 | filterSlots=1, 40 | dieselFuelSlots=3, 41 | auxOxygenSlots=3, 42 | name="s2500Da", 43 | ignitionType=MT.F.sGeneratorIgnition 44 | }, 45 | sC2500Db={ 46 | maxHorsePower=2500*1.5, 47 | oilSlots=2, 48 | filterSlots=1, 49 | dieselFuelSlots=3, 50 | auxOxygenSlots=3, 51 | name="s2500Db", 52 | ignitionType=MT.F.sGeneratorIgnition 53 | }, 54 | s1500D={ 55 | maxHorsePower=1500*1.5, 56 | oilSlots=1, 57 | filterSlots=1, 58 | dieselFuelSlots=3, 59 | auxOxygenSlots=1, 60 | name="s1500D", 61 | ignitionType=MT.F.sGeneratorIgnition 62 | }, 63 | PDG500={ 64 | maxHorsePower=500*1.5, 65 | oilSlots=1, 66 | filterSlots=1, 67 | dieselFuelSlots=1, 68 | auxOxygenSlots=1, 69 | name="PDG500", 70 | ignitionType=MT.F.sGeneratorIgnition 71 | }, 72 | PDG250={ 73 | maxHorsePower=250*1.5, 74 | oilSlots=1, 75 | filterSlots=1, 76 | dieselFuelSlots=1, 77 | auxOxygenSlots=1, 78 | name="PDG250", 79 | ignitionType=MT.F.sGeneratorIgnition 80 | } 81 | } 82 | 83 | -- called by updateItems 84 | function MT.F.dieselGenerator(item) 85 | -- convert load(kW) to targetPower(HP) 1.341022 86 | local simpleGenerator = MT.HF.findComponent(item, "SimpleGenerator") 87 | local powered = item.GetComponentString("Powered") 88 | local targetPower = simpleGenerator.GridLoad 89 | 90 | -- print(simpleGenerator.IsOn) 91 | -- print("Load: " .. tostring(simpleGenerator.GridLoad)) 92 | -- print("PowerOut: " .. tostring(simpleGenerator.PowerOut.Grid.Power)) 93 | 94 | -- check for a diesel series index 95 | if MT.DE[item.Prefab.Identifier.Value] ~= nil then 96 | -- Results: Pass the ingition type, diesel series, and target power to the dieslEngine function to attempt combustion 97 | local result = MT.F.dieselEngine(item, MT.DE[item.Prefab.Identifier.Value].ignitionType(item), MT.DE[item.Prefab.Identifier.Value], targetPower) 98 | 99 | -- Generate Power: need to add the HP to kW conversion at some point 100 | 101 | -- set the power consumpition for the server 102 | simpleGenerator.PowerConsumption = -result.powerGenerated 103 | 104 | -- set power to generate and send it to clients 105 | simpleGenerator.PowerToGenerate = result.powerGenerated 106 | if SERVER then Networking.CreateEntityEvent(item, Item.ChangePropertyEventData(simpleGenerator.SerializableProperties[Identifier("PowerToGenerate")], simpleGenerator)) end 107 | 108 | else 109 | -- invalid diesel series index 110 | print(item.Prefab.Identifier.Value, " - !IS NOT A VALID DIESEL SERIES!") 111 | end 112 | end 113 | 114 | -- called by MT.F.dieselGenerator: calculates if and how much power an engine should be producing 115 | function MT.F.dieselEngine(item, ignition, dieselSeries, targetPower) 116 | --ADVANCED DIESEL DESIGN 117 | -- HP:kW = 1:0.75 118 | -- HP:diesel(l) 1:0.2 119 | local gridCycles = 60 120 | local dieselEngine = {} 121 | local dieselFuelNeededCL = MT.Config.dieselHorsePowerRatioCL * MT.HF.Clamp(targetPower, 100, dieselSeries.maxHorsePower) / 3600 * MT.Deltatime --min power is idle speed 122 | local oxygenNeeded = dieselFuelNeededCL * MT.Config.dieselOxygenRatioCL -- this is where we cheat and pretend that 1 condition of oxygen is equal to 1 condtion of diesel 123 | 124 | -- oxygen 125 | local auxOxygenItems = {} 126 | local auxOxygenVol = 0 127 | local hullOxygenPercentage = 0 128 | -- set hullOxygenPercentage to 0 when submerged or outside of a hull. 129 | if item.InWater == false and item.FindHull() ~= nil then hullOxygenPercentage = item.FindHull().OxygenPercentage else hullOxygenPercentage = 0 end 130 | 131 | -- diesel 132 | local dieselFuelItems = {} 133 | local dieselFuelVol = 0 134 | -- oil 135 | local oilItems = {} 136 | local oilVol = 0 137 | -- filtration 138 | local oilFiltrationItems = {} 139 | local oilfiltrationSlots = dieselSeries.filterSlots 140 | local oilFiltrationVol = 0 141 | -- Damage and Reduction 142 | local frictionDamage = MT.Config.frictionBaseDPS * MT.Deltatime * dieselSeries.oilSlots -- convert baseDPS to DPD and multiply for oil capacity 143 | local oilDeterioration = MT.Config.oilBaseDPS * MT.Deltatime * dieselSeries.oilSlots -- convert baseDPS to DPD and multiply for capacity 144 | 145 | 146 | -- INVENTORY: loop through the inventory and see what we have 147 | local index = 0 148 | while(index < item.OwnInventory.Capacity) do 149 | if item.OwnInventory.GetItemAt(index) ~= nil then 150 | local containedItem = item.OwnInventory.GetItemAt(index) 151 | -- get diesel item(s) 152 | if containedItem.HasTag("diesel_fuel") and containedItem.Condition > 0 then 153 | table.insert(dieselFuelItems, containedItem) 154 | dieselFuelVol = dieselFuelVol + containedItem.Condition 155 | -- get oil item(s) 156 | elseif containedItem.HasTag("oil") and containedItem.Condition > 0 then 157 | table.insert(oilItems, containedItem) 158 | oilVol = oilVol + containedItem.Condition 159 | frictionDamage = frictionDamage - MT.Config.frictionBaseDPS * MT.Deltatime -- LUBRICATE: reduce *possible* friction damage for this oil slot 160 | -- get oil filtration item(s) 161 | elseif containedItem.HasTag("oilfilter") and containedItem.Condition > 0 then 162 | table.insert(oilFiltrationItems, containedItem) 163 | oilDeterioration = oilDeterioration - oilDeterioration * (MT.Config.oilFiltrationM / oilfiltrationSlots) -- FILTER: reduce *possible* oil damage for this filter slot 164 | oilFiltrationVol = oilFiltrationVol + containedItem.Condition 165 | -- get aux oxygen item(s) 166 | elseif containedItem.HasTag("refillableoxygensource") and containedItem.Condition > 0 then 167 | table.insert(auxOxygenItems, containedItem) 168 | auxOxygenVol = auxOxygenVol + containedItem.Condition 169 | end 170 | end 171 | index = index + 1 172 | end 173 | 174 | -- fuelCheck 175 | if dieselFuelVol > dieselFuelNeededCL then dieselEngine.fuelCheck = true end 176 | -- oxygenCheck 177 | if hullOxygenPercentage > 75 or auxOxygenVol > oxygenNeeded then dieselEngine.oxygenCheck = true end 178 | 179 | -- attempt combustion 180 | if item.Condition > 0 and ignition and dieselEngine.fuelCheck and dieselEngine.oxygenCheck then 181 | -- combustion succeeded 182 | dieselEngine.combustion = true 183 | -- set the generated amount to be returned 184 | dieselEngine.powerGenerated = MT.HF.Clamp(targetPower, 0, dieselSeries.maxHorsePower) 185 | 186 | -- DETERIORATION: 187 | -- burn oxygen 188 | if hullOxygenPercentage >= 75 then -- burn hull oxygen when above 75% 189 | item.FindHull().Oxygen = item.FindHull().Oxygen - (oxygenNeeded * 2250) -- 2250 hull oxygen ~= 1 oxygen condition 190 | else 191 | MT.HF.subFromListSeq (oxygenNeeded, auxOxygenItems) -- burn auxOxygen 192 | end 193 | -- burn diesel 194 | MT.HF.subFromListSeq (dieselFuelNeededCL, dieselFuelItems) -- burn diesel sequentially, improves resource management 195 | -- burn oil 196 | MT.HF.subFromListEqu(oilDeterioration, oilItems) -- total oilDeterioration is spread across all oilItems. (being low on oil will make the remaining oil deteriorate faster) 197 | -- deteriorate filter(s) 198 | MT.HF.subFromListAll((MT.Config.oilFilterDPS * MT.Deltatime), oilFiltrationItems) -- apply deterioration to each filters independently, they have already reduced oil deterioration 199 | -- friction damage 200 | item.Condition = item.Condition - frictionDamage 201 | 202 | -- DEBUG PRINTING: print("Diesel Fuel will last for: ",(dieselFuelVol / dieselFuelNeededCL) * MT.Deltatime/ 60, " minutes.") 203 | -- DEBUG PRINTING: print("Oil will last for: ", oilVol / oilDeterioration * MT.Deltatime / 60) 204 | -- DEBUG PRINTING: print("Filration will last for: ", (oilFiltrationVol / MT.Config.oilFilterDPS) / 60 ) -- no need to calculate the deltaTime here since calc is in dps 205 | 206 | -- SOUND / LIGHT - dieselEngine sound is controlled by an XML light so it will toggle with the light(s) 207 | for k, item in pairs(item.Components) do 208 | if tostring(item) == "Barotrauma.Items.Components.LightComponent" then item.IsOn = true end 209 | -- print(item,": ", item.IsOn) 210 | end 211 | 212 | return dieselEngine 213 | else 214 | -- combustion failed 215 | dieselEngine.combustion = false 216 | dieselEngine.powerGenerated = 0 217 | 218 | -- SOUND / LIGHT - dieselEngine sound is controlled by an XML light so it will toggle with the light(s) 219 | for k, item in pairs(item.Components) do 220 | if tostring(item) == "Barotrauma.Items.Components.LightComponent" then item.IsOn = false end 221 | end 222 | 223 | return dieselEngine 224 | end 225 | 226 | end 227 | 228 | Hook.Patch( 229 | "Barotrauma.Items.Components.SimpleGenerator", 230 | "GetCurrentPowerConsumption", 231 | function(instance, ptable) 232 | instance.PowerConsumption = 0 233 | 234 | -- Return -1 if the generator should provide power 235 | if instance.IsOn then 236 | return -1 237 | end 238 | return 0 239 | end, Hook.HookMethodType.After) 240 | 241 | Hook.Patch( 242 | "Barotrauma.Items.Components.SimpleGenerator", 243 | "MinMaxPowerOut", 244 | function(instance, ptable) 245 | load = ptable["load"] 246 | 247 | -- Set power consumption from PowerToGenerate 248 | instance.PowerConsumption = -instance.PowerToGenerate 249 | 250 | end, Hook.HookMethodType.Before) 251 | -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/Shared/mechtraumafunctions.lua: -------------------------------------------------------------------------------- 1 | MT.F = {} 2 | CentralComputer = {} 3 | CentralComputer.online = true 4 | 5 | LuaUserData.RegisterTypeBarotrauma("Items.Components.SimpleGenerator") 6 | 7 | -- Hull:Condition ratio for oxygen is 2333:1 and a player breaths 700 oxygen per second. 8 | -- human breaths 700 oxygen/second and that requires to 0.3 9 | 10 | -- DIVINGSUIT: updates deterioration and extended pressure protection. 11 | function MT.F.divingSuit(item) 12 | -- only update if equipped 13 | if MT.HF.ItemIsWornInOuterClothesSlot(item) then 14 | -- DETERIORATION: 15 | -- execute if divingsuit is equipped and deterioration or extended pressure protection is enabled. 16 | if (MT.Config.divingSuitServiceLife > 0.0 or MT.Config.divingSuitEPP > 1.0) then 17 | local itemDepth = MT.HF.GetItemDepth(item) 18 | local pressureProtectionMultiplier = itemDepth / item.ParentInventory.Owner.PressureProtection -- quotient of depth and pressure protection 19 | local pressureDamagePD = 0 -- per delta 20 | local deteriorationDamagePD = 0 -- per delta 21 | -- calculate deterioration damage if deterioration is enabled 22 | if MT.Config.divingSuitServiceLife > 0.0 then deteriorationDamagePD = (item.MaxCondition / (MT.Config.divingSuitServiceLife * 60) * MT.Deltatime) end 23 | 24 | -- EXTENDED PRESSURE PROTECTION: Protects up to 2x max pressure but damages the diving suit. 25 | if pressureProtectionMultiplier <= 2 and item.Condition > 1 then --if you're past 2x pressure you deserve what you get. 26 | item.ParentInventory.Owner.AddAbilityFlag(AbilityFlags.ImmuneToPressure) -- guardian angel on 27 | else 28 | item.ParentInventory.Owner.RemoveAbilityFlag(AbilityFlags.ImmuneToPressure) -- guardian angel off 29 | end 30 | -- damage the suit if exceeding pressure rating while outside the sub or in a leathal pressure hull. 31 | if pressureProtectionMultiplier > 1 and (item.ParentInventory.Owner.AnimController.CurrentHull == null or item.ParentInventory.Owner.AnimController.CurrentHull.LethalPressure >= 80.0) then 32 | pressureDamagePD = pressureProtectionMultiplier^4 -- make pressure damage exponential 33 | end 34 | -- low poressure (<= 2500 protection) diving suits receive 50% deterioration dammage per delta 35 | if item.ParentInventory.Owner.PressureProtection <= 2500 then deteriorationDamagePD = deteriorationDamagePD * 0.5 end 36 | -- apply deterioration and pressure damage to divingsuit for this update. 37 | item.Condition = item.Condition - (deteriorationDamagePD + pressureDamagePD) 38 | end 39 | end 40 | end 41 | 42 | -- fuse logic 43 | function MT.F.fuseBox(item) 44 | local fuseWaterDamage = 0 45 | local fuseOvervoltDamage = 0 46 | local fuseDeteriorationDamage = 0 47 | local voltage = item.GetComponentString("PowerTransfer").Voltage 48 | 49 | 50 | --if MT.itemCache[item].counter < 0 then MT.itemCache[item].counter = 10 end 51 | --print("FUSE COUNTER: ", MT.itemCache[item].counter) 52 | --MT.itemCache[item].counter = MT.itemCache[item].counter - 1 53 | 54 | --CHECK: is there a fuse? 55 | if item.OwnInventory.GetItemAt(0) ~= nil and item.OwnInventory.GetItemAt(0).ConditionPercentage > 1 then 56 | 57 | --fuse present logic 58 | item.GetComponentString("Repairable").DeteriorationSpeed = 0.0 -- disable fuseBfox deterioration 59 | item.GetComponentString("PowerTransfer").CanBeOverloaded = false -- disable overvoltage 60 | item.GetComponentString("PowerTransfer").FireProbability = 0.1 -- reduce fire probability 61 | -- enable RelayComponent if present 62 | if item.GetComponentString("RelayComponent") then item.GetComponentString("RelayComponent").SetState(true, false) end 63 | 64 | -- DEBUG PRINTING: 65 | if voltage > 1.7 then print(item.name, "voltage: ", voltage) end 66 | 67 | -- set water, overvoltage, and deterioration damage amounts 68 | if item.InWater then fuseWaterDamage = 1.0 end 69 | 70 | if item.GetComponentString("PowerTransfer").PowerLoad ~= 0 then fuseDeteriorationDamage = MT.Config.fusBoxDeterioration * 0.1 end --detiorate the fuse at 10% of MT.Config.fusBoxDeterioration 71 | 72 | if voltage > 1.7 then 73 | -- use the item counter to track how long the item has been overvolted 74 | MT.itemCache[item].counter = MT.itemCache[item].counter + 1 75 | -- only apply overvoltage damage if overvoltage has lasted for more than 1 update 76 | if MT.itemCache[item].counter > 1 then 77 | fuseOvervoltDamage = MT.Config.fuseOvervoltDamage * voltage-- this needs to scale with load overvoltage on 10,000kw should do more damage than on 100kw 78 | end 79 | else 80 | MT.itemCache[item].counter = 0 81 | end 82 | -- apply water, deterioration, and overvoltage damage to the fuse 83 | item.OwnInventory.GetItemAt(0).Condition = item.OwnInventory.GetItemAt(0).Condition - fuseWaterDamage - fuseOvervoltDamage - fuseDeteriorationDamage 84 | 85 | else 86 | 87 | -- fuseBox: if the fuse is missing enable deterioration, overvoltage, and fires. 88 | item.GetComponentString("Repairable").DeteriorationSpeed = MT.Config.fusBoxDeterioration --enable deterioration 89 | item.GetComponentString("PowerTransfer").CanBeOverloaded = true -- enable overvoltage 90 | item.GetComponentString("PowerTransfer").FireProbability = 0.9 -- increase fire probability 91 | -- disable RelayComponent if present 92 | if item.GetComponentString("RelayComponent") then item.GetComponentString("RelayComponent").SetState(false, false) end 93 | -- DEBUG PRINTING: 94 | -- print("ITEM: ", item.name) 95 | -- print("deterioration speed: ", item.name, item.GetComponentString("Repairable").DeteriorationSpeed) 96 | -- print("condition percentage: ", item.ConditionPercentage) 97 | end 98 | end 99 | 100 | -- CENTRAL COMPUTER: Ships computer 101 | --MT.tagKeys.centralComputer = function(item) 102 | function MT.F.centralComputer(item) 103 | if item.ConditionPercentage > 1 and item.GetComponentString("Powered").Voltage > 0.5 then 104 | CentralComputer.online = true 105 | item.GetComponentString("RelayComponent").SetState(true, false) 106 | --print("Central computer online.") 107 | else 108 | CentralComputer.online = false 109 | item.GetComponentString("RelayComponent").SetState(false, false) 110 | --print("Central computer offline.") 111 | end 112 | end 113 | 114 | function MT.F.keyIgnition(item) 115 | 116 | end 117 | 118 | 119 | -- CENTRAL COMPUTER: Ships computer 120 | function MT.F.centralComputerNeeded(item) 121 | print("found a: ", item.name) 122 | if CentralComputer.online then 123 | if item.GetComponentString("Steering") ~= nil then item.GetComponentString("Steering").CanBeSelected = true end 124 | if item.GetComponentString("Sonar") ~= nil then item.GetComponentString("Sonar").CanBeSelected = true end 125 | if item.GetComponentString("CustomInterface") ~= nil then item.GetComponentString("CustomInterface").CanBeSelected = true end 126 | if item.GetComponentString("MiniMap") ~= nil then item.GetComponentString("MiniMap").CanBeSelected = true end 127 | if item.GetComponentString("Fabricator") ~= nil then item.GetComponentString("Fabricator").CanBeSelected = true end 128 | elseif not CentralComputerOnline then 129 | if item.GetComponentString("Steering") ~= nil then item.GetComponentString("Steering").CanBeSelected = false end 130 | if item.GetComponentString("Sonar") ~= nil then item.GetComponentString("Sonar").CanBeSelected = false end 131 | if item.GetComponentString("CustomInterface") ~= nil then item.GetComponentString("CustomInterface").CanBeSelected = false end 132 | if item.GetComponentString("MiniMap") ~= nil then item.GetComponentString("MiniMap").CanBeSelected = false end 133 | if item.GetComponentString("Fabricator") ~= nil then item.GetComponentString("Fabricator").CanBeSelected = false end 134 | end 135 | end 136 | 137 | -- STEAM Boiler: the beloved steam boiler... 138 | function MT.F.steamBoiler(item) 139 | local index = 0 140 | 141 | -- OPERATION: if operational (condition) and operating (powered) 142 | if item.ConditionPercentage > 1 and item.GetComponentString("Powered").Voltage > 0.5 then 143 | local curculatorItems = {} 144 | local curculatorSlots = 2 -- temporarily hardcoded 145 | local circulatorCount = 0 146 | local pressureDamage = 1 * MT.Deltatime 147 | 148 | --loop through the Boiler inventory 149 | while(index < item.OwnInventory.Capacity) do 150 | if item.OwnInventory.GetItemAt(index) ~= nil then 151 | local containedItem = item.OwnInventory.GetItemAt(index) 152 | if containedItem.HasTag("circulatorPump") and containedItem.Condition > 0 then 153 | table.insert(curculatorItems, containedItem) 154 | circulatorCount = circulatorCount + 1 155 | end 156 | end 157 | index = index + 1 158 | end 159 | 160 | -- deteriorate Circulator Pumps 161 | MT.HF.subFromListAll(MT.Config.circulatorDPS * MT.Deltatime, curculatorItems) -- apply deterioration to each filters independently 162 | -- counteract pressureDamage 163 | pressureDamage = pressureDamage - pressureDamage / curculatorSlots * #curculatorItems 164 | -- apply pressureDamage 165 | item.Condition = item.Condition - pressureDamage 166 | 167 | -- check for leaks 168 | if item.ConditionPercentage <= 50 then 169 | print(item.CurrentHull.WaterVolume) 170 | item.CurrentHull.WaterVolume = item.CurrentHull.WaterVolume + 3000 171 | end 172 | else 173 | -- nothing to see here 174 | end 175 | end 176 | 177 | -- STEAM TURBINE: the beloved steam turbine... 178 | function MT.F.steamTurbine(item) 179 | 180 | -- 181 | -- Would it be possible to have max power output be per turbine? So that one failing meaning -25% output not -100% 182 | 183 | -- 184 | -- -0.05 deterioration per 2 second when powered 185 | local index = 0 186 | -- if operational (condition) and operating (powered) 187 | if item.ConditionPercentage > 1 and item.GetComponentString("Powered").Voltage > 0.5 then 188 | local bearingItems = {} 189 | local bladeCount = 0 190 | local bearingSlots = 4 -- temporarily hardcoded 191 | local frictionDamage = MT.Config.frictionBaseDPS * bearingSlots * MT.Deltatime 192 | 193 | --loop through the Turbine inventory 194 | while(index < item.OwnInventory.Capacity) do 195 | if item.OwnInventory.GetItemAt(index) ~= nil then 196 | -- DEBUG PRINTING 197 | -- print(item.OwnInventory.GetItemAt(index),item.OwnInventory.GetItemAt(index).HiddenInGame) 198 | local containedItem = item.OwnInventory.GetItemAt(index) 199 | if containedItem.Prefab.Identifier.Value == "turbine_blade" then 200 | bladeCount = bladeCount + 1 201 | -- damage the blades if the condition is below 25 202 | if item.ConditionPercentage < 25 then containedItem.Condition = containedItem.Condition -10.0 end -- make this exponential damage 203 | containedItem.HiddenInGame = true -- cannot remove while operational 204 | end 205 | if containedItem.Prefab.Identifier.Value == "bearing" and containedItem.Condition > 0 then 206 | table.insert(bearingItems, containedItem) 207 | 208 | -- disable hot swapping parts 209 | item.OwnInventory.GetItemAt(index).HiddenInGame = true 210 | if SERVER then MT.HF.SyncToClient("HiddenInGame", item.OwnInventory.GetItemAt(index)) end 211 | end 212 | 213 | -- disable hot swapping parts 214 | item.OwnInventory.GetItemAt(index).HiddenInGame = true 215 | if SERVER then MT.HF.SyncToClient("HiddenInGame", item.OwnInventory.GetItemAt(index)) end 216 | 217 | end 218 | index = index + 1 219 | end 220 | 221 | 222 | -- deteriorate Thrust Bearings 223 | MT.HF.subFromListAll(MT.Config.bearingDPS * MT.Deltatime, bearingItems) -- apply deterioration to each bearings independently 224 | -- counteract frictionDamage 225 | frictionDamage = frictionDamage - frictionDamage / bearingSlots * #bearingItems 226 | -- apply frictionDamage 227 | item.Condition = item.Condition - frictionDamage 228 | 229 | -- 230 | item.GetComponentString("RelayComponent").SetState(bladeCount >= 4, false) 231 | 232 | else 233 | 234 | -- machine is off - all parts can now be swapped 235 | while(index < item.OwnInventory.Capacity) do 236 | if item.OwnInventory.GetItemAt(index) ~= nil then 237 | item.OwnInventory.GetItemAt(index).HiddenInGame = false 238 | if SERVER then MT.HF.SyncToClient("HiddenInGame", item.OwnInventory.GetItemAt(index)) end 239 | end 240 | index = index + 1 241 | end 242 | end 243 | end 244 | 245 | -- REDUCTION GEAR: 246 | function MT.F.reductionGear(item) 247 | local index = 0 248 | -- if operational (condition) and operating (powered) 249 | if item.ConditionPercentage > 1 and item.GetComponentString("Powered").Voltage > 0.5 then 250 | -- oil 251 | local oilItems = {} 252 | local oilVol = 0 253 | local oilSlots = 4 -- temporarily hardcoded, need to fix 254 | -- filtration 255 | local oilFiltrationItems = {} 256 | local oilfiltrationSlots = 2 -- temporarily hardcoded, need machine table or handle in loop 257 | -- Damage and Reduction 258 | local frictionDamage = MT.Config.frictionBaseDPS * MT.Deltatime * oilSlots -- convert baseDPS to DPD and multiply for oil capacity 259 | local oilDeterioration = MT.Config.oilBaseDPS * MT.Deltatime * oilSlots -- convert baseDPS to DPD and multiply for capacity 260 | local driveGearCount = 0 261 | 262 | local forceStrength = MT.HF.Round(item.GetComponentString("Engine").Force, 2) 263 | if forceStrength < 0 then forceStrength = forceStrength * -1 end 264 | 265 | --loop through the Reduction Gear inventory 266 | while(index < item.OwnInventory.Capacity) do 267 | -- make sure the slot isn't empty 268 | if item.OwnInventory.GetItemAt(index) ~= nil then 269 | local containedItem = item.OwnInventory.GetItemAt(index) 270 | -- check for drive gears 271 | if containedItem.Prefab.Identifier.Value == "drive_gear" and containedItem.Condition > 0 then 272 | driveGearCount = driveGearCount + 1 273 | -- damage the gears if the condition is below 25 and if the propeller is engaged 274 | if item.ConditionPercentage < 40 and forceStrength ~= 0 then containedItem.Condition = containedItem.Condition - forceStrength^0.5 end -- make this damage exponential to force someday 275 | 276 | -- disable hot swapping 277 | item.OwnInventory.GetItemAt(index).HiddenInGame = true 278 | if SERVER then MT.HF.SyncToClient("HiddenInGame", item.OwnInventory.GetItemAt(index)) end 279 | 280 | -- check for oil 281 | elseif containedItem.HasTag("oil") and containedItem.Condition > 0 then 282 | table.insert(oilItems, containedItem) 283 | oilVol = oilVol + containedItem.Condition 284 | frictionDamage = frictionDamage - MT.Config.frictionBaseDPS * MT.Deltatime -- LUBRICATE: reduce *possible* friction damage for this oil slot 285 | 286 | -- check for filters 287 | elseif containedItem.HasTag("oilfilter") then 288 | table.insert(oilFiltrationItems, containedItem) 289 | oilDeterioration = oilDeterioration - MT.Config.oilBaseDPS * MT.Config.oilFiltrationM / oilfiltrationSlots -- LUBRICATE: reduce *possible* oil damage for this filter slot 290 | end 291 | end 292 | index = index + 1 293 | end 294 | 295 | -- deteriorate oil 296 | MT.HF.subFromListEqu(oilDeterioration, oilItems) -- total oilDeterioration is spread across all oilItems. (being low on oil will make the remaining oil deteriorate faster) 297 | -- deteriorate filter(s) 298 | MT.HF.subFromListAll(MT.Config.oilFilterDPS * MT.Deltatime, oilFiltrationItems) -- apply deterioration to each filters independently, they have already reduced oil deteriorate 299 | 300 | -- apply frictionDamage 301 | item.Condition = item.Condition - frictionDamage 302 | 303 | else 304 | -- machine is off - all parts can now be swapped 305 | while(index < item.OwnInventory.Capacity) do 306 | if item.OwnInventory.GetItemAt(index) ~= nil then 307 | item.OwnInventory.GetItemAt(index).HiddenInGame = false 308 | if SERVER then MT.HF.SyncToClient("HiddenInGame", item.OwnInventory.GetItemAt(index)) end 309 | end 310 | index = index + 1 311 | end 312 | end 313 | end -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/config.lua: -------------------------------------------------------------------------------- 1 | -- Availability: CLIENT AND SERVER 2 | -- Simplest verion 3 | local mySimpleVar = ConfigManager.AddConfigBool( 4 | "MyVarName1", -- [REQUIRED] Variable name 5 | "Mechtrauma", -- [REQUIRED] Mod name, used for the config file name. 6 | false -- [REQUIRED] Default value. 7 | ) 8 | 9 | -- Set your value 10 | mySimpleVar.Value = true 11 | 12 | -- Access your value 13 | print(mySimpleVar.Value) 14 | 15 | -- Save your value to file/disk 16 | ModdingToolkit.Config.ConfigManager.Save(mySimpleVar) 17 | 18 | -- Want to access it somewhere else? 19 | local myVar2 = ModdingToolkit.Config.ConfigManager.GetConfigMember("MyModName","MyVarName1") -------------------------------------------------------------------------------- /Mechtrauma/Lua/Scripts/testing.lua: -------------------------------------------------------------------------------- 1 | 2 | -- set the below variable to true to enable debug and testing features 3 | MT.TestingEnabled = true 4 | 5 | if CSActive then 6 | print("CS IS ACTIVE!") 7 | end 8 | 9 | --[[ 10 | if SERVER then return end -- we don't want server to run GUI code. 11 | 12 | local modPath = ... 13 | 14 | local menuOpen = false 15 | 16 | -- our main frame where we will put our custom GUI 17 | local frame = GUI.Frame(GUI.RectTransform(Vector2(1, 1)), nil) 18 | frame.CanBeFocused = false 19 | 20 | -- menu frame 21 | local menu = GUI.Frame(GUI.RectTransform(Vector2(1, 1), frame.RectTransform, GUI.Anchor.Center), nil) 22 | menu.CanBeFocused = false 23 | menu.Visible = false 24 | 25 | -- put a button that goes behind the menu content, so we can close it when we click outside 26 | local closeButton = GUI.Button(GUI.RectTransform(Vector2(1, 1), menu.RectTransform, GUI.Anchor.Center), "", GUI.Alignment.Center, nil) 27 | closeButton.OnClicked = function () 28 | menu.Visible = not menu.Visible 29 | end 30 | 31 | -- a button top right of our screen to open a sub-frame menu 32 | local button = GUI.Button(GUI.RectTransform(Vector2(0.2, 0.2), frame.RectTransform, GUI.Anchor.TopRight), "Custom GUI Example", GUI.Alignment.Center, "GUIButtonSmall") 33 | button.RectTransform.AbsoluteOffset = Point(25, 50) 34 | button.OnClicked = function () 35 | menu.Visible = not menu.Visible 36 | end 37 | 38 | local menuContent = GUI.Frame(GUI.RectTransform(Vector2(0.4, 0.6), menu.RectTransform, GUI.Anchor.Center)) 39 | local menuList = GUI.ListBox(GUI.RectTransform(Vector2(1, 1), menuContent.RectTransform, GUI.Anchor.BottomCenter)) 40 | 41 | GUI.TextBlock(GUI.RectTransform(Vector2(1, 0.05), menuList.Content.RectTransform), "This is a sample text!", nil, nil, GUI.Alignment.Center) 42 | 43 | for i = 1, 10, 1 do 44 | local coloredText = GUI.TextBlock(GUI.RectTransform(Vector2(1, 0.025), menuList.Content.RectTransform), "This is some colored text!", nil, nil, GUI.Alignment.Center) 45 | coloredText.TextColor = Color(math.random(0, 255), math.random(0, 255), math.random(0, 255)) 46 | end 47 | 48 | local textBox = GUI.TextBox(GUI.RectTransform(Vector2(1, 0.2), menuList.Content.RectTransform), "This is a text box") 49 | textBox.OnTextChangedDelegate = function (textBox) 50 | print(textBox.Text) 51 | end 52 | 53 | local tickBox = GUI.TickBox(GUI.RectTransform(Vector2(1, 0.2), menuList.Content.RectTransform), "This is a tick box") 54 | tickBox.Selected = true 55 | tickBox.OnSelected = function () 56 | print(tickBox.State == 3) 57 | end 58 | 59 | local numberInput = GUI.NumberInput(GUI.RectTransform(Vector2(1, 0.1), menuList.Content.RectTransform), NumberType.Float) 60 | numberInput.MinValueFloat = 0 61 | numberInput.MaxValueFloat = 1000 62 | numberInput.valueStep = 1 63 | numberInput.OnValueChanged = function () 64 | print(numberInput.FloatValue) 65 | end 66 | 67 | local scrollBar = GUI.ScrollBar(GUI.RectTransform(Vector2(1, 0.1), menuList.Content.RectTransform), 0.1, nil, "GUISlider") 68 | scrollBar.Range = Vector2(0, 100) 69 | scrollBar.BarScrollValue = 50 70 | scrollBar.OnMoved = function () 71 | print(scrollBar.BarScrollValue) 72 | end 73 | 74 | local someButton = GUI.Button(GUI.RectTransform(Vector2(1, 0.1), menuList.Content.RectTransform), "This is a button", GUI.Alignment.Center, "GUIButtonSmall") 75 | someButton.OnClicked = function () 76 | print("button") 77 | end 78 | 79 | local dropDown = GUI.DropDown(GUI.RectTransform(Vector2(1, 0.05), menuList.Content.RectTransform), "This is a dropdown", 3, nil, false) 80 | dropDown.AddItem("First Item", 0) 81 | dropDown.AddItem("Second Item", 1) 82 | dropDown.AddItem("Third Item", 2) 83 | dropDown.OnSelected = function (guiComponent, object) 84 | print(object) 85 | end 86 | 87 | local multiDropDown = GUI.DropDown(GUI.RectTransform(Vector2(1, 0.05), menuList.Content.RectTransform), "This is a multi-dropdown", 3, nil, true) 88 | multiDropDown.AddItem("First Item", 0) 89 | multiDropDown.AddItem("Second Item", 1) 90 | multiDropDown.AddItem("Third Item", 2) 91 | multiDropDown.OnSelected = function (guiComponent, object) 92 | for value in multiDropDown.SelectedDataMultiple do 93 | print(value) 94 | end 95 | end 96 | 97 | local imageFrame = GUI.Frame(GUI.RectTransform(Point(65, 65), menuList.Content.RectTransform), "GUITextBox") 98 | imageFrame.RectTransform.MinSize = Point(0, 65) 99 | local sprite = ItemPrefab.GetItemPrefab("bandage").InventoryIcon 100 | local image = GUI.Image(GUI.RectTransform(Vector2(1, 1), imageFrame.RectTransform, GUI.Anchor.Center), sprite) 101 | image.ToolTip = "Bandages are pretty cool" 102 | 103 | 104 | local customImageFrame = GUI.Frame(GUI.RectTransform(Point(128, 128), menuList.Content.RectTransform), "GUITextBox") 105 | customImageFrame.RectTransform.MinSize = Point(138, 138) 106 | local customSprite = Sprite(modPath .. "/mechtrauma_banner.png") 107 | GUI.Image(GUI.RectTransform(Point(65, 65), customImageFrame.RectTransform, GUI.Anchor.Center), customSprite) 108 | 109 | Hook.Patch("Barotrauma.GameScreen", "AddToGUIUpdateList", function() 110 | frame.AddToGUIUpdateList() 111 | end) 112 | ]] 113 | 114 | Game.AddCommand("mechtraumaclean", "removes *useless* items", function () 115 | MT.HF.MechtraumaClean() 116 | end) 117 | 118 | 119 | Hook.Add('chatMessage', 'MT.testing', function(msg, client) 120 | 121 | if(msg=="mt1") then 122 | if not MT.TestingEnabled then return end 123 | -- insert testing stuff here 124 | 125 | print("only fools do read this") 126 | 127 | return true 128 | elseif(msg=="mt2") then 129 | if not MT.TestingEnabled then return end 130 | -- insert other testing stuff here 131 | 132 | print("sussy baka") 133 | 134 | return true 135 | end 136 | end) -------------------------------------------------------------------------------- /Mechtrauma/Lua/defaultconfig.lua: -------------------------------------------------------------------------------- 1 | 2 | -- DO NOT EDIT THIS CONFIG, THIS IS JUST A TEMPLATE 3 | 4 | local config = {} 5 | 6 | config.dieselDrainRate = 1 -- NYI 7 | config.pumpGateDeteriorateRate = 1 8 | config.divingSuitServiceLife = 60 9 | config.divingSuitEPP = 2 10 | config.fusBoxDeterioration = 0.12 11 | config.fuseOvervoltDamage = 5 12 | config.disableElectrocution = false 13 | config.ventSpawnRate = 0 14 | config.bearingServiceLife = 13 15 | config.bearingDPS = .255 16 | config.dieselGeneratorEfficiency = 0.3 17 | config.dieselHorsePowerRatioL = 0.2 -- 0.2:1 - HP:liter:HP 18 | config.dieselHorsePowerRatioDL = 2.0 -- 2.0:1 - HP:deciliter:HP 19 | config.dieselHorsePowerRatioCL = 20.0 -- 20:1 - centiliter:HP 20 | config.dieselOxygenRatioL = 7.0 -- 7:1 air:fuel liter 21 | config.dieselOxygenRatioDL = 0.7 -- 70:10 air:fuel deciliter 22 | config.dieselOxygenRatioCL = 0.07 -- 700:100 air:fuel centiliter 23 | config.circulatorServiceLife = 13 24 | config.circulatorDPS = 0.255 -- calculated from config (100 / circulatorServiceLife * Deltatime) 25 | config.oilFilterServiceLife = 6.5 26 | config.oilFilterDPS = 0.255 -- calculated from config (100 / oilFilterServiceLife * Deltatime) 27 | config.oilFiltrationEP = 25 -- oil filtration efficiency percentage 28 | config.oilFiltrationM = 0.25 -- JSON ONLY - oil filtration multiplier for detirioration 29 | config.oilBaseDPS = 1.0 -- centiliters 30 | config.frictionBaseDPS = 1.0 31 | return config -------------------------------------------------------------------------------- /Mechtrauma/Sound/airrifle.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/airrifle.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/airrifle2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/airrifle2.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/analyze.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/analyze.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/buzz.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/buzz.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/data-reveal-sound-6460.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/data-reveal-sound-6460.mp3 -------------------------------------------------------------------------------- /Mechtrauma/Sound/dieselDeepRun.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/dieselDeepRun.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/dieselDeepStart.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/dieselDeepStart.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/diesel_loop.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/diesel_loop.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/diesel_sound.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/diesel_sound.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/diesel_sound_deep.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/diesel_sound_deep.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/diesel_sound_underwater.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/diesel_sound_underwater.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/diesel_start.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/diesel_start.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/electric_compressor.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/electric_compressor.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/item_interact.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/item_interact.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/item_interact2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/item_interact2.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/item_interact3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/item_interact3.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/item_interact4.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/item_interact4.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/knight1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/knight1.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/knight2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/knight2.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/knight3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/knight3.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/pressure_relief.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/pressure_relief.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/pressure_relief2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/pressure_relief2.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/pump_loop.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/pump_loop.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/receipt1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/receipt1.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/remove_tank.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/remove_tank.ogg -------------------------------------------------------------------------------- /Mechtrauma/Sound/rocket_engine.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/rocket_engine.mp3 -------------------------------------------------------------------------------- /Mechtrauma/Sound/screams_woman_2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PeasantFoundry/Mechtrauma/6e45036798bc5dec5c4a3d941d50261382f0b6e9/Mechtrauma/Sound/screams_woman_2.ogg -------------------------------------------------------------------------------- /Mechtrauma/XML/Mechtrauma_Afflictions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 20 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /Mechtrauma/XML/Mechtrauma_Missions.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Mechtrauma/XML/Mechtrauma_UpgradeModules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /Mechtrauma/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "dieselDrainRate": 1, 3 | "pumpGateDeteriorateRate": 1, 4 | "divingSuitServiceLife": 60, 5 | "divingSuitEPP": 2, 6 | "fusBoxDeterioration": 0.12, 7 | "fuseOvervoltDamage": 1, 8 | "disableElectrocution": true, 9 | "ventSpawnRate": 10, 10 | "bearingDeteriorationM": 1, 11 | "dieselGeneratorEfficiency": 1, 12 | "dieselHorsePowerRatioL": 0.20000001788139343, 13 | "dieselHorsePowerRatioDL": 2.0000001788139343, 14 | "dieselHorsePowerRatioCL": 20.000001788139343, 15 | "dieselOxygenRatioL": 7, 16 | "dieselOxygenRatioDL": 0.7, 17 | "dieselOxygenRatioCL": 0.07, 18 | "oilFilterServiceLife": 10, 19 | "oilFilterDPS": 0.16666666666666666, 20 | "oilFiltrationEP": 50, 21 | "oilFiltrationM": 0.5, 22 | "oilBaseDPS": 1, 23 | "frictionBaseDPS": 1, 24 | "circulatorServiceLife": 12, 25 | "circulatorDPS": 0.1388888888888889, 26 | "bearingServiceLife": 13, 27 | "bearingDPS": 0.255 28 | } -------------------------------------------------------------------------------- /Mechtrauma/filelist.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | --------------------------------------------------------------------------------