mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 08:37:26 +00:00
* Allulalo: finally finishing the ancient raptor species project (#3504) * well, it loads * sprite's * names + starting on displacements * more displacements * displacements * left hand only * displacements * yup * ooa * inhand displacements * blood * accent * iv bags * placeholder clarification * Revert "iv bags" This reverts commit c2aa504eab8d0673604b33e0ccaf79b406979da6. * whitespace * adds tooshortforUI and removes the damage modifier set * speechsounds * typing indicator * basic customisation * guidebook 1 * fixed full * markings, displacements, speech verb * displacement fixes * trailing newlines * spelling moment * brute damage sprites and blood fix * guidebook iteration * injection melee + ethanotoxin + guidebook rewrite * guidebook * guidebook * nitpicks + roundstart --------- Co-authored-by: starlighthowls <starlighthowls7@gmail.com> Co-authored-by: mqole <anactualpanacea@gmail.com> * Allulalo tooshotforui bugfix (#3598) * yay * p[leebnmar * oops * Allulalo Markings (#3602) * eye markings and two tails * more * almost got ya * yup * wings yay * thank you landshark for my life btw * still needs loc files * Update allulalo.ftl * I lost so much progress to git bullshit * and who can forget dear rat boy * touch up speech indicator at yesters request --------- Co-authored-by: starlighthowls <starlighthowls7@gmail.com> * Allulalo Roundstart (#3621) * yup * shock blanket + pleebnar fixes * yuuup (#3655) * Allulalo fix pass 1 (#3661) * what if I did it all in one commit like a total moron * yup * untuch * i love you spriting tool * my birdsty * Update allulalo.yml * Update Species.xml * let allulalo use holopads. (#3669) * adds a white list for the too small component to add specific allowed entities. e.g holopads * imp comment * i love forgetting white space!!!! --------- Co-authored-by: sev7ves <soapedzone@gmail.com> Co-authored-by: beck <163376292+widgetbeck@users.noreply.github.com> * fix (#3693) * I need to learn to not do everything in one commit (#3750) * mime on again (#4243) * Small fix * Add them to our accentless trait * Add unable to wield system * Fix too short for UI using old blacklist methods * Fix duplicated localization line * Add heavyweight drunk comp (might merge this with lightweight later) * Why was this even added * Revert "Add unable to wield system" This reverts commitcbe3a10fc7. * Revert "Fix too short for UI using old blacklist methods" This reverts commit833743f029. * add TooShortForUIComponent (#3495) * add TooShortForUIComponent * correct documentation * incomplete documentation * add UnableToWieldComponent (#3496) * Fixing this again I am dumb I cherrypicked things in the wrong order * WHY WAS THIS EVEN ADDED THERE'S NO SPRITE EVEN ON IMPSTATION??? * Port Allulalos to Nubody * Fix for Allulalo chems doing nothing * Add allulalo to the guidebook species list * Restore some accidentally deleted effects and comments * Fix typo that made allu blood 10x more alcoholic than normal * Delete random misplaced sprites from cherrypicking * More of the random sprites removal (this time from the meta) * Add missing allulalo flavor * Removed some nonexistant fields from the species * Add unisex cough/sneeze, comment out Wuhey and Ungh emotes * Fix guidebook not using loc string * I THINK this fixes that test error and it doesn't seem to break anything either so let's try * Remove unsupported unshaded shader from eyes * Ok last one didn't work (sorry for trial and error) * Removed mention of HARMPACKs and Tether Guns from the guidebook. * Blacklist allulalos from random humanoid spawns * Add missing allulalo gulp sound * Carriable in 1 hand allulalos, fix carrying system blocking both hands always * Remove DV comments --------- Co-authored-by: Kip <32859367+kipdotnet@users.noreply.github.com> Co-authored-by: starlighthowls <starlighthowls7@gmail.com> Co-authored-by: mqole <anactualpanacea@gmail.com> Co-authored-by: sev7ves <58966116+sev7ves@users.noreply.github.com> Co-authored-by: sev7ves <soapedzone@gmail.com> Co-authored-by: beck <163376292+widgetbeck@users.noreply.github.com> Co-authored-by: Yesteryear <208338078+yesteryuri@users.noreply.github.com>
59 lines
2.4 KiB
C#
59 lines
2.4 KiB
C#
using Content.Shared.Buckle.Components;
|
|
using Content.Shared.Climbing.Components;
|
|
using Content.Shared.Gravity;
|
|
using Content.Shared.Popups;
|
|
using Content.Shared.UserInterface;
|
|
using Content.Shared.Whitelist;
|
|
using Robust.Shared.Network;
|
|
using Robust.Shared.Physics.Components;
|
|
using Robust.Shared.Timing;
|
|
|
|
namespace Content.Shared._Impstation.TooShortForUI;
|
|
|
|
public sealed class TooShortForUI : EntitySystem
|
|
{
|
|
[Dependency] private readonly IGameTiming _timing = default!;
|
|
[Dependency] private readonly INetManager _net = default!;
|
|
[Dependency] private readonly EntityWhitelistSystem _whitelist = default!;
|
|
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
|
[Dependency] private readonly SharedGravitySystem _gravity = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
SubscribeLocalEvent<TooShortForUIComponent, UserOpenActivatableUIAttemptEvent>(OnUIOpenAttempt);
|
|
}
|
|
|
|
public void OnUIOpenAttempt(Entity<TooShortForUIComponent> ent, ref UserOpenActivatableUIAttemptEvent args)
|
|
{
|
|
// first, check if we're buckled to something, and if we are, return
|
|
if (TryComp<BuckleComponent>(ent, out var buckle) && buckle.Buckled)
|
|
return;
|
|
|
|
// next, check if we're in the air. if we are, return
|
|
if (TryComp<PhysicsComponent>(ent, out var physics) && physics.BodyStatus != BodyStatus.OnGround)
|
|
return;
|
|
|
|
// next, check if we're weightless. you get the idea
|
|
if (TryComp<GravityAffectedComponent>(ent, out var gravityAffected) && _gravity.IsWeightless((ent.Owner, gravityAffected)))
|
|
return;
|
|
|
|
// check if we're on a table.
|
|
if (TryComp<ClimbingComponent>(ent, out var climbing) && climbing.IsClimbing)
|
|
return;
|
|
|
|
// finally, if the target entity is on the whitelist, return if true
|
|
if (_whitelist.IsWhitelistPass(ent.Comp.Whitelist, args.Target))
|
|
return;
|
|
|
|
// if the target entity is on the blacklist or no blacklist is defined, cancel the event
|
|
if (_whitelist.IsWhitelistPass(ent.Comp.Blacklist, args.Target))
|
|
args.Cancel();
|
|
|
|
// if the event has been cancelled and there is popup text, popup
|
|
if (args.Cancelled && ent.Comp.PopupText != null && _net.IsClient && _timing.IsFirstTimePredicted)
|
|
_popup.PopupEntity(Loc.GetString(ent.Comp.PopupText), ent, ent);
|
|
}
|
|
}
|