New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes some major sleepers, Refactors maploading to be async (100% lag free) #7659
Closed
Closed
Changes from 47 commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
0d80759
Removes a sleep loop from airlocks
PowerfulBacon 1342094
Starts the ruin generation subsystem
PowerfulBacon 0973c84
Implements the start of the map placer, with extra bugs
PowerfulBacon 8d40725
Fixes the subsystem not working
PowerfulBacon 9cdfff2
Bunch of bug fixes
PowerfulBacon f5f7779
Fixes the parameters getting sent wrong and pre-atom-init loading
PowerfulBacon cbe2633
Fixes the final map loads
PowerfulBacon 22f987e
[TEMP] - Adds in debugging to the MC to track freezes
PowerfulBacon b91071e
Fixes multiple maps being placed at the same time breaking
PowerfulBacon dcc596f
Merge remote-tracking branch 'upstream/master' into Fixes-airlocks
PowerfulBacon 20aca58
Fixes
PowerfulBacon 040e249
Fixes to concurrent shuttle loading
PowerfulBacon 3e7fedf
Merge remote-tracking branch 'upstream/master' into Fixes-airlocks
PowerfulBacon 681ca00
Update stoplag.dm
PowerfulBacon 84a05a5
Fixes the unit tests
PowerfulBacon 5b25b05
Fixes lavaland ruins
PowerfulBacon 95bedeb
Merge remote-tracking branch 'upstream/master' into Fixes-airlocks
PowerfulBacon 40554b5
Merge remote-tracking branch 'upstream/master' into Fixes-airlocks
PowerfulBacon c059ed8
Minor fixes that could break things
PowerfulBacon a0d39a7
Fixes the shuttle loading bug while simultaneously making shuttle cod…
PowerfulBacon 17dd06b
Address arch's reviews
PowerfulBacon 5ae4a8c
Fixes infinite recursion
PowerfulBacon 83f8412
Disables tick overrun debug
PowerfulBacon 1141fe3
Adds in a bunch of error messages so I know whast going on
PowerfulBacon 1eeaa7d
Update shuttles.dm
PowerfulBacon 496aa55
Update shuttles.dm
PowerfulBacon c5db57c
This should fix the shuttle loading issue
PowerfulBacon e824fbc
Removes some logging msesages
PowerfulBacon 2c511c6
Fixes the shuttle loading bug (Mappers who set width and height will …
PowerfulBacon 755ea9c
Adds in a shuttle size unit test
PowerfulBacon dcb9343
Update shuttle_width_height_correctness.dm
PowerfulBacon cf41707
Update shuttle_width_height_correctness.dm
PowerfulBacon 4eaf899
Update shuttle_width_height_correctness.dm
PowerfulBacon de68416
Update shuttle_width_height_correctness.dm
PowerfulBacon 4dc737f
Fucks up the kilo shuttle
PowerfulBacon 30ca478
Fucks up the kilo shuttle
PowerfulBacon c0a80ee
Merge branch 'Fixes-airlocks' of https://github.com/PowerfulBacon/Bee…
PowerfulBacon 1ef6097
Try this
PowerfulBacon 510cfc8
Update shuttle_width_height_correctness.dm
PowerfulBacon 0df6449
Update shuttle_width_height_correctness.dm
PowerfulBacon d4d206e
Update shuttle_width_height_correctness.dm
PowerfulBacon b7eecdb
Deletes the MC warning
PowerfulBacon ae932d8
Fixes the mobile docking port path not accounting for subtypes
PowerfulBacon 315b980
Update shuttle_width_height_correctness.dm
PowerfulBacon 6322ff7
Update shuttle_width_height_correctness.dm
PowerfulBacon 1c788c4
Revert "Fucks up the kilo shuttle"
PowerfulBacon 8310a7c
Fixes the map and the bug
PowerfulBacon dd5e58c
Update _maps/shuttles/arrival/arrival_kilo.dmm
PowerfulBacon e241cfe
Fixes a bunch of messed up shuttles
PowerfulBacon 1e5c7f0
Merge branch 'Fixes-airlocks' of https://github.com/PowerfulBacon/Bee…
PowerfulBacon 24a3bc4
Merge remote-tracking branch 'upstream/master' into Fixes-airlocks
PowerfulBacon b4e60f4
Fixes flandstation
PowerfulBacon 0638ad2
Resets pubby and fland
PowerfulBacon 637cd09
Update FlandStation.dmm
PowerfulBacon aa005bc
PLEASE JUST RESET FLAND TO MASTER
PowerfulBacon 4137da0
Update FlandStation.dmm
PowerfulBacon cb64842
Fixes flandstation
PowerfulBacon 7ce7b43
Fixes fland fully
PowerfulBacon File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
SUBSYSTEM_DEF(map_generator) | ||
name = "Map Generator" | ||
wait = 1 | ||
flags = SS_TICKER | SS_NO_INIT | ||
runlevels = ALL | ||
|
||
/// List of all currently executing generator datums | ||
var/list/executing_generators = list() | ||
|
||
/// Index of current run | ||
var/current_run_index | ||
|
||
/// Length of current run | ||
var/current_run_length | ||
|
||
/datum/controller/subsystem/map_generator/stat_entry() | ||
var/list/things = list() | ||
for(var/datum/map_generator/running_generator as() in executing_generators) | ||
things += "{Ticks: [running_generator.ticks]}" | ||
. = ..("GenCnt:[length(executing_generators)], [things.Join(",")]") | ||
|
||
/datum/controller/subsystem/map_generator/fire() | ||
if (!length(executing_generators)) | ||
return | ||
//Reset the queue | ||
if (current_run_index > current_run_length || !current_run_length) | ||
current_run_index = 1 | ||
current_run_length = length(executing_generators) | ||
//Split the tick | ||
MC_SPLIT_TICK_INIT(current_run_length) | ||
//Start processing | ||
while (current_run_index <= current_run_length) | ||
//Get current action | ||
var/datum/map_generator/currently_running = executing_generators[current_run_index] | ||
current_run_index ++ | ||
//Perform generate action | ||
var/completed = TRUE | ||
while (!currently_running.execute_run()) | ||
// We overused our allocated amount of tick | ||
if(MC_TICK_CHECK) | ||
completed = FALSE | ||
break | ||
//We completed | ||
if (completed) | ||
currently_running.complete() | ||
//Remove the currently running generator | ||
executing_generators -= currently_running | ||
//Decrement the current run nidex | ||
current_run_index -- | ||
//Decrement the current run length | ||
current_run_length -- | ||
//to_chat(world, "<span class='announce'>Fully completed running map generator [current_run_index + 1].</span>") | ||
//Continue to the next process | ||
MC_SPLIT_TICK |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this sleep for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since fire() is tick checked, if it overruns then the proc will cancel. Without the sleep, byond will trigger the fire() again, which will do nothing since the tick check just instantly fails. The sleep allows the game to process to the next tick, so that the MC_TICK_CHECKs inside fire() can run again. Works similarly to the same way the main MC loop works