Commit Graph

23 Commits

Author SHA1 Message Date
SkyratBot
d40b8e5f0c [MIRROR] Orbit Menu: Add Auto-Observe mode! Refresh button! Alive/Ghost Counters! No more [ghost] tag! (#1186)
* Orbit Menu: Auto-Observe mode, Refresh button, Alive/Ghost counters (#54031)

Observe, Refresh, alive/ghost count, and no more [ghost]

Apply suggestions from mr jaredfogle

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@ users.noreply.github.com>
mister jaredfogle

yes? he built? tgui it

* Orbit Menu: Add Auto-Observe mode! Refresh button! Alive/Ghost Counters! No more [ghost] tag!

Co-authored-by: Emmanuel S <mrdoomboyo@gmail.com>
2020-10-07 20:39:29 +02:00
SkyratBot
6c57007cd1 [MIRROR] Fixes the orbiter component spamming RegisterSignal overrides. (#934)
* Fixes the orbiter component spamming RegisterSignal overrides. (#53891)

Orbiter component keeps Registering the same redundant signal every time a player decides to orbit an atom that already has people orbiting it.

One Register call to one Unregister call and we'll clean up a fuckton of stack_traces about overriding signals from the runtime logs.

* Fixes the orbiter component spamming RegisterSignal overrides.

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2020-09-23 14:55:08 +02:00
SkyratBot
0698a8bd61 [MIRROR] Rename orbiters list of orbiting orbiters var to something sane (#660)
* Rename orbiters.orbiters list to something sane (#53416)

* Rename orbiters list of orbiting orbiters var to something sane

Co-authored-by: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com>
2020-09-06 05:56:05 +02:00
SkyratBot
3d5138261f [MIRROR] The great Spectral Blade permanent ghost trap unGBJing - 10/10 ghosts currently hate this blade (#622)
* The great Spectral Blade permanent ghost trap unGBJing - 10/10 ghosts currently hate this blade (#53324)

Fixes a bug caused by transferring an orbiter component to a parent where one already exists. Causing the old original orbiter to update the added ghosts positions when the parent moves, but not allowing them to ever break orbit and also setting the ref to null for the component on the whole due to old signals it would seem.

Also tweaks the blades use in hand ghost notification message to remove the redundant (Orbit) link.

* The great Spectral Blade permanent ghost trap unGBJing - 10/10 ghosts currently hate this blade

Co-authored-by: Wayland-Smithy <64715958+Wayland-Smithy@users.noreply.github.com>
2020-09-02 03:16:39 +02:00
SkyratBot
0a2d016002 [MIRROR] Smooth Movement: Resurrection: Resurgence: Revengeance 4: The Return of Smooth Movement: Smooth Edition Director's Cut (#550)
* Smooth Movement: Resurrection: Resurgence: Revengeance 4: The Return of Smooth Movement: Smooth Edition Director's Cut (#52515)

Automatic glide size adjustment based on move delay.
Essentially a port of https://github.com/yogstation13/Yogstation/pull/8132 but that was mostly my code with some fixes.

Why again? well it turns out the recent byond fixes to glide size actually worked and solved the issues that were unsolvable.
https://file.house/0B3u.mp4
Glide size no longer incorrectly scales at fps, so it works as intended at any framerate with the only stuttering being normal byond suck stuttering.

* Smooth Movement: Resurrection: Resurgence: Revengeance 4: The Return of Smooth Movement: Smooth Edition Director's Cut

Co-authored-by: Rob Bailey <actioninja@gmail.com>
2020-08-29 20:27:18 +01:00
SkyratBot
e65a48e91f [MIRROR] Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#430)
* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking (#52761)

Adds SIGNAL_HANDLER, a macro that sets SHOULD_NOT_SLEEP(TRUE). This should ideally be required on all new signal callbacks.

Adds BLOCKING_SIGNAL_HANDLER, a macro that does nothing except symbolize "this is an older signal that didn't necessitate a code rewrite". It should not be allowed for new work.

This comes from discussion around #52735, which yields by calling input, and (though it sets the return type beforehand) will not properly return the flag to prevent attack from slapping.

To fix 60% of the yielding cases, WrapAdminProcCall no longer waits for another admin's proc call to finish. I'm not an admin, so I don't know how many behinds this has saved, but if this is problematic for admins I can just make it so that it lets you do it anyway. I'm not sure what the point of this babysitting was anyway.

Requested by @optimumtact.
Changelog

cl
admin: Calling a proc while another admin is calling one will no longer wait for the first to finish. You will simply just have to call it again.
/cl

* Adds SIGNAL_HANDLER and SIGNAL_HANDLER_DOES_SLEEP to prevent signal callbacks from blocking

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-08-19 20:17:28 -04:00
AnturK
de21384476 Fixes orbit offsets and adds matrix vv preview. (#51198)
* Adds matrix vv preview and moves vv css into separate file.

* Fixes orbit offsets.
2020-05-25 02:01:41 +08:00
JJRcop
a1392847bd Remove ismovableatom macro (#9) 2020-02-17 15:03:16 +01:00
Emmett Gaines
9e34b3d6a1 Supports named arguments in AddComponent and AddElement (#49098)
AddComponent/AddElement now support named arguments. This requires passing around an argument list instead of using actual proc args which a bit gross but we can blame byond for forcing this.

InheritComponent uses mirrored init arguments instead of an argument list which means no more accessing it via index to get to the same arguments as in init.

As a small bonus I restructured dcs defines to be a bit more manageable. Mainly just splits them into separate files and gives them their own folder.
2020-02-17 17:57:52 +13:00
Rob Bailey
ba876548f3 Revert "[ready] Smooth-ish move rising: revengeance" (#48156)
Reverts #47817

People are complaining about motion sickness and I don't know what the issue is.
2020-01-04 23:58:31 +13:00
Emmett Gaines
8e775638d4 Fixes orbit component transfer runtime (#48379) 2019-12-27 10:30:28 -05:00
Rob Bailey
798bbd3d99 [ready] Smooth-ish move rising: revengeance (#47817)
* Smooth movement

Squashed commit:

[870d550fff] updates a variable name to not shadow a parent variable

[65131a9a4b] redundant

[7c85f7b87e] override based pulling and pushing

[60a9760c4b] unnecessary when it's done via an override

[0a67dfb3cb] removes a redundant manual override

[7f25104fed] pushing

[2bfd9973eb] eh

[fca7155245] cast properly

[ad4b9ad8ab] compile fix

[c28fde4bfb] some wonkiness with pulling fixed

[0e028d30b3] buckling fix + finer rounding

[8f93df2bbe] dragging + buckling fixes

[1541e1ce78] small optimization

[bda72345dd] smoother movement

fix to dragging being fucky

vehicle fix

orbiter fix

eof newline

cleanup

comment cleanup

stupid hack

bunch of tweaks/hacks + 60 fps default oh god

potential fix for orbiter issues (in a shitty way)

early override for some cases

unset orbit

multiply instead of add offset

no

no more timescale scaling and higher multiplier

meant to include this in last commit

comment

* clamp to 6, 1.25 multiplier

* (poorly) fixed buckles not always propagating

* get rid of some debug prints whoops

* fixes an infinite loop

* syntax + update savefile instead of interpreting 0 different

* uuuh
2019-12-05 02:34:46 +00:00
Emmett Gaines
2e956adfd0 Makes a generic recursive movement tracker (#47241)
* Makes a generic recursive movement tracker

* Cleans up the tracker datum in orbits

* Untracks the old tracked object if track() is called manually

* Makes the orbiter component clean up the tracker properly
2019-10-31 17:36:05 -04:00
4dplanner
2dc4bcad70 set parent.orbiters on register (#47344) 2019-10-25 02:35:14 -07:00
TheChosenEvilOne
e0bcd2538f [Ready] Deadchat control component, also a chance for deadchat controlled birdboat. (#47110)
* Dead chat controlled singularity!
It just can't go wrong.

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* Renames the input_cooldown var to make more sense.

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* Begone ugly checks.

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* oh yeah, I can just do this.

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* Replaced the deadchat control with a component.

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* Autodoc

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* Removed the leftover global list.

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* Possessed goose, bye singularity.

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* vomit

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* Deadchat plays singularity

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* Removed global mode completely, also reviews.

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* Reviews.

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>

* alrighty then

Signed-off-by: TheChosenEvilOne <tceo-email@protonmail.com>
2019-10-23 22:00:22 +02:00
Emmett Gaines
d615abf23c Replaces callbacks in signals with simple proc paths (#44579) 2019-06-22 18:21:57 +02:00
AnturK
85871da5c9 Fixes ghost seizures. 2019-06-10 11:19:47 +02:00
oranges
0267bce949 Turns out a bunch of components do not properly transfer because of (#42691)
one of three things.

    1. They don't use RegisterWithParent or UnregisterFromParent to unregister
       and register signals

    2. They use callbacks which refer to a source object, which is usually deleted
       on transfer, or lost in some manner, or simply makes no sense at all to be
       transferred

    3. the component was never designed to be transferred at all

TransferComponents gave no shits about any of this and just blindly transferred
all components, if they were actually capable of it or not.

I only noticed this because it was causing chairs to break as they would not register signals
and verbs correctly for rotation after being picked up and then placed down, and a player
reported that issue via ahelp.

Luckily we caught it before the rot got anywhere, only chairs and the shuttle subystem
tend to use this proc (Shuttle uses it on turfs), can you imagine if everything was using
this LMAO

Which is good because it's more dangerous than a loaded gun

I have added a can_transfer var, that is true when a component is valid to
actually transfer, which means the dev has actually thought about what happens when
you take the parent object away and swap it for another and all the crazy that is entailed
by this

I have done my best to audit what components are actually
transferable, but things are basically a hot mess (Thanks @Cyberboss )

The following components required edits:
Forensics:
did not register/deregister the clean_act signal properly, did not checkblood on new parent

Rotation:
did not use RegisterWithParent or UnregisterFromParent, turned out
to not be transferable anyway due to having callbacks that can be
passed in to the parent with unknown sources that we can't feasibly
reuse (i.e if you're transferred from a chair to a bed, your old rotation
call backs are no longer valid). Turns out the use case it was for (just chairs)
didn't need it anyway, so I just made it non valid for transfer.

Wet Floor:
Honestly this one is just a hot mess, it should be a subtype of the slippery
component with the extra wet turf handling.

As it is it basically manages a slippery component on top of it's own extra
functionality, so that's a major code smell.

I added registration/unregistration of the signals, and made it's pretransfer
remove the slippery component and the posttransfer add it back (via update_flags)

Components that seem transferable without issues
mirage_border
orbiter
decal
spill
storage (I hope to earth)
2019-03-05 20:27:29 +01:00
ninjanomnom
f039c02b20 Only check if we moved when a checktick sleep happens 2018-10-12 17:20:19 -04:00
ninjanomnom
517ba3410e Fixes an orbit runtime from orbiters deleting at inopportune times 2018-10-12 17:17:29 -04:00
Emmett Gaines
940cd92824 More orbit fixes (#40557)
Attempt 2 at fixing the remaining bugs with orbits

Incorpmove had to be converted to forceMove() to make orbits able to tell when they move. They used loc setting before. This likely breaks some things but I couldn't find any particular issues. We should be overriding forceMove anyway for things that need to handle loc changes like that differently.

fixes #40544
fixes #40522
2018-10-03 10:05:09 +13:00
Emmett Gaines
1cb74aff0b Component strengthening course (#40480) 2018-09-26 12:40:19 +03:00
Emmett Gaines
31914a594e Componentizes orbiting (#40433)
cl ninjanomnom
fix: Orbiting is a little more aggressive about staying in orbit. The wisp as a result now correctly follows you over shuttle moves.
/cl

Goodbye SSorbit you ticking piece of shit

This also gives update_sight a signal so wisp code isn't hardcoded into it.
2018-09-25 18:23:27 +12:00