Commit Graph

30 Commits

Author SHA1 Message Date
SkyratBot
169c42a262 [MIRROR] Refactors connect_loc_behalf into a component (#7613)
* Refactors connect_loc_behalf into a component (#60678)

See title. Also refactors caltrops into a component because they use connect_loc_behalf which requires them to hold the state.

This also fixes COMPONENT_DUPE_SELECTIVE from just outright not working.

connect_loc_behalf doesn't make sense as an element because it tries to hold states. There is also no way to maintain current behaviour and not have the states that it needs.
Due to the fact that it tries to hold states, it means the code itself is a lot more buggy because it's a lot harder to successfully manage these states without runtimes or bugs. 

On metastation, there is only 2519 connect_loc_behalf components at roundstart. MrStonedOne has told me that datums take up this much space:
image

If we do the (oversimplified) math, there are only ever 5 variables that'll likely be changed on most connect_loc_behalf components at runtime:
connections,
tracked,
signal_atom,
parent,
signal_procs

This means that on metastation at roundstart, we take up this amount: (24 + 16 * 5) * 2519 = 261.97600 kilobytes
This is not really significant and the benefits of moving this to a component greatly outweighs the memory cost.

(Basically the memory cost is outweighed by the maint cost of tracking down issues with the thing. It's too buggy to be viable longterm basically)

* Update glass.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-08-17 20:29:11 +01:00
SkyratBot
18724df6fe [MIRROR] Fixed phantom slipping caused by mk-clown shoes bananas (#7328)
* Fixed phantom slipping caused by mk-clown shoes bananas (#60626)

Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>

* Fixed phantom slipping caused by mk-clown shoes bananas

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
2021-08-03 20:03:50 +01:00
SkyratBot
7465ce721e [MIRROR] fixes hyperspace connect_loc_behalf bug (#6948)
* fixes hyperspace connect_loc_behalf bug (#60231)

turns out my move_stacks var doesnt work asynchronously since this bug made things with connect_loc_behalf runtime on every movement unless you somehow moved it back to the transit turf and off without it doing the runtime special.

(The sleep and hell the whole bit of code in space/Entered was unneeded, since it just happens normally as a part of move. Life is pain) -Lemon

also does misc code improvements i found while investigating ANOTHER c_l_b bug with stacks i found while testing this one, which i did NOT manage to fix unfortunately

* fixes hyperspace connect_loc_behalf bug

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-07-16 17:15:11 +01:00
SkyratBot
56d4291ef6 [MIRROR] Reverts Entered() passing dir instead of old loc (#6646)
* Reverts Entered() passing dir instead of old loc (#59910)

* Reverts Entered() passing dir instead of old loc

Co-authored-by: Rohesie <rohesie@gmail.com>
2021-07-02 16:42:34 +01:00
SkyratBot
5326760cb3 [MIRROR] Makes turfs persist their signals, uses this to optimize connect_loc (#6465)
* Makes turfs persist their signals, uses this to optimize connect_loc  (#59608)

* Makes turfs persist signals

* Splits connect_loc up into two elements, one for stuff that wishes to connect on behalf of something, and one for stuff that just wants to connect normally. Connecting on behalf of someone has a significant amount of overhead, so let's do this to keep things clear

* Converts all uses of connect_loc over to the new patterns

* Adds some comments, actually makes turfs persist signals

* There's no need to detach connect loc anymore, since all it does is unregister signals. Unregisters a signal from formorly decal'd turfs, and makes the changeturf signal persistance stuff actually work

* bro fuck documentation

* Changes from a var to a proc, prevents admemems and idiots

* Extra detail on why we do the copy post qdel

* Makes turfs persist their signals, uses this to optimize connect_loc

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2021-06-23 04:23:48 +01:00
SkyratBot
d85a02babd [MIRROR] Refactors move procs to support multitle objects (#6423)
* Refactors move procs to support multitle objects

* Update _blob.dm

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-22 22:40:04 +01:00
SkyratBot
7d1d0e1fad [MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs

* AA

* a

* AAAAAAAAAAAAAAAAAAAAAA

* Update species.dm

Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-06-16 00:24:49 +01:00
SkyratBot
5880be0168 [MIRROR] (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc (#5524)
* (code bounty) refactors all uses of Crossed() and Uncrossed() into signals sent to loc, tracked by connect_loc

* WHEW THAT WAS EASY

* Update ammo.dm

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
2021-05-07 22:39:27 +01:00
SkyratBot
f33641ccea [MIRROR] Gives the slippery component a default whitelist of allowed slots (#4853)
* Gives the slippery component a default whitelist of allowed slots (#58267)

* Gives the slippery component a default whitelist of allowed slots

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2021-04-12 22:09:47 +01:00
SkyratBot
973c2c8a6c [MIRROR] Autodocs the slippery component + changes the hardcoded slot whitelist to a variable (#4318)
* Autodocs the slippery component + changes the hardcoded slot whitelist to a variable (#57878)

* Autodocs the slippery component + changes the hardcoded slot whitelist to a variable

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
2021-03-22 13:04:45 +00:00
SkyratBot
134377fc2c [MIRROR] No More Calling get_equipped_items() in mob/living/Crossed(), Makes Slippery Component Work Without it (#3292)
* No More Calling get_equipped_items() in mob/living/Crossed(), Makes Slippery Component Work Without it (#56820)

* gets rid of mob/living/crossed and makes clown pdas work without it

* makes squeaky work without COMSIG_ITEM_WEARERECROSSED

* No More Calling get_equipped_items() in mob/living/Crossed(), Makes Slippery Component Work Without it

Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
2021-02-11 23:44:29 +00:00
SkyratBot
94ed7ed0f1 [MIRROR] Refactors how movetypes are added and removed, No timers this time. (#2358)
* Refactors how movetypes are added and removed, No timers this time. (#55444)

* Refactors how movetypes are added and removed, No timers this time.

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2020-12-29 02:39:03 +00:00
SkyratBot
66c207e19c [MIRROR] Reverts (#54963) due to timer spam (#2109)
* Revert "Refactors how movetype flags are added and removed and the floating animation (#54963)" (#55432)

This reverts commit b8425c003a.

* Reverts (#54963) due to timer spam

Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
2020-12-10 05:58:05 +01:00
SkyratBot
2ee5d422ae [MIRROR] Refactors how movetype flags are added and removed and the floating animation (#2096)
* Refactors how movetype flags are added and removed and the floating animation (#54963)

I wanted to refactor how movetype flags are added and removed into traits to prevent multiple sources of specific movement types from conflicting one other. I ended up also having to refactor the floating animation loop (the one that bobs up and down) code in the process.
Why It's Good For The Game

A way to avoid conflict from multiple sources of movement types.
This also stops melee attacks, jitteriness and update_transform() from temporarily disabling the floating movetype bitflag altogether until the next life tick.

Tested, but i'm pretty sure improvements could be made.
Changelog

cl
fix: jitteriness, melee attack animations and resting/standing up should no longer momentarily remove the floating movement type.
/cl

* Refactors how movetype flags are added and removed and the floating animation

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
2020-12-09 23:43:42 +01:00
SkyratBot
970a2b03d6 [MIRROR] Mobility refactor: no more update_mobility() (#1233)
* Mobility refactor: no more update_mobility()

* Update robot.dm

Fixes robots.

* megadumb

* Update robot.dm

* weh

* Update gunpoint_datum.dm

Co-authored-by: Rohesie <rohesie@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
2020-10-10 02:31:35 +02: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
jdawg1290
62676e72a8 Force LF line endings with gitattributes and convert repo (#52266)
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2020-07-16 03:02:40 +03:00
itseasytosee
daf2e48c17 Clowns now require their shoes to slip people while laying down (#50650)
* powerclown

* Fix

* To chat

* You displease me

* Great

* awsum

* Update code/datums/components/slippery.dm

Co-Authored-By: JJRcop <jrubcop@gmail.com>

Co-authored-by: JJRcop <jrubcop@gmail.com>
2020-04-25 15:43:35 -04:00
spookydonut
beca456c0f Add new lints (#49751)
Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>
2020-03-09 22:13:48 -07:00
Qustinnus
0d46e6c441 You can no longer slip on fireman-carried clowns (#47000)
* trips

* yikes

* im braindead
2019-10-13 16:43:40 +13:00
Unknown
df76d0dbb2 slip 2019-09-14 22:56:28 +02:00
Qustinnus
9812834054 Adds knight armour to the game that can be made from any material (#46301)
* Adds knight armour

* fixes armor

* nerfs & fixes

* adds ruin

* done

* bug

* oh im a buddy

* rad

* ok nem

* fix sprite

* fixes

* tgm

* epic

* re-adds icons

* fixes list

* ok ninja

* fixes

* fixed

* woops
2019-09-14 15:32:29 -04:00
kevinz000
2d0cac9d37 Removes stun and item drop from all slips. They will instead knock people down (force crawling) for their duration. (#41068)
image
I originally was going to cut stun/paralyze duration instead but since none of them will now hard stun I think it's fair for them to keep their original duration/power as knockdown.
2018-11-07 21:51:57 +13:00
Emmett Gaines
0943e56e08 Adds the signal origin as the first arg to all signals (#39861)
* Adds the signal origin as the first arg to all signals

* Fixes some storage and nanite procs
2018-08-28 18:28:29 +03:00
Emmett Gaines
34a3d2da4d Refactors component signals registration (#38798)
Datums know what signals are being listened for and components can now be registered to listen for signals on more than one object.
2018-07-05 00:56:39 +03:00
Jordan Brown
3aba012d67 Removes ComponentActivated in favor of callbacks (#33274)
* Removes ComponentActivated

* Removes a bit of proc call overhead

* Fix callback definition
2017-12-05 15:41:56 -06:00
Emmett Gaines
d56a47253e Bitflag returns from component signals (#33186)
* For more useful returns from sendsignal

* removes a needless else/indentation

* cleanup
2017-12-01 14:09:25 -05:00
Jordan Brown
49feced945 RegisterSignal() can now accept a list (#31098)
* RegisterSignal may now accept a list of signals

* Update old calls to RegisterSignal()
2017-09-30 14:58:52 +02:00
Jordan Brown
fc41bf41ef Cleans up component Initialization (#29891)
* Cleans up component Initialization

* Add LoadComponent()
2017-08-22 09:26:56 +12:00
Jordan Brown
3c56d0f4f3 Ports duplicated slipping code to a component (#29628)
* Ports duplicated slipping code to a component

* Makes metal not slippery

* asdf

* Instead of cherry picking like an idiot I could just copy paster

* OOP

* And blood, don't forget Fry's blood!

* Further fixes

* A more generic fashion

* Use the new system

* Fixes

* Fix cartridge type

* Remove inertia
2017-08-09 16:06:15 +02:00