Commit Graph

700 Commits

Author SHA1 Message Date
oranges
1b29dd9306 Merge pull request #23730 from Cyberboss/patch-13
Moves SSjob initialization to first
2017-02-06 18:25:00 +13:00
Cyberboss
3fc6c07825 Makes addtimer(..., 0) more akin to spawn(0) (#23669)
* Makes addtimer(..., 0) use spawn(0)

* Jess queue it

* No negative times
2017-02-06 10:23:45 +13:00
oranges
c5e27a0525 Merge pull request #23278 from Cyberboss/touchesticker
Fixes roundend lag
2017-02-06 10:21:58 +13:00
Cyberboss
b86e224571 Makes qdeleted and qdestroying macros (#23666)
* Makes qdeleted and qdestroying macros

* Makes QDELETED and QDESTROYING uppercase

* Swap qdel checks istype's for != null's

* Fix it

* How was this missed?
2017-02-06 00:59:27 +13:00
Cyberboss
8899b26ae7 Moves SSjob initialization to first 2017-02-05 00:03:09 -05:00
oranges
d12a6b4aa4 Merge pull request #23561 from Cyberboss/global_roundup
Adds a global var finder. Makes find_references search globals
2017-02-04 16:35:45 +13:00
Cyberboss
7f9bd036b9 Move proc/process definition into appropriate file (#23567) 2017-02-04 16:34:24 +13:00
coiax
9eac586e93 Uses deadsay span in event notification (#23649)
🆑 coiax
tweak: The deadchat notification of randomly triggered events now uses
the deadsay span.
/🆑
2017-02-03 19:42:39 -06:00
Jordie
4a1adbad5f Unifed SQL message system (#23327)
* unifed sql message system to supersede notes, watchlist and memos and adds messages

* a neserseree change
2017-02-03 00:02:24 -06:00
Kyle Spier-Swenson
068eb07473 Fixes freon/ice causing lag (#23493)
* Fixes freon causing lag

Yes, these were stacking. so a turf would have a bunch of "handle wet" timers running on it, every 1.5 seconds, all checking the same shit.

* Fixes unique timers
2017-02-03 10:28:14 +13:00
oranges
4cbf2d0ccd Merge pull request #23577 from ExcessiveUseOfCobblestone/patch-23
Gives [dead] people assurance badmins are not at work.
2017-02-03 00:28:11 +13:00
Cyberboss
f754530201 As usual, I fucked up 2017-01-31 23:54:23 -05:00
Cyberboss
a4d5579f79 Initialize Safety Cleanup (#23274)
* Better `in world` Initialization handling

Remove spawn_atom_to_world and SSobj.atom_spawners

Roll SSobj/setup_template_objects and SSobj/Initialize into new generic proc

* >BYOND

* >var names

* Defines

* Actually remove the spawn_atom_to_world definition

* A note on NOT CALLING THE BASE

* Remove set waitfor = 0

* My comments are cool

* In order to prevent just that...
2017-02-01 15:48:17 +13:00
ExcessiveUseOfCobblestone
bb6d7b96e7 Update events.dm 2017-01-31 18:05:06 -05:00
Cyberboss
bc6c8077fa Makes find_references search globals 2017-01-31 14:35:48 -05:00
oranges
c948d8cf17 Merge pull request #23494 from MrStonedOne/mcfix
Mc refactor to fix timers crashing shit.
2017-01-31 21:37:50 +13: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
MrStonedOne
dbb4623440 Cleans up timer handling. 2017-01-30 03:38:13 -08:00
MrStonedOne
09f5f46481 Fixes the mc treating subsystems that slept in fire() improperly
Originally I wanted to just say that such a thing is unsupported, but since byond can just randomly decide to insert a bunch of sleeps into a loop, I can't make that requirement on subsystems, so its now supported.
2017-01-30 03:38:13 -08: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
5640186371 Merge branch 'master' into touchesticker 2017-01-23 16:46:40 -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
44eb5a40b6 Stops roundend lag 2017-01-23 11:00:47 -05: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