Skip to content

Commit

Permalink
Disables miasma, enables clean despawn (#1)
Browse files Browse the repository at this point in the history
* Disables miasma, enables clean despawn

* Try to rerun tests

* Remove NukeOpsTest.cs
  • Loading branch information
Just-a-Unity-Dev authored May 23, 2024
1 parent ae867b5 commit d05b6dd
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 214 deletions.
203 changes: 0 additions & 203 deletions Content.IntegrationTests/Tests/GameRules/NukeOpsTest.cs

This file was deleted.

12 changes: 7 additions & 5 deletions Content.Server/Atmos/Rotting/RottingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,15 @@ public override void Update(float frameTime)
}
}

if (!TryComp<PhysicsComponent>(uid, out var physics))
continue;
// if (!TryComp<PhysicsComponent>(uid, out var physics))
// continue;
// We need a way to get the mass of the mob alone without armor etc in the future
// or just remove the mass mechanics altogether because they aren't good.
var molRate = perishable.MolsPerSecondPerUnitMass * (float) rotting.RotUpdateRate.TotalSeconds;
var tileMix = _atmosphere.GetTileMixture(uid, excite: true);
tileMix?.AdjustMoles(Gas.Ammonia, molRate * physics.FixturesMass);
// Why isn't this a field? No clue. Not my code anyway.

// var molRate = perishable.MolsPerSecondPerUnitMass * (float) rotting.RotUpdateRate.TotalSeconds;
// var tileMix = _atmosphere.GetTileMixture(uid, excite: true);
// tileMix?.AdjustMoles(Gas.Ammonia, molRate * physics.FixturesMass);
}
}
}
6 changes: 3 additions & 3 deletions Content.Shared/Atmos/Rotting/PerishableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public sealed partial class PerishableComponent : Component
/// How long it takes after death to start rotting.
/// </summary>
[DataField]
public TimeSpan RotAfter = TimeSpan.FromMinutes(10);
public TimeSpan RotAfter = TimeSpan.FromMinutes(0);

/// <summary>
/// How much rotting has occured
Expand All @@ -35,13 +35,13 @@ public sealed partial class PerishableComponent : Component
/// Feel free to tweak this if there are perf concerns.
/// </summary>
[DataField]
public TimeSpan PerishUpdateRate = TimeSpan.FromSeconds(5);
public TimeSpan PerishUpdateRate = TimeSpan.FromSeconds(1);

/// <summary>
/// How many moles of gas released per second, per unit of mass.
/// </summary>
[DataField]
public float MolsPerSecondPerUnitMass = 0.0025f;
public float MolsPerSecondPerUnitMass = 0f;

[DataField, AutoNetworkedField]
public int Stage;
Expand Down
6 changes: 3 additions & 3 deletions Content.Shared/Atmos/Rotting/RottingComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public sealed partial class RottingComponent : Component
/// How long in between each rot update.
/// </summary>
[DataField]
public TimeSpan RotUpdateRate = TimeSpan.FromSeconds(5);
public TimeSpan RotUpdateRate = TimeSpan.FromSeconds(1);

/// <summary>
/// How long has this thing been rotting?
Expand All @@ -45,8 +45,8 @@ public sealed partial class RottingComponent : Component
{
DamageDict = new()
{
{ "Blunt", 0.06 },
{ "Cellular", 0.06 }
{ "Despawn", 0.5 }
// { "Despawn", 25 },
}
};
}
1 change: 1 addition & 0 deletions Resources/Locale/en-US/_gsobb/damage/damage-types.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
damage-type-despawn = Mysteeryyy ohohohoohhh!!!
2 changes: 2 additions & 0 deletions Resources/Prototypes/Damage/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- Toxin
- Airloss
- Genetic
supportedTypes:
- Despawn

- type: damageContainer
id: Inorganic
Expand Down
7 changes: 7 additions & 0 deletions Resources/Prototypes/Entities/Mobs/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@
damage: 400
behaviors:
- !type:GibBehavior { }
- trigger:
!type:DamageTypeTrigger
damageType: Despawn # Despawn the player
damage: 100
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTypeTrigger
damageType: Heat
Expand Down
6 changes: 6 additions & 0 deletions Resources/Prototypes/_GSOBB/Damage/types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Damage for entity despawning.
- type: damageType
id: Despawn
name: damage-type-despawn
armorCoefficientPrice: 1
armorFlatPrice: 1

0 comments on commit d05b6dd

Please sign in to comment.