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

Fishy swarmers: Carp content and Space Dragon! #7395

Merged
merged 76 commits into from
Jun 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
76c5b75
Pipes as items is broken so simply undo. (#4925)
CrudeWax Dec 21, 2021
a38378d
Merge branch 'master' of https://github.com/space-wizards/space-stati…
CrudeWax Dec 21, 2021
1ed9228
Merge branch 'master' of https://github.com/space-wizards/space-stati…
CrudeWax Dec 21, 2021
a472b61
Merge branch 'master' of https://github.com/space-wizards/space-stati…
CrudeWax Feb 20, 2022
e432822
Merge remote-tracking branch 'upstream/master'
CrudeWax Mar 12, 2022
a4bc650
Merge remote-tracking branch 'upstream/master'
CrudeWax Mar 13, 2022
4551328
Fixes the pipes once and for all
CrudeWax Mar 13, 2022
88c869b
Merge remote-tracking branch 'upstream/master'
CrudeWax Mar 20, 2022
61036d5
Merge remote-tracking branch 'upstream/master'
CrudeWax Mar 20, 2022
55644f1
Merge remote-tracking branch 'upstream/master'
CrudeWax Mar 23, 2022
186f8bf
Carp!
CrudeWax Mar 24, 2022
9f48c84
Adds dragon component and dragon system
CrudeWax Mar 27, 2022
94d24c0
Begging of CODE
CrudeWax Apr 2, 2022
0ded09c
Giant Dragon commit
CrudeWax Apr 3, 2022
c0b7d8c
Devour action works!
CrudeWax Apr 3, 2022
cdc81f8
Devour now works on everything RCD-able
CrudeWax Apr 3, 2022
43fce6a
Ichor and dragon devouring
CrudeWax Apr 9, 2022
c4e524b
Adds carp meat and carp dishes
CrudeWax Apr 10, 2022
8564545
Fixes carp dying of cold temperatures
CrudeWax Apr 10, 2022
46e58b2
Merge branch 'master' into SpaceDragon
CrudeWax Apr 10, 2022
7b5a262
Adds carp birthing (named summoning for ethical reasons)
CrudeWax Apr 11, 2022
e175fce
Added sounds
CrudeWax Apr 11, 2022
7087d8e
Merge branch 'master' into SpaceDragon
CrudeWax Apr 11, 2022
36a584d
Fixes the radiation typing
CrudeWax Apr 12, 2022
71eb4e5
Fixes the radiation typing
CrudeWax Apr 12, 2022
a78ca9b
Merge remote-tracking branch 'origin/SpaceDragon' into SpaceDragon
CrudeWax Apr 12, 2022
c3ca452
Attempting to solve alerts
CrudeWax Apr 13, 2022
eb24264
Dragon now globally roars when spawning
CrudeWax Apr 13, 2022
0d1fd0a
Update Resources/Prototypes/Reagents/toxins.yml
CrudeWax Apr 16, 2022
ada13da
Update Content.Server/Dragon/DragonSystem.cs
CrudeWax Apr 16, 2022
5b97eaa
Update Resources/Locale/en-US/actions/actions/dragon.ftl
CrudeWax Apr 16, 2022
3088db3
Update Resources/Locale/en-US/actions/actions/dragon.ftl
CrudeWax Apr 16, 2022
7031b66
Update Content.Server/Dragon/DragonSystem.cs
CrudeWax Apr 16, 2022
d225ad6
Update Resources/Locale/en-US/actions/actions/dragon.ftl
CrudeWax Apr 17, 2022
d0d7ee2
Update Resources/Locale/en-US/actions/actions/dragon.ftl
CrudeWax Apr 17, 2022
811bfda
Update Resources/Locale/en-US/actions/actions/dragon.ftl
CrudeWax Apr 17, 2022
444515a
Carpo and events
CrudeWax Apr 17, 2022
c71bcc5
Omnizine
CrudeWax Apr 17, 2022
885a7a4
Base wall tag removed
CrudeWax Apr 23, 2022
90f54d6
Merge branch 'master' into SpaceDragon
CrudeWax Apr 23, 2022
8f79e90
Merge branch 'master' into SpaceDragon
CrudeWax May 2, 2022
60022f0
Merge branch 'master' into SpaceDragon
CrudeWax May 6, 2022
8ede3c2
TagSystem patch
CrudeWax May 6, 2022
0177a43
Merge remote-tracking branch 'origin/SpaceDragon' into SpaceDragon
CrudeWax May 6, 2022
13dabf5
Cleanup
metalgearsloth May 16, 2022
d4cc3c5
Merge remote-tracking branch 'upstream/master' into SpaceDragon
metalgearsloth May 16, 2022
4077212
Bunch more spawns
metalgearsloth May 16, 2022
04f6d59
Fixes
metalgearsloth May 16, 2022
0264b8f
Yaml linter actually working
metalgearsloth May 16, 2022
26a986d
Merge remote-tracking branch 'upstream/master' into SpaceDragon
metalgearsloth May 16, 2022
8e882b4
Now carp spawns are only added on humanoid target devours
CrudeWax May 22, 2022
5b6966d
New devour icon
CrudeWax May 26, 2022
fd8d005
Merge remote-tracking branch 'upstream/master' into SpaceDragon
CrudeWax May 26, 2022
de3f1c9
Added a special -Devour tag for dragon instead of relying on RCD one
CrudeWax May 26, 2022
b493a1e
Fixed unarmed combat legacy code
CrudeWax May 26, 2022
26248e1
Rectifying my hubris
CrudeWax May 27, 2022
a17b83c
Trying to solve unarmed combat
CrudeWax May 27, 2022
c6696fd
Definitively fixed combat mode for dragons and carps
CrudeWax May 27, 2022
49e13df
makes dragon able to chew airlocks and firelocks
CrudeWax May 27, 2022
468b4a6
Updates the dragon target recognition system for devour via component…
CrudeWax May 27, 2022
f50f2a0
Adjust passenger texture, sorry, the P has been really bugging me for…
CrudeWax May 27, 2022
4232683
Merge remote-tracking branch 'upstream/master' into SpaceDragon
CrudeWax May 28, 2022
315aa1a
Merge remote-tracking branch 'upstream/master' into SpaceDragon
metalgearsloth Jun 2, 2022
c04a495
Merge branch 'SpaceDragon' of https://github.com/CrudeWax/space-stati…
metalgearsloth Jun 2, 2022
250980c
a
metalgearsloth Jun 2, 2022
ca13917
Merge remote-tracking branch 'upstream/master' into SpaceDragon
metalgearsloth Jun 7, 2022
6bfab29
Fix 1 license
metalgearsloth Jun 7, 2022
a69a8fb
Merge remote-tracking branch 'upstream/master' into SpaceDragon
metalgearsloth Jun 16, 2022
356b74d
Finish review
metalgearsloth Jun 16, 2022
648481d
Remove egregious copy-paste
metalgearsloth Jun 16, 2022
f7c913a
even MORE code cleanup when I read it
metalgearsloth Jun 16, 2022
b10dc47
a
metalgearsloth Jun 16, 2022
4f0d3b6
ECS yml cleanup
metalgearsloth Jun 16, 2022
ce995e3
Merge branch 'master' into SpaceDragon
metalgearsloth Jun 16, 2022
eee4e9c
down wit da rulz
metalgearsloth Jun 16, 2022
05863a0
regal
metalgearsloth Jun 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 0 additions & 109 deletions Content.Client/MobState/DamageStateVisualizer.cs

This file was deleted.

57 changes: 57 additions & 0 deletions Content.Client/MobState/DamageStateVisualizerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using Content.Shared.MobState;
using Robust.Client.GameObjects;
using DrawDepth = Content.Shared.DrawDepth.DrawDepth;

namespace Content.Client.MobState;

public sealed class DamageStateVisualizerSystem : VisualizerSystem<DamageStateVisualsComponent>
{
protected override void OnAppearanceChange(EntityUid uid, DamageStateVisualsComponent component, ref AppearanceChangeEvent args)
{
var sprite = args.Sprite;

if (sprite == null || !args.Component.TryGetData(DamageStateVisuals.State, out DamageState data))
{
return;
}

if (!component.States.TryGetValue(data, out var layers))
{
return;
}

if (component.Rotate)
{
sprite.NoRotation = data switch
{
DamageState.Critical => false,
DamageState.Dead => false,
_ => true
};
}

// Brain no worky rn so this was just easier.
foreach (var layer in sprite.AllLayers)
{
layer.Visible = false;
}

foreach (var (key, state) in layers)
{
sprite.LayerSetVisible(key, true);
sprite.LayerSetState(key, state);
}

// So they don't draw over mobs anymore
if (data == DamageState.Dead && sprite.DrawDepth > (int) DrawDepth.Items)
{
component.OriginalDrawDepth = sprite.DrawDepth;
sprite.DrawDepth = (int) DrawDepth.Items;
}
else if (component.OriginalDrawDepth != null)
{
sprite.DrawDepth = component.OriginalDrawDepth.Value;
component. OriginalDrawDepth = null;
}
}
}
22 changes: 22 additions & 0 deletions Content.Client/MobState/DamageStateVisualsComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
using Content.Shared.MobState;

namespace Content.Client.MobState;

[RegisterComponent]
public sealed class DamageStateVisualsComponent : Component
{
public int? OriginalDrawDepth;

[DataField("states")] public Dictionary<DamageState, Dictionary<string, string>> States = new();

/// <summary>
/// Should noRot be turned off when crit / dead.
/// </summary>
[DataField("rotate")] public bool Rotate;
}

public enum DamageStateVisualLayers : byte
{
Base,
BaseUnshaded,
}
80 changes: 80 additions & 0 deletions Content.Server/Dragon/DragonComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
using Content.Shared.Actions.ActionTypes;
using Robust.Shared.Containers;
using System.Threading;
using Content.Shared.Actions;
using Content.Shared.Chemistry.Reagent;
using Content.Shared.Sound;
using Content.Shared.Storage;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;

namespace Content.Server.Dragon
{
[RegisterComponent]
public sealed class DragonComponent : Component
{
/// <summary>
/// The chemical ID injected upon devouring
/// </summary>
[DataField("devourChemical", customTypeSerializer: typeof(PrototypeIdSerializer<ReagentPrototype>))]
public string DevourChem = "Ichor";

/// <summary>
/// The amount of ichor injected per devour
/// </summary>
[DataField("devourHealRate")]
public float DevourHealRate = 15f;

[DataField("devourActionId", customTypeSerializer: typeof(PrototypeIdSerializer<EntityTargetActionPrototype>))]
public string DevourActionId = "DragonDevour";

[DataField("devourAction")]
public EntityTargetAction? DevourAction;

[DataField("spawnActionId", customTypeSerializer: typeof(PrototypeIdSerializer<InstantActionPrototype>))]
public string SpawnActionId = "DragonSpawn";

[DataField("spawnAction")]
public InstantAction? SpawnAction;

/// <summary>
/// The amount of time it takes to devour something
/// <remarks>
/// NOTE: original intended design was to increase this proportionally with damage thresholds, but those proved quite difficult to get consistently. right now it devours the structure at a fixed timer.
/// </remarks>
/// </summary>
[DataField("devourTime")]
public float DevourTime = 15f;

[DataField("spawnCount")] public int SpawnsLeft = 2;

[DataField("maxSpawnCount")] public int MaxSpawns = 2;

[DataField("spawnProto", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? SpawnPrototype = "MobCarpDragon";

[ViewVariables(VVAccess.ReadWrite), DataField("soundDeath")]
public SoundSpecifier? SoundDeath = new SoundPathSpecifier("/Audio/Animals/space_dragon_roar.ogg");

[ViewVariables(VVAccess.ReadWrite), DataField("soundDevour")]
public SoundSpecifier? SoundDevour = new SoundPathSpecifier("/Audio/Effects/demon_consume.ogg");

[ViewVariables(VVAccess.ReadWrite), DataField("soundStructureDevour")]
public SoundSpecifier? SoundStructureDevour = new SoundPathSpecifier("/Audio/Machines/airlock_creaking.ogg");

[ViewVariables(VVAccess.ReadWrite), DataField("soundRoar")]
public SoundSpecifier? SoundRoar =
new SoundPathSpecifier("/Audio/Animals/space_dragon_roar.ogg");

public CancellationTokenSource? CancelToken;

/// <summary>
/// Where the entities go when dragon devours them, empties when the dragon is butchered.
/// </summary>
public Container DragonStomach = default!;
}

public sealed class DragonDevourActionEvent : EntityTargetActionEvent {}

public sealed class DragonSpawnActionEvent : InstantActionEvent {}
}
Loading