Commit Graph

82 Commits

Author SHA1 Message Date
Kyle Spier-Swenson fa136e71f4 Revert "Merge pull request #33537 from ninjanomnom/priority-defines" (#34528)
This reverts commit 0244b61886, reversing
changes made to 5d07df08ea.
2018-01-16 20:04:35 -05:00
ninjanomnom a65248928b defines all subsystem priority values 2017-12-15 15:16:31 -05:00
duncathan salt 3b68866b59 removes pipe construction cache (#32516) 2017-11-09 12:13:53 -05:00
ACCount b187ed8ca6 Multiple fixes in RPD and pipe construciton (#32399)
* Multiple fixes in RPD and pipe construciton

* Integrates another fix PR to avoid conflicts
2017-11-08 09:25:16 +13:00
kevinz000 8adcb12079 [READY]Helps address atmospherics nullspace runtimes (#32281)
* Helps fix atmospherics nullspace runtimes, adds debugging to pipe caches and makes the list accessible.

* I can spell properly guys

* Ok ok ok no global!

* Update construction.dm
2017-11-02 22:30:29 -06:00
ShizCalev 74f5a8c904 DisplayTimeText mk2 (#30969)
* Adds new helper, DisplayTimeText

* Removed unused define

Thought it would've been nice to have for the future, but I guess it's
fine to go without it.

* CBB

* Revamp

* Early returns

* More cleanup

* Proc cleanup

* Makes fraction only show if seconds is < 1

* Last cleanup

* Revert

* Corrected incorrect round time.

Dunno how nobody ever caught that it was incorrect on live servers, gg.
2017-09-24 19:58:58 -04:00
ninjanomnom b41d2f6892 adds a bunch of new dcs signals 2017-09-12 05:15:04 -04:00
Jordan Brown 30573dc6f1 Adds defines for world.tick_usage (#30184)
* Add tick_usage define

* Move tick.dm -> _tick.dm

* Add TICK_USAGE_REAL define

* Add comments

* Replace all instances of tick usage with appropriate define
2017-08-30 10:09:24 +12:00
Jordan Brown 6de0cbcde0 Renames Air subsystem to Atmospherics 2017-06-08 20:22:34 -04:00
Cyberboss 1c6bd654b7 Make runlevels bitflags 2017-05-11 10:04:19 -04:00
Cyberboss a0a27219b6 MC Runlevels 2017-05-10 16:05:37 -04:00
coiax 3a577221d0 Adds new debug verb for highlighting roundstart ATs (#26492)
* Adds new debug verb for highlighting roundstart ATs

Debug -> Debug Verbs enable
then
Mapping -> Show roundstart AT markers

Will highlight AT turfs, for easier location and comprehension rather
than looking at the list of coords. List of coords still works fine
though.
2017-04-28 12:58:34 -03:00
Jack Edge a76d4374c1 Moves init_order to defines, moves SSevents above ticker. 2017-04-22 22:08:31 +01:00
Cyberboss 9e1ef0ffe2 Global variable wrappers (#25325)
* Add the system for managed global variables

* Travis ban old globals

* So you CAN inline proccall, that's neat

* Fix that

* master.dm

* Remove the hack procs

* Move InitGlobals to the proper spot

* configuration.dm

* Fix the missing pre-slash

* clockcult.dm

* This is probably for the best

* Doy

* Fix shit

* Rest of the DEFINES tree

* Fix

* Use global. for access

* Update find_references_in_globals

Always hated that proc

Whoever made it must've bee a r e a l idiot...

* __HELPERS tree

* Move global initialization to master.

Fix the declaration

* database.dm

* Dat newline

* I said DECLARATIVE order!

* Here's something you can chew on @Iamgoofball

* game_modes.dm

* Fix this

* genetics.dm

* flavor_misc.dm

* More stuff

* Do it mso's way. Keep the controllers as global

* Make master actually see it

* Fix

* Finish _globalvars/lists

* Finish the rest of the _globalvars tree

* This is weird

* Migrate the controllers

* SLOTH -> GLOB

* Lighting globals

* round_start_time -> ticker

* PAI card list -> pai SS

* record_id_num -> static

* Diseases list -> SSdisease

* More disease globals to the SS

* More disease stuff

* Emote list

* Better and better

* Bluh

* So much stuff

* Ahh

* Wires

* dview

* station_areas

* Teleportlocs

* blood_splatter_icons

* Stuff and such

* More stuff

* RAD IO

* More stuff and such

* Blob shit

* Changeling stuff

* Add "Balance" to changelogs

* Balance for changelog compiler + Auto Tagging

* Update the PR template

* hivemind_bank

* Bip

* sacrificed

* Good shit

* Better define

* More cult shit

* Devil shit

* Gang shit

* > borers

Fix shit

* Rename the define

* Nuke

* Objectives

* Sandbox

* Multiverse sword

* Announce systems

* Stuff and such

* TC con

* Airlock

* doppllllerrrrrr

* holopads

* Shut up byond you inconsistent fuck

* Sneaky fuck

* Burp

* Bip

* Fixnshit

* Port without regard

* askdlfjs;

* asdfjasoidojfi

* Protected globals and more

* SO MANY

* ajsimkvahsaoisd

* akfdsiaopwimfeoiwafaw

* gsdfigjosidjfgiosdg

* AHHHHHHHHHHHHHHHHHHHHHHH!!!!!

* facerolll

* ASDFASDFASDF

* Removes the unused parts of dmm_suite

* WIP

* Fix quote

* asdfjauwfnkjs

* afwlunhskjfda

* asfjlaiwuefhaf

* SO CLOSE

* wwwweeeeeewwwww

* agdgmoewranwg

* HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!?

* Fix syntax errors

* 100 errors

* Another 100

* So many...

* Ugh

* More shit

* kilme

* Stuuuuuufffff

* ajrgmrlshio;djfa;sdkl

* jkbhkhjbmjvjmh

* soi soi soi

* butt

* TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING

* lllllllllllllllllllllllllllllllllllllllllll

* afsdijfiawhnflnjhnwsdfs

* yugykihlugk,kj

* time to go

* STUFFF!!!

* AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!

* ngoaijdjlfkamsdlkf

* Break time

* aufjsdklfalsjfi

* CONTROL KAY AND PRAY

* IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

* Goteem

* Fix testing mode

* This does not belong in this PR

* Convert it to a controller

* Eh, fuck this option

* Revert controllerization Ill do it some other time

* Fix

* Working controllerization

* FOR THE LOVE OF CHRIST PROTECT THE LOGS

* Protect admins and deadmins

* Use the inbuilt proc
2017-04-06 23:26:13 -06:00
duncathan d63eddd2ea debug improvements 2017-04-03 19:59:25 -06:00
Cyberboss 5646c736c8 Merge upstream 2017-03-30 19:18:59 -04:00
Cyberboss a8eefff531 Active turf visualization (#25594) 2017-03-30 08:39:10 -03:00
Cyberboss fb596bcdb3 _DEF 2017-03-22 14:52:21 -04:00
Cyberboss 7e14ec75fc Normalizes subsystem definitions 2017-03-22 11:50:46 -04:00
Lzimann 5a618297ce Replaces the default output with the to_chat wrapper. 2017-03-10 01:32:05 -03:00
Cyberboss 31ee152489 Repaths subsystem to controller/subsystem (#24624)
* Repaths subsystem to controller/subsystem

* Fix the shit
2017-03-08 22:05:45 +01:00
Cyberboss 3ad9be1555 Subsystems are now ordered by name in MC tab 2017-03-02 14:45:40 -05:00
Cyberboss 1365ab99d8 Merges map templates and map loader (#24140)
* Reorganize the mapping code

* Finish this up

* Reee line endings

* FUCKING LINE ENDINGS

* LINARU ENDARU

* >PLS SET REPO LINE ENDINGS

* Comments

* Hoisted by my own travis.yml changes
2017-02-19 16:55:02 +13:00
Kyle Spier-Swenson e7bdde3398 Fixes my fuck up generating runtimes 2017-02-11 10:32:50 -08:00
Kyle Spier-Swenson e4d0828ab8 adds a turf per ms counter to air's stat page (#23890)
* adds a turf per ms counter to air's stat page

I'd use the turf cost var but its broken and i don't want to take the time to fix that because it would involve a macro trick to make properly timing shit much easier on subsystems and then applying this to every subsystem.

* Update air.dm
2017-02-11 15:26:37 +13:00
Cyberboss 8e1351a06f Faster, non-blocking world init (#23136)
* Moves turf New calls to Initialize

* Much faster

* Fixed

* Makes add_to_active queue up before SSair is initialized

* Remove active queuing

* And the proc

* Move the check

* Fix some shit

* F U C K T U R F S

* Necessary

* Unnecessary

* SHUT THE FUCK UP

* Panic mode hurts the code

* Such a

* Simple answer

* A well thought out plan

* /turf/open optimization

* Undo the warning suppression now that it's fixed

* Fixes lava typecaching badly

* Added late initialization

* Make the atmos offenders late initialize

* Add extra logging

* GLABALS

* Better solution for trying to activate w/o air

* Further base calling copypasta

* Gates, guards, gorans

* Small doc fix

* Do the faster

* T U R F   V A R   P E R S I S T E N C E

* The solution is always so simple

* The (hopefully) final nail in the coffin
2017-02-10 16:53:08 +13: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 c270b77c9b Makes SSair initialization more responsive 2017-01-19 15:28:30 -05:00
Cyberboss 738aac44e3 Fixes the null excited_group runtime (#22379)
* Fixes the null excited_group runtime

* Milk those cycles

* >Checking for existing vars before making new ones
2016-12-23 09:39:19 +13:00
Kyle Spier-Swenson 235b79fb5a StonedMC, the bastard love child of GoonPS and CarnMC (#17987)
Basically, they key difference between StonedMC and CarnMC is that when multiple ticks want to run at the same byond tick, we divvy up the tick between the subsystems, rather then allow one subsystem to hog it all.

The key difference between StonedMC and GoonPS is that we allow the subsystems to tell us how to divvy up the tick using flags and priority.

The new SS_ flags allows us to select behaviors that used to be piggybacked as side effects of dynamic wait or default but sometimes unneeded behavior.

Dynamic wait is 100% gone, lower priority and SS_BACKGROUND are better more refined ways of doing this when combined with MC_TICK_CHECK

I have by design never looked at the inners of goonPS, so this is all original code but I know it uses two loops because of comments by goon devs on reddit threads, that design didn't make sense before, but when I can tell a SS how much of a byond tick it is allowed to have, knowing how many need to run this tick is helpful I also know a bit more about how it works from piecing together comments in #vgstation.

Detailed list of changes:

Subsystems now have flags, allowing fine grain control over things like rather or not it processes, inits, rather it's wait is how long between runs (post run timing) or how long between starts, and rather or not late fires should cause the next fire to be earlier.

Mc now has two loops One loop handles queuing shit, one loop handles running shit.

MC now splits up tick allotment rather than first come first serve Subsystems can even request a bigger share using higher priorities. (It will even resume subsystems it paused if other subsystems hadn't used as much as it predicted they might need)

Default fps is now 20 This is related enough to the MC and it's a change that's really long since over due

All code oddities are most likely to be necessities to lower overhead on the mc since it runs every tick
2016-06-16 18:01:16 +12:00
phil235 b2a04afd39 Fixes the air subsystem initialization. 2016-04-27 19:28:13 +02:00
Shadowlight213 b23d676995 Fixes sloth ruin atmos runtime. 2016-04-25 10:54:45 -07:00
MrStonedOne 546148cb33 Makes atmos init much much much much much faster. 2016-04-06 04:25:04 -07:00
Kyle Spier-Swenson 358c5fe0b4 Fixes ssair locking up the server while it initialized 2016-04-05 08:51:34 -07:00
MrStonedOne e514eb0f36 fixes some bugs with excited groups and ssair under duncmos 2016-04-04 14:22:41 -07:00
MrStonedOne 363f848bc8 Tweaks atmos: excited groups and ssair
Excited groups will be much more aggressive about averaging out their turfs when air movement within has slowed down.
Excited groups will be less aggressive about sleeping simi-idle turfs to prevent deadlocking
Sleeping thresholds lowered.
SSair will now tick_check all loops, not just active turf processing.
2016-04-04 14:22:40 -07:00
duncathan 700bd10678 fixes plasma hanging out in space; removes debug messages 2016-04-04 00:32:40 -06:00
duncathan 7751f41d25 fixes compilation warnings; speeds up roundstart init a bit 2016-04-03 22:59:28 -06:00
duncathan a2a554c48a Merge branch 'master' of https://github.com/tgstation/-tg-station into turfs
Conflicts:
	code/game/objects/explosion.dm
	code/game/objects/items/stacks/sheets/mineral.dm
	code/game/objects/structures/girders.dm
	code/game/objects/structures/grille.dm
	code/game/turfs/turf.dm
	code/modules/events/spacevine.dm
	code/modules/events/wormholes.dm
	code/modules/mining/mine_items.dm
	code/modules/mob/living/silicon/robot/robot.dm
2016-04-03 18:22:20 -06:00
duncathan 3525bcfcbb fixes huge roundstart bugs 2016-03-30 16:07:35 -06:00
duncathan e86cf0f280 praise the good lord, for the game finally compiles 2016-03-29 19:04:37 -06:00
duncathan 3f1375ba39 Merge branch 'master' of https://github.com/tgstation/-tg-station into turfs
Conflicts:
	_maps/RandomZLevels/Cabin.dmm
	_maps/RandomZLevels/beach2.dmm
	_maps/RandomZLevels/caves.dmm
	_maps/RandomZLevels/research.dmm
	_maps/RandomZLevels/snowdin.dmm
	_maps/RandomZLevels/undergroundoutpost45.dmm
	_maps/map_files/DreamStation/dreamstation04.dmm
	_maps/map_files/EfficiencyStation/EfficiencyStation.dmm
	_maps/map_files/MetaStation/MetaStation.v41I.dmm
	_maps/map_files/MiniStation/MiniStation.dmm
	_maps/map_files/TgStation/tgstation.2.1.3.dmm
	_maps/map_files/generic/z4.dmm
	_maps/templates/lavaland_surface_automated_trade_outpost.dmm
	_maps/templates/lavaland_surface_biodome_winter.dmm
	_maps/templates/lavaland_surface_prisoner_crash.dmm
	_maps/templates/lavaland_surface_seed_vault.dmm
	code/controllers/subsystem/air.dm
	code/game/asteroid.dm
	code/game/atoms.dm
	code/game/gamemodes/nuclear/nuclearbomb.dm
	code/game/machinery/computer/arcade.dm
	code/game/objects/effects/aliens.dm
	code/game/objects/effects/overlays.dm
	code/game/objects/items/apc_frame.dm
	code/game/objects/structures/false_walls.dm
	code/game/objects/structures/girders.dm
	code/game/turfs/simulated.dm
	code/game/turfs/simulated/floor/fancy_floor.dm
	code/game/turfs/simulated/floor/mineral_floor.dm
	code/game/turfs/simulated/floor/plating.dm
	code/game/turfs/simulated/river.dm
	code/game/turfs/simulated/walls_misc.dm
	code/game/turfs/simulated/walls_reinforced.dm
	code/modules/admin/verbs/buildmode.dm
	code/modules/atmospherics/environmental/LINDA_turf_tile.dm
	code/modules/events/spacevine.dm
	code/modules/flufftext/Hallucination.dm
	code/modules/holodeck/turfs.dm
	code/modules/mining/mine_items.dm
	code/modules/mining/mine_turfs.dm
	code/modules/mob/interactive.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/mob/living/living.dm
	code/modules/mob/living/simple_animal/bot/floorbot.dm
	code/modules/mob/living/simple_animal/guardian/guardian.dm
	code/modules/mob/living/simple_animal/hostile/hostile.dm
	code/modules/mob/mob_movement.dm
	code/modules/power/singularity/narsie.dm
	code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
	code/modules/research/server.dm
2016-03-29 14:46:06 -06:00
duncathan b9950c4358 turf/open and turf/closed 2016-03-29 13:38:56 -06:00
Kyle Spier-Swenson 94dbb51347 Removing from active needs to happen before excited group garbage collection 2016-03-20 03:40:49 -07:00
Kyle Spier-Swenson f81ec7fc44 remove_from_active now handles unsimulated turfs properly 2016-03-20 03:27:37 -07:00
MrStonedOne bc8ff11f3f Lag check on initialization (and on a missed del-all proc) 2016-03-15 03:39:43 -07:00
MrStonedOne 09fb8c2b10 Explosions and singulo use spiral range (and other changes) 2016-03-15 03:39:41 -07:00
MrStonedOne 093668a445 fixes deadlocking 2016-03-15 03:39:40 -07:00
MrStonedOne 2887dc7ce0 Removes lag.
This setup allows subsystems to pause themselves until next mc fire if they are about to go over a tick, and resume on the next mc tick
It also makes it so we prioritize running subsystems we skipped because there wasn't enough time in the current tick to run them based on their avg tick usage. (as well as subsystems paused mid way thru)

Adds a macro for adding this to non-mc procs. just drop it in the loop. There is a define version as well for if checks if you want to know if you just slept to avoid lag.

This is all inside #if DM_VERSION defines, so once i test that 509 still works to compile/test this should be good to merge
2016-03-15 03:39:39 -07:00
duncathan 5bf31463da removes simulated turfs; adds space gas mixture for space 2016-03-10 17:27:01 -06:00