Commit Graph

680 Commits

Author SHA1 Message Date
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
Cyberboss
abee356093 [s]Fixes fake nukes ending the round (#23488)
* Fixes fake nukes ending the round

* Remove uneeded arg

* Update ticker.dm
2017-01-30 09:23:24 +01:00
Cyberboss
2aef76bdce Nuclear bombs now actually detonate (#22586)
* BOOM

* Forgot this check

* Fix remaining objectives

* This is better

* MSO params

* >When you copy paste directly from the comment

* Merge fixes

* Revert "Fix remaining objectives"

This reverts commit b1d1bf40f615019bb57088c24fae8f89c5d2e834.

* Revert "Forgot this check"

This reverts commit cea6ad2381d44a44ef3a93064997454cf7b1ccf5.

* After all that work I did to make objectives work...

* Oh this is important
2017-01-30 09:41:42 +13:00
coiax
608232d288 Soapstones: Leave messages for the future crew (#23176)
* The beginnings of soapstones

* Compilation

* Sprites!

* White text

* Persistence

* More tweaks

* Why isn't it working

* Removes author name

* Random names, more checking for nulls

* VARIABLE MESSAGES

* Fixes icon conflicts

* Limited soapstone uses, purchase more at cargo

* No carving if empty
2017-01-28 17:48:55 +01:00
Cheridan
9f86521ac0 Merge pull request #23350 from AnturK/runtimez
Fixes minor runtimes
2017-01-27 12:36:48 -06:00
coiax
3a1581d34d Adds Sscommunications subsystem (#23171)
* Adds SScommunications subsystem

🆑 coiax
add: Communication consoles now share cooldowns.
/🆑

Sharing cooldowns is good, having a central place to make announcements
is good. This moves some of the machinery for announcements out of the
consoles, which coincides with some plans I have for the communications
machinery of the station anyway.

* Oh yeah, AI's make vox announcements

* Removes priority for non-firing subsystem

* Moves the defines

* Removes dem defines

* Decoded input
2017-01-27 17:51:44 +01:00
Joan Lung
87682f683a Merge pull request #23269 from MrStonedOne/patch-293
Makes the timer subsystem less chinsky at the cost of performance
2017-01-26 20:21:05 -05:00
AnturK
f16c35c6b4 Fixes DNA runtimes. 2017-01-26 11:47:28 +01:00
MrStonedOne
aad8724558 This is better (proper resuming support) 2017-01-24 15:38:48 -08:00
Joan Lung
033bf5a04d Merge pull request #23181 from Cyberboss/patch-14
Speeds up find_references
2017-01-24 10:26:50 -05:00
Joan Lung
2dd7ff2a15 Merge pull request #23140 from Cyberboss/patch-6
Removes world start lag
2017-01-24 10:26:17 -05:00
Cyberboss
ab9f1f0448 It's 2017, time to fuck (some) spawns and cleanbots (#22801)
* Spawn -> addtimer

* Remove this unused proc

* Oh boy, there he goes touching MC again

* Remove spawn in flick_overlay

* Remove spawn in pollCandidates

* flash_color: waitfor = 0

* Don't mess with my grepping, comments

* clear_fullscreen: waitfor = 0

* Why the hell was telekinisis not using the define?

* check_for_cleanbot_bug: waitfor = 1

* Failsafe loop launcher

* assets: waitfor = 0

* Ticker nuke cleanup: addtimer

* ticker post setup: addtimer

* ticker cinematic cleanup: addtimer

* Revert "Why the hell was telekinisis not using the define?"

Handled in #22803

This reverts commit 1da293e687f1811ae69001cb02dfa6f15f451354.

* ticker maprotate: addtimer 0

* beam start: addtimer 0

* browser onclose setup: waitfor = 0

* Revert "check_for_cleanbot_bug: waitfor = 1"

This reverts commit 99e50724b3bc6a3682d042b36f97c906c7f7d96d.

* Finally remove check_for_cleanbot_bug

* browser timeout: addtimer

* deafness symptom: addtimer

* Shedding symptom: addtimer

* Animate doesn't sleep

* MSOs stuff

* > Tfw you committed without saving
2017-01-23 21:06:30 +04:00
Cyberboss
5959ac32cc Refactors atom/Initialize. Fixes ruins being initialized twice (#22778)
* Refactors atom/Initialize

Captialized for compiling correctness and to be more inline with Destroy

Will now be called from atom/New if the world initialization loop in SSobj has already run. Should always call the base.

Now comes with the `roundstart` parameter indicating whether or not it was called by SSobj or atom/New

Other fixes/tweaks:
- Renamed a proc called Initialize in abduction consoles to Setup
- Removed /obj/item/device/radio/headset/headset_sec/department: Broken and referenced literally nowhere in the code
- Removed a spawn from the Initialize of turbine_computer which made literally zero sense
- Generalized the proc which fixes RND servers with no id set

Reasoning: It's better to check roundstart per function than to have to duplicate code in New and Initialize. Think of it as a safer New for atoms. If we move enough stuff to it, initial map load performance will increase due to less New calls

* Fixed a thing

* Actually, fuck the police

* >Expecting a merge without errors

* >Not calling ..() in New

* Sanic

* Fix the headset bug

* Makes sure the map loaders dew it right

* Fixes ruins being initialized twice

* Rename roundstart -> mapload

* Revert "Rename roundstart -> mapload"

This reverts commit 667c327fd2ccfa3ce4f4db52eac03f9e8b0f6812.

* Remove unrelated change

* A more direct solution to map loads

* And now we shouldnt need this warning

* Add the new var to SSobj recovery

* Revert "Revert "Rename roundstart -> mapload""

This reverts commit dee07dbd5e4696554ac43aae5b91cce743b9b9e0.

* Line endings
2017-01-23 09:37:45 +01:00
Kyle Spier-Swenson
9f2374f220 Fix warning 2017-01-23 00:34:50 -08:00
Kyle Spier-Swenson
96aa691d9a Makes the timer subsystem less chinsky at the cost of performance
Making timers run thru qdel will be a cost a pretty fair chunk of resources, and will very likely flood the qdel controller, but it should do for now until i figure out why they randomly decide to stop qdeling.

Also, changes the only thing i think could be an issue causing references to not get cleaned up to be less lean and more forgiving.

I'll revisit this at some point and see if i can't figure this out.
2017-01-22 23:00:39 -08:00
Kyle Spier-Swenson
12570805bd Closes the Pool. (#23150)
* Delete pool.dm

* Removes usage of PoolOrNew

* Wrap up
2017-01-22 16:00:23 -05:00
Kyle Spier-Swenson
32c8e178bf Fixes timers not GCing 2017-01-21 20:00:46 -08:00
Cyberboss
8e661f1488 Speeds up find_references 2017-01-20 15:39:58 -05:00
Cyberboss
841e7f8a92 WHO DID THIS?!?!? (#23143) 2017-01-20 21:22:33 +01:00
Kyle Spier-Swenson
c341178ff4 Fixes bug with addtimer keeping old timers around, makes addtimer even faster. (#23126)
* Fixes timers being left around, Makes addtimer() sanic fast.

This adds a new flag, TIMER_STOPPABLE. Most(80%) of the overhead for addtimer() was in adding the timer to the associated lookup list for deltimer() to use. Moving that functionality to a flag so it wouldn't slow down the 70% of things calling timers puts the final nail in the coffin of byond's sleep/spawn().

spawn: 324 seconds across 5,948,372 calls

addtimer: 67 seconds across 5,953,220 calls

The testing setup for profiling was included in this commit, it will be removed in a later commit. @Fox-McCloud

* Remove profiling procs.

* fix runtime

luckly when this happened, we were about to resume anyways.
2017-01-20 09:31:50 +01:00
Kyle Spier-Swenson
dd113c7775 Window flash all tabbed out clients once the server is ready (#22690)
So that people tabbed out know a new round is starting soon, and so that coders know when the server is ready.
2017-01-19 22:03:23 -05:00
Cyberboss
dffa5b4d1f Makes SSicon_smooth initialization more responsive 2017-01-19 15:34:36 -05:00
Cyberboss
c270b77c9b Makes SSair initialization more responsive 2017-01-19 15:28:30 -05:00
Cyberboss
75d816eeb9 Makes SSlighting initialization more responsive 2017-01-19 14:08:40 -05:00
Joan Lung
fd62481fa0 Merge pull request #22933 from MrStonedOne/addtimerbuckets
Addtimer refactor: Officially faster than byond's internal sleep system
2017-01-18 15:06:23 -05:00
Joan Lung
e55e4db6e6 Merge pull request #23059 from MrStonedOne/patch-287
Fixes afk tracker
2017-01-17 18:42:23 -05:00
MrStonedOne
01e8fc6fbc Fixes timers cleaning up oddly in certain edge cases. 2017-01-17 00:12:29 -08:00
Kyle Spier-Swenson
254bcc97ed Fixes afk tracker
As a bonus, we only track pings while the client is active.
2017-01-16 15:21:52 -08:00
MrStonedOne
c8d4ed5cfd Some more improvements and overhead shaving. 2017-01-16 12:56:48 -08:00
MrStonedOne
15e69deadc Remove a debug line and reword a crash 2017-01-16 12:56:48 -08:00
MrStonedOne
4c55dbe2a6 Fixes bug with IWILLGC qdel hint
This came up in testing, this doesn't set the object in such a way that qdeleted() returns true.
2017-01-16 12:56:48 -08:00
MrStonedOne
3f75fdb42d Addtimer refactor: Officially faster then byond's internal sleep system 2017-01-16 12:56:48 -08:00
Joan Lung
2f74a5afa9 Fixes news reports for certain modes 2017-01-15 16:20:11 -05:00
oranges
a840d1ffe2 Merge pull request #22975 from coiax/fix-15384
Fixes floors flashing red after doomsday stops
2017-01-14 11:57:47 +13:00
oranges
2b7798b601 Merge pull request #22972 from Thunder12345/fireisnotgreenpinkorblack
No more colourful fire
2017-01-14 11:56:32 +13:00
kevinz000
1dee1fa456 Update pai.dm (#22926) 2017-01-13 22:12:01 +01:00
Jack Edge
00a260006c Fixes floors flashing red after doomsday stops
🆑 coiax
bugfix: Blue circuit floors are now restored to their normal colour if
an AI doomsday device is disabled.
/🆑

Put a nuke tracker on SSmapping, because we need a tiny bit of state to
track this, in case you have two concurrent things running.
2017-01-12 15:53:06 +00:00
Thunder12345
5d26de96c6 No more colourful fire 2017-01-12 12:23:44 +00:00
oranges
3a5d4d05fb Merge pull request #22895 from coiax/shuttle-escape-stats
Adds emergency shuttle escapees count to end stats
2017-01-12 13:51:26 +13:00
oranges
a61833c56b Merge pull request #22884 from MrStonedOne/ter13ping
Delays ping tracking upon client connection.
2017-01-11 12:50:58 +13:00
Jack Edge
08b857f016 Adds emergency shuttle escapees count to end stats
🆑 coiax
add: The end of round stats include the number of people who escaped on
the main emergency shuttle.
/🆑
2017-01-10 00:03:54 +00:00
oranges
541c8ad135 Merge pull request #22845 from Core0verload/equipment_fix
Refactor of outfits datums and corpse spawners
2017-01-10 10:10:10 +13:00
MrStonedOne
c8b0a25e18 Delays ping tracking upon client connection. 2017-01-09 09:02:57 -08:00
Kyle Spier-Swenson
e768cf195e Makes lighting more responsive. 2017-01-08 00:28:49 -08:00
c0
0b311121d9 Refactor of outfits datums and corpse spawners 2017-01-08 10:30:31 +03:00
oranges
a0c6052e53 Merge pull request #22726 from coiax/press-start
The Start Now verb sets the round to start immediately
2017-01-07 19:38:15 +13:00
oranges
fcc1b31913 Merge pull request #22531 from MrStonedOne/ter13ping
Adds client ping tracking, courtesy of ter13 of byond forums.
2017-01-05 19:09:02 +13:00
Jack Edge
f0cdd40959 The Start Now sets the round to start immediately
Previously, if you pressed Start Now while the server was still
initialising, it would complain, and you'd have to wait until the lobby
was ready.

Now pressing it will have the server start as soon as able.

Uses: debugging qol.
2017-01-04 13:40:46 +00: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