Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Species: Plasmaman #1291

Draft
wants to merge 68 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
64cc977
feat: start work on Plasmaman species
angelofallars Nov 23, 2024
29127b5
update
angelofallars Nov 24, 2024
39394c5
feat: improve skeleton/plasmaman speech
angelofallars Nov 24, 2024
c144946
feat: add plasmaman screams
angelofallars Nov 24, 2024
0572e6a
refactor: remove skele/plasma unused talk sprite frame
angelofallars Nov 24, 2024
de63fde
feat: add envirosuit self-extinguish
angelofallars Nov 24, 2024
4db3113
tweak: increase volume of plasmaman screams
angelofallars Nov 24, 2024
772c2f9
feat: make plasmaman have zero blood volume
angelofallars Nov 24, 2024
b3d1500
feat: add plasmaman eyes prototype
angelofallars Nov 24, 2024
bffafe9
feat: make plasmamen a cold species
angelofallars Nov 24, 2024
a4ceb0e
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
angelofallars Nov 28, 2024
4989439
feat: add body part-based ignition
angelofallars Nov 28, 2024
699d595
feat: add minimum/maximum count for item groups
angelofallars Nov 29, 2024
e1935d3
feat: toggle internals and envirosuit
angelofallars Nov 29, 2024
75f668e
remove stray log lines
angelofallars Nov 29, 2024
30d778f
Internals are kept on as long as any breathing tool is on (#28595)
Plykiya Jun 6, 2024
3a78e48
revert change on cloaks.yml
angelofallars Nov 29, 2024
da2ebdf
Update cloaks.yml
angelofallars Nov 29, 2024
5cf1991
Update cloaks.yml
angelofallars Nov 29, 2024
6d2e865
feat: add Patrick Hand font for skeleton language
angelofallars Nov 29, 2024
4c64d71
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
angelofallars Nov 29, 2024
3d7533e
remove unneeded breath masks from plasmaman gear
angelofallars Nov 29, 2024
ad648c0
rename file for Calcic from `plasmaman.yml` to `skeleton.yml`
angelofallars Nov 30, 2024
711e480
feat: change skeleton language to Chilanka
angelofallars Nov 30, 2024
1a9840d
use LDF Comic Sans font for skeleton language
angelofallars Nov 30, 2024
1a14797
Merge branch 'plasmaman' of github.com:angelofallars/Einstein-Engines…
angelofallars Nov 30, 2024
eca369e
set default plasmatank to extended-capacity
angelofallars Nov 30, 2024
d412b68
remove ToggleStartingGearComponent after spawning
angelofallars Nov 30, 2024
3a9616c
rename skelly language
angelofallars Nov 30, 2024
ff86aeb
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
angelofallars Dec 1, 2024
f24b105
add plasmamen healing from milk/plasma
angelofallars Dec 1, 2024
abd91d0
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
angelofallars Dec 1, 2024
49fc0b2
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
angelofallars Dec 3, 2024
5142155
add positive moodlet for ingesting milk/plasma
angelofallars Dec 3, 2024
f19ec98
nerf plasmaman piercing/slash resist
angelofallars Dec 3, 2024
366d7ae
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
angelofallars Dec 7, 2024
d658b7a
make plasmamen self-ignite ignore fire protection
angelofallars Dec 7, 2024
6221d1b
add envirosuit examine charges left
angelofallars Dec 7, 2024
5f821e5
improve yml for SelfExtinguisherComponent
angelofallars Dec 7, 2024
127d24a
fix cooldown for self extinguisher
angelofallars Dec 7, 2024
688b423
start work on plasmaman guidebook
angelofallars Dec 7, 2024
16bf480
increase mood bonus and minimum reagent thresholds for consuming plas…
angelofallars Dec 7, 2024
78f2611
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
angelofallars Dec 8, 2024
701298e
add caustic protection to plasmaman cllothes
angelofallars Dec 8, 2024
4810b57
turn envirosuit extinguish into action
angelofallars Dec 8, 2024
eb33bcb
make stasis beds prevent self-ignition
angelofallars Dec 8, 2024
7650410
refactor: remove one indent from IgniteFromGasSystem.cs
angelofallars Dec 8, 2024
452ee24
revert plasmaman coldDamageThreshold
angelofallars Dec 8, 2024
e86841c
increase plasmaman flammability
angelofallars Dec 8, 2024
8685f61
expand plasmaman names
angelofallars Dec 8, 2024
30620ed
Merge branch 'master' of https://github.com/Simple-Station/Einstein-E…
angelofallars Dec 17, 2024
5261b5a
add a whitelist for plasmaman jumpsuit / helmet
angelofallars Dec 18, 2024
0c07f1c
fix cryo spawn preventing loadout equip && put plasma tank in belt if…
angelofallars Dec 18, 2024
d96aa98
add more sources of plasma tanks
angelofallars Dec 18, 2024
773292c
turn envirohelm into separate item from envirosuit
angelofallars Dec 18, 2024
29bd838
remove unnecessary ToggleStartingGearComponent
angelofallars Dec 18, 2024
54bf646
make default plasma tank double emergency (biggest emergency)
angelofallars Dec 18, 2024
4380b50
add plasmaman life support crate + use plasmatank sprite
angelofallars Dec 18, 2024
8b00de9
rename double plasma tank to plasma internals tank
angelofallars Dec 18, 2024
b1e97e4
make envirosuit helmet space-worthy
angelofallars Dec 18, 2024
a522abd
update plasmaman guidebook entry
angelofallars Dec 18, 2024
4b308c0
remove ss14 medicine names from plasmeme
angelofallars Dec 18, 2024
8fa5a3e
add plasmaman to metempsychotic pool :troll:
angelofallars Dec 18, 2024
3df970a
nerf plasmaman metem weights
angelofallars Dec 18, 2024
6d14167
add envirogloves + check group requiremnents in client loadout profil…
angelofallars Dec 18, 2024
6749bdd
make plasmamen breathe 1/4 as much plasma
angelofallars Dec 19, 2024
5d10d79
use correct attribution for plasmaman organs and parts
angelofallars Dec 19, 2024
a786002
add sprites for most envirosuits/helms
angelofallars Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 40 additions & 12 deletions Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using Content.Shared.Humanoid.Markings;
using Content.Shared.Humanoid.Prototypes;
using Content.Shared.Preferences;
using Content.Shared.Prototypes;
using Content.Shared.Roles;
using Content.Shared.StatusIcon;
using Content.Shared.Traits;
Expand Down Expand Up @@ -2024,18 +2025,45 @@ public void UpdateLoadouts(bool? showUnusable = null, bool reload = false)
_loadouts.Clear();
foreach (var loadout in _prototypeManager.EnumeratePrototypes<LoadoutPrototype>())
{
var usable = _characterRequirementsSystem.CheckRequirementsValid(
loadout.Requirements,
highJob ?? new JobPrototype(),
Profile ?? HumanoidCharacterProfile.DefaultWithSpecies(),
_requirements.GetRawPlayTimeTrackers(),
_requirements.IsWhitelisted(),
loadout,
_entManager,
_prototypeManager,
_cfgManager,
out _
);
var groupUsable = loadout.Groups.Count == 0 ? true : false;

// Check group requirement reasons
foreach (var groupID in loadout.Groups)
{
if (!_prototypeManager.TryIndex<CharacterItemGroupPrototype>(groupID, out var group))
continue;

groupUsable = _characterRequirementsSystem.CheckRequirementsValid(
group.Requirements,
highJob ?? new JobPrototype(),
Profile ?? HumanoidCharacterProfile.DefaultWithSpecies(),
_requirements.GetRawPlayTimeTrackers(),
_requirements.IsWhitelisted(),
loadout,
_entManager,
_prototypeManager,
_cfgManager,
out _
);

if (groupUsable)
break;
}

var usable = groupUsable ?
_characterRequirementsSystem.CheckRequirementsValid(
loadout.Requirements,
highJob ?? new JobPrototype(),
Profile ?? HumanoidCharacterProfile.DefaultWithSpecies(),
_requirements.GetRawPlayTimeTrackers(),
_requirements.IsWhitelisted(),
loadout,
_entManager,
_prototypeManager,
_cfgManager,
out _
) : false;

_loadouts.Add(loadout, usable);

var list = _loadoutPreferences.ToList();
Expand Down
22 changes: 22 additions & 0 deletions Content.Client/Lobby/UI/LoadoutPreferenceSelector.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using Content.Shared.Customization.Systems;
using Content.Shared.Paint;
using Content.Shared.Preferences;
using Content.Shared.Prototypes;
using Content.Shared.Roles;
using Robust.Client.AutoGenerated;
using Robust.Client.Graphics;
Expand Down Expand Up @@ -233,6 +234,27 @@ void UpdateGuidebook() => GuidebookButton.Visible =
if (!string.IsNullOrEmpty(loadoutDesc))
tooltip.Append($"{Loc.GetString(loadoutDesc)}");

// Get group requirement reasons
foreach (var groupID in loadout.Groups)
{
if (!prototypeManager.TryIndex<CharacterItemGroupPrototype>(groupID, out var group))
continue;

characterRequirementsSystem.CheckRequirementsValid(
group.Requirements, highJob, profile, new Dictionary<string, TimeSpan>(),
jobRequirementsManager.IsWhitelisted(), group,
entityManager, prototypeManager, configManager,
out var groupReasons);

if (groupReasons.Count != 0)
{
foreach (var groupReason in groupReasons)
{
tooltip.Append($"\n{groupReason}");
}
}
}

// Get requirement reasons
characterRequirementsSystem.CheckRequirementsValid(
loadout.Requirements, highJob, profile, new Dictionary<string, TimeSpan>(),
Expand Down
7 changes: 7 additions & 0 deletions Content.Server/Atmos/Components/FlammableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@ public sealed partial class FlammableComponent : Component
[DataField]
public bool CanExtinguish = true;

/// <summary>
/// Should the component ignore fire protection when on fire?
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
[DataField]
public bool IgnoreFireProtection = false;

/// <summary>
/// How many firestacks should be applied to component when being set on fire?
/// </summary>
Expand Down
49 changes: 49 additions & 0 deletions Content.Server/Atmos/Components/IgniteFromGasComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using Content.Shared.Atmos;
using Content.Shared.Body.Part;

namespace Content.Server.Atmos.Components;

/// <summary>
/// Component that can be used to add (or remove) fire stacks when exposed to a type of gas, unless wearing ignition immunity.
/// </summary>
[RegisterComponent]
public sealed partial class IgniteFromGasComponent : Component
{
/// <summary>
/// What type of gas triggers ignition.
/// </summary>
[DataField(required: true)]
public Gas Gas;

/// <summary>
/// The total calculated fire stacks to apply every second without immunity.
/// This is calculated from BaseFireStacks + the exposed body parts' fire stacks
/// from IgnitableBodyParts.
/// </summary>
[DataField]
public float FireStacks = 0f;

/// <summary>
/// The base amount of fire stacks to apply every second without immunity.
/// </summary>
[DataField]
public float BaseFireStacks = 0.13f;

/// <summary>
/// The body parts that are vulnerable to ignition when exposed, and their fire stack values.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public Dictionary<(BodyPartType, BodyPartSymmetry), float> IgnitableBodyParts = default!;

/// <summary>
/// How many moles of the gas is needed to trigger ignition.
/// </summary>
[DataField]
public float MolesToIgnite = 0.5f;

/// <summary>
/// Whether the entity is currently immune to ignition.
/// </summary>
[ViewVariables(VVAccess.ReadWrite)]
public bool HasImmunity = false;
}
10 changes: 10 additions & 0 deletions Content.Server/Atmos/Components/IgniteFromGasImmunityComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

namespace Content.Server.Atmos.Components;

/// <summary>
/// Component that is used on clothing to prevent ignition when exposed to a specific gas.
/// </summary>
[RegisterComponent]
public sealed partial class IgniteFromGasImmunityComponent : Component
{
}
23 changes: 23 additions & 0 deletions Content.Server/Atmos/Components/IgniteFromGasPartComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Content.Shared.Atmos;

namespace Content.Server.Atmos.Components;

/// <summary>
/// Component that can be used on body parts to add fire stacks and trigger ignition
/// when the body part is exposed to a type of gas, unless wearing ignition immunity.
/// </summary>
[RegisterComponent]
public sealed partial class IgniteFromGasPartComponent : Component
{
/// <summary>
/// What type of gas triggers ignition.
/// </summary>
[DataField(required: true)]
public Gas Gas;

/// <summary>
/// How many fire stacks this body part applies when exposed.
/// </summary>
[DataField]
public float FireStacks = 0.02f;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ private void InitializeBreathTool()
SubscribeLocalEvent<BreathToolComponent, ComponentShutdown>(OnBreathToolShutdown);
}

private void OnBreathToolShutdown(EntityUid uid, BreathToolComponent component, ComponentShutdown args)
private void OnBreathToolShutdown(Entity<BreathToolComponent> entity, ref ComponentShutdown args)
{
DisconnectInternals(component);
DisconnectInternals(entity);
}

public void DisconnectInternals(BreathToolComponent component)
public void DisconnectInternals(Entity<BreathToolComponent> entity)
{
var old = component.ConnectedInternalsEntity;
component.ConnectedInternalsEntity = null;
var old = entity.Comp.ConnectedInternalsEntity;
entity.Comp.ConnectedInternalsEntity = null;

if (TryComp<InternalsComponent>(old, out var internalsComponent))
{
_internals.DisconnectBreathTool((old.Value, internalsComponent));
_internals.DisconnectBreathTool((old.Value, internalsComponent), entity.Owner);
}

component.IsFunctional = false;
entity.Comp.IsFunctional = false;
}
}
28 changes: 19 additions & 9 deletions Content.Server/Atmos/EntitySystems/FlammableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,15 @@ public void Extinguish(EntityUid uid, FlammableComponent? flammable = null)
_adminLogger.Add(LogType.Flammable, $"{ToPrettyString(uid):entity} stopped being on fire damage");
flammable.OnFire = false;
flammable.FireStacks = 0;
flammable.IgnoreFireProtection = false;

_ignitionSourceSystem.SetIgnited(uid, false);

UpdateAppearance(uid, flammable);
}

public void Ignite(EntityUid uid, EntityUid ignitionSource, FlammableComponent? flammable = null,
EntityUid? ignitionSourceUser = null)
EntityUid? ignitionSourceUser = null, bool ignoreFireProtection = false)
{
if (!Resolve(uid, ref flammable))
return;
Expand All @@ -336,6 +337,9 @@ public void Ignite(EntityUid uid, EntityUid ignitionSource, FlammableComponent?
flammable.OnFire = true;
}

if (ignoreFireProtection)
flammable.IgnoreFireProtection = ignoreFireProtection;

UpdateAppearance(uid, flammable);
}

Expand Down Expand Up @@ -382,7 +386,7 @@ public void Resist(EntityUid uid,
uid.SpawnTimer(2000, () =>
{
flammable.Resisting = false;
flammable.FireStacks -= 1f;
flammable.FireStacks -= flammable.FirestackFade * 10f;
UpdateAppearance(uid, flammable);
});
}
Expand Down Expand Up @@ -448,14 +452,20 @@ public override void Update(float frameTime)
if (TryComp(uid, out TemperatureComponent? temp))
_temperatureSystem.ChangeHeat(uid, 12500 * flammable.FireStacks, false, temp);

var ev = new GetFireProtectionEvent();
// let the thing on fire handle it
RaiseLocalEvent(uid, ref ev);
// and whatever it's wearing
if (_inventoryQuery.TryComp(uid, out var inv))
_inventory.RelayEvent((uid, inv), ref ev);
var multiplier = 1f;
if (!flammable.IgnoreFireProtection)
{
var ev = new GetFireProtectionEvent();
// let the thing on fire handle it
RaiseLocalEvent(uid, ref ev);
// and whatever it's wearing
if (_inventoryQuery.TryComp(uid, out var inv))
_inventory.RelayEvent((uid, inv), ref ev);

multiplier = ev.Multiplier;
}

_damageableSystem.TryChangeDamage(uid, flammable.Damage * flammable.FireStacks * ev.Multiplier, interruptsDoAfters: false);
_damageableSystem.TryChangeDamage(uid, flammable.Damage * flammable.FireStacks * multiplier, interruptsDoAfters: false);

AdjustFireStacks(uid, flammable.FirestackFade * (flammable.Resisting ? 10f : 1f), flammable);
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Server/Atmos/EntitySystems/GasTankSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public GasMixture RemoveAirVolume(Entity<GasTankComponent> gasTank, float volume
public bool CanConnectToInternals(GasTankComponent component)
{
var internals = GetInternalsComponent(component, component.User);
return internals != null && internals.BreathToolEntity != null && !component.IsValveOpen;
return internals != null && internals.BreathTools.Count != 0 && !component.IsValveOpen;
}

public void ConnectToInternals(Entity<GasTankComponent> ent)
Expand Down
Loading
Loading