2021-10-27 04:24:22 +03:00
|
|
|
using Content.Server.Light.EntitySystems;
|
Bodysystem and damagesystem rework (#1544)
* Things and stuff with grids, unfinished w/ code debug changes.
* Updated submodule and also lost some progress cause I fucked it up xd
* First unfinished draft of the BodySystem. Doesn't compile.
* More changes to make it compile, but still just a framework. Doesn't do anything at the moment.
* Many cleanup changes.
* Revert "Merge branch 'master' of https://github.com/GlassEclipse/space-station-14 into body_system"
This reverts commit ddd4aebbc76cf2a0b7b102f72b93d55a0816c88c, reversing
changes made to 12d0dd752706bdda8879393bd8191a1199a0c978.
* Commit human.yml
* Updated a lot of things to be more classy, more progress overall, etc. etc.
* Latest update with many changes
* Minor changes
* Fixed Travis build bug
* Adds first draft of Body Scanner console, apparently I also forgot to tie Mechanisms into body parts so now a heart just sits in the Torso like a good boy :)
* Commit rest of stuff
* Latest changes
* Latest changes again
* 14 naked cowboys
* Yay!
* Latest changes (probably doesnt compile)
* Surgery!!!!!!!!!~1116y
* Cleaned some stuff up
* More cleanup
* Refactoring of code. Basic surgery path now done.
* Removed readme, has been added to HackMD
* Fixes typo (and thus test errors)
* WIP changes, committing so I can pull latest master changes
* Still working on that god awful merge
* Latest changes
* Latest changes!!
* Beginning of refactor to BoundUserInterface
* Surgery!
* Latest changes - fixes pr change requests and random fixes
* oops
* Fixes bodypart recursion
* Beginning of work on revamping the damage system.
* More latest changes
* Latest changes
* Finished merge
* Commit before removing old healthcode
* Almost done with removing speciescomponent...
* It compiles!!!
* yahoo more work
* Fixes to make it work
* Merge conflict fixes
* Deleting species visualizer was a mistake
* IDE warnings are VERBOTEN
* makes the server not kill itself on startup, some cleanup (#1)
* Namespaces, comments and exception fixes
* Fix conveyor and conveyor switch serialization
SS14 in reactive when
* Move damage, acts and body to shared
Damage cleanup
Comment cleanup
* Rename SpeciesComponent to RotationComponent and cleanup
Damage cleanup
Comment cleanup
* Fix nullable warnings
* Address old reviews
Fix off welder suicide damage type, deathmatch and suspicion
* Fix new test fail with units being able to accept items when unpowered
* Remove RotationComponent, change references to IBodyManagerComponent
* Add a bloodstream to humans
* More cleanups
* Add body conduits, connections, connectors substances and valves
* Revert "Add body conduits, connections, connectors substances and valves"
This reverts commit 9ab0b50e6b15fe98852d7b0836c0cdbf4bd76d20.
* Implement the heart mechanism behavior with the circulatory network
* Added network property to mechanism behaviors
* Changed human organ sprites and added missing ones
* Fix tests
* Add individual body part sprite rendering
* Fix error where dropped mechanisms are not initialized
* Implement client/server body damage
* Make DamageContainer take care of raising events
* Reimplement medical scanner with the new body system
* Improve the medical scanner ui
* Merge conflict fixes
* Fix crash when colliding with something
* Fix microwave suicides and eyes sprite rendering
* Fix nullable reference error
* Fix up surgery client side
* Fix missing using from merge conflict
* Add breathing
*inhale
* Merge conflict fixes
* Fix accumulatedframetime being reset to 0 instead of decreased by the threshold
https://github.com/space-wizards/space-station-14/pull/1617
* Use and add to the new AtmosHelpers
* Fix feet
* Add proper coloring to dropped body parts
* Fix Urist's lungs being too strong
* Merge conflict fixes
* Merge conflict fixes
* Merge conflict fixes
Co-authored-by: GlassEclipse <tsymall5@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
Co-authored-by: AJCM-git <60196617+AJCM-git@users.noreply.github.com>
2020-08-17 01:42:42 +02:00
|
|
|
using Content.Shared.Damage;
|
2023-07-24 14:07:35 +12:00
|
|
|
using Content.Shared.DeviceLinking;
|
2023-09-04 06:31:10 +01:00
|
|
|
using Content.Shared.Light.Components;
|
2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2022-11-16 20:22:11 +01:00
|
|
|
using Robust.Shared.Containers;
|
|
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2018-05-27 16:44:50 +02:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Light.Components
|
2018-05-27 16:44:50 +02:00
|
|
|
{
|
2019-03-22 23:59:13 +01:00
|
|
|
/// <summary>
|
|
|
|
|
/// Component that represents a wall light. It has a light bulb that can be replaced when broken.
|
|
|
|
|
/// </summary>
|
2022-06-07 15:26:28 +02:00
|
|
|
[RegisterComponent, Access(typeof(PoweredLightSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class PoweredLightComponent : Component
|
2018-05-27 16:44:50 +02:00
|
|
|
{
|
2021-07-10 17:35:33 +02:00
|
|
|
[DataField("burnHandSound")]
|
2021-10-27 04:24:22 +03:00
|
|
|
public SoundSpecifier BurnHandSound = new SoundPathSpecifier("/Audio/Effects/lightburn.ogg");
|
2021-07-10 17:35:33 +02:00
|
|
|
|
|
|
|
|
[DataField("turnOnSound")]
|
2021-10-27 04:24:22 +03:00
|
|
|
public SoundSpecifier TurnOnSound = new SoundPathSpecifier("/Audio/Machines/light_tube_on.ogg");
|
2021-07-10 17:35:33 +02:00
|
|
|
|
2022-01-04 22:25:37 -07:00
|
|
|
[DataField("hasLampOnSpawn", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
|
|
|
public string? HasLampOnSpawn = null;
|
2020-02-22 17:39:00 -06:00
|
|
|
|
2021-10-27 04:24:22 +03:00
|
|
|
[DataField("bulb")]
|
|
|
|
|
public LightBulbType BulbType;
|
2021-03-05 01:08:38 +01:00
|
|
|
|
2021-10-27 04:24:22 +03:00
|
|
|
[DataField("on")]
|
|
|
|
|
public bool On = true;
|
2021-03-05 01:08:38 +01:00
|
|
|
|
2021-10-27 04:24:22 +03:00
|
|
|
[DataField("damage", required: true)]
|
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public DamageSpecifier Damage = default!;
|
2021-03-05 01:08:38 +01:00
|
|
|
|
2021-07-31 19:52:33 +02:00
|
|
|
[DataField("ignoreGhostsBoo")]
|
2021-08-31 11:33:55 +03:00
|
|
|
public bool IgnoreGhostsBoo;
|
|
|
|
|
|
|
|
|
|
[DataField("ghostBlinkingTime")]
|
|
|
|
|
public TimeSpan GhostBlinkingTime = TimeSpan.FromSeconds(10);
|
|
|
|
|
|
|
|
|
|
[DataField("ghostBlinkingCooldown")]
|
|
|
|
|
public TimeSpan GhostBlinkingCooldown = TimeSpan.FromSeconds(60);
|
|
|
|
|
|
2019-03-22 23:59:13 +01:00
|
|
|
[ViewVariables]
|
2021-10-27 04:24:22 +03:00
|
|
|
public ContainerSlot LightBulbContainer = default!;
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public bool CurrentLit;
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public bool IsBlinking;
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public TimeSpan LastThunk;
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public TimeSpan? LastGhostBlink;
|
2022-05-12 20:46:20 +12:00
|
|
|
|
2023-07-24 14:07:35 +12:00
|
|
|
[DataField("onPort", customTypeSerializer: typeof(PrototypeIdSerializer<SinkPortPrototype>))]
|
2022-05-12 20:46:20 +12:00
|
|
|
public string OnPort = "On";
|
|
|
|
|
|
2023-07-24 14:07:35 +12:00
|
|
|
[DataField("offPort", customTypeSerializer: typeof(PrototypeIdSerializer<SinkPortPrototype>))]
|
2022-05-12 20:46:20 +12:00
|
|
|
public string OffPort = "Off";
|
|
|
|
|
|
2023-07-24 14:07:35 +12:00
|
|
|
[DataField("togglePort", customTypeSerializer: typeof(PrototypeIdSerializer<SinkPortPrototype>))]
|
2022-05-12 20:46:20 +12:00
|
|
|
public string TogglePort = "Toggle";
|
2022-06-21 20:55:06 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// How long it takes to eject a bulb from this
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("ejectBulbDelay")]
|
|
|
|
|
public float EjectBulbDelay = 2;
|
2023-07-27 07:37:09 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Shock damage done to a mob that hits the light with an unarmed attack
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("unarmedHitShock")]
|
|
|
|
|
public int UnarmedHitShock = 20;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stun duration applied to a mob that hits the light with an unarmed attack
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("unarmedHitStun")]
|
|
|
|
|
public TimeSpan UnarmedHitStun = TimeSpan.FromSeconds(5);
|
2018-05-27 16:44:50 +02:00
|
|
|
}
|
|
|
|
|
}
|