Commit Graph

12 Commits

Author SHA1 Message Date
AsV9
d338cac150 Merge remote-tracking branch 'tgstation/master'
Not sure if this worked. Used a wonky special snowflake strat to merge.
2018-03-24 08:57:13 +01:00
Kyle Spier-Swenson
c068942fc4 Fixes callbacks and invoke time args failing when pushUsr was used (#35395)
* Fixes callbacks and invoke time args failing when pushUsr was used

* y u do dis byond
2018-02-07 20:38:07 +02:00
Jordan Brown
fec2d66318 Datum var cleanup (#34314)
* Consolidates datum var location

* Move ui_screen to /datum/tgui

* Move focusers to datum.dm. Move fingerprintslast to /atom

* Remove focusers list, makes mobs check if their focus is QDELETED in Life()

* Consolidate use_tag and var_edited into datum_flags

* Revert garbage comment

* Thought I already removed this

* Remove the var_edited preservation

* Removes focus QDELETED handling
2018-01-21 22:38:56 -05:00
Jordan Brown
3f3fc942d4 Callback security and usr (#33599)
* Gonna regret writing this one day

* tmp -> temp

* Make PushUsr() a /world proc

* Callbacks now preserve usr

* Fixes PushUsr return value

* Fixes PushUsr invocations

* Update modifyvariables.dm

* Use weakrefs in callback user

* Further fixes

* Whoopsie
2017-12-18 21:42:25 -06:00
Jordan Brown
98c98a24c8 Makes ImmediateInvokeAsync a world proc 2017-10-26 15:29:04 -04:00
shizcalev
81e5154a70 Various grammar fixes 2017-09-17 01:46:41 -04:00
Kyle Spier-Swenson
c2d73dcc46 Remove debug 2017-08-11 13:54:56 -07:00
Kyle Spier-Swenson
77e29526db Adds callback select system
This system lets you run a group of callbacks asynchronously, returning once all of them finish, without having to wait for each callback to finish before running the next one.

I made it in my bicon pr, but i don't need it anymore, so i removed it from there and put it here.
2017-08-10 13:47:14 -07:00
Cyberboss
6a9fa3d35a Adds a proc to check if the current thread is from an admin advanced proc call (#26191)
* Admin proc call guards

* Adds a db warning

* Better this way

* leftover

* )=

* Fix

* Wew

* Better runtime handling

* Make callback use it if var_edited
2017-04-15 11:24:35 -06:00
Cyberboss
f7c9749ca0 Fixes some bad addtimer calls. Adds INVOKE_ASYNC. Replaces addtimer(..., 0) (#23424)
* Fixes some bad addtimers

* Adds INVOKE

* Warning for addtimer

* Working syntax

* Another bad call

* Fixes the addtimer warning

* Add suppress_zero_warning to addtimer

Useful for addtimer that uses vars

* Add INVOKE_AGAIN for when the var is already defined

* Replace addtimer(...,0) with INVOKE((...))

* Much more sensible syntax

* Less overhead, less copypaste

* Rename INVOKE_ASYNC

* Use a macro

* Allman style

* Wait, why make it a datum in the first place?

* Revert the rename

* Rename again, keep line endings

* typo

* More typos

* Untouches Addtimer

* Update callbacks.dm

* Update timer.dm

* Revert allman style

* Revert "Revert allman style"

This reverts commit 47361da15bd04eca138be5f13acdc9dd5ba89331.

* Trying to match that whitespace diff

* Why is this missing?

* I'm not fucking dealing with this!
2017-01-31 09:20:54 +13:00
Kyle Spier-Swenson
bee4b132a3 [READY]Makes addtimer use callbacks (#22660)
* Makes addtimer use callbacks

* I broke the comment

* I fucked up the regex

* this was a silly idea.
2017-01-04 16:02:56 +13:00
Kyle Spier-Swenson
280dbe20c3 [Ready] SSthrowing + callbacks! (#22476)
* SSthrowing + callbacks!
Throwing is now a subsystem.
It's low priority, but is a ticker subsystem so is ran before most other subsystems.
To allow for shit to run after the throw finishes, throwing now supports a callback.
A callback datum system was created, conversion of addtimer is planned for another PR.
Throwing now has a limit of 2048 turfs (was 600)
Throwing now ticks every world.tick, and properly converts the speed arg from 1ds to what ever tick_lag is.
Throwing now properly accounts for missed ticks.
Throwing no longer uses sleep.
Throwing should no longer lag since it's not filling the sleep queue up

* Smoother tentacles

* Some improvements

* Missed a spot.

* Makes shit quicker.
Inlines the thrownthing.tick() proc.
Raises missed ticks value
Lowers max dist value
Inlines the two sister overrides for /atom/movable/Moved() because that just seemed like a waste

* >PRs open that use procs i'm removing.

* STOP THE PRESSES!

* throw_at now runs the first throw tick() immediately
This will help some with throwing while running.

* Item throwing now imparts the momentum of the user throwing.

(ie, running in the direction you are throwing makes you throw faster, running away from the direction you are throwing makes you throw the item slower)

* Moves throwing momentum from carbon/throw_item to movable/throw_at.
There are other things that cause a mob to "throw" an item, I figured we keep this universal since thrower is already an arg.

* Explosions throw shit faster.
This was stupid, "Hey, lets set the item's throw_speed to 4 so embedding works, but lets make it throw at the base 2 throw speed for no reason."

* Fixes explosion embedding.
This also acts as a nice example of how to override a callback in an override of throw_at properly.
2017-01-02 20:08:03 +11:00