Commit Graph

32 Commits

Author SHA1 Message Date
Kyle Spier-Swenson 514446d6ee Scale down dynamic wait on atmos now that the lag bug is fixed 2016-02-17 16:31:17 -08:00
MrStonedOne a2ae265064 Brings the rest of atmos into the new turf list system (and some more speed ups for process_cell()) 2016-02-14 00:07:43 -08:00
Bjorn Neergaard 159ca02294 Find and replace strikes again 2016-02-06 04:05:03 -06:00
AnturK 1cbb8137d9 Moves initialize from /atom/movable to /atom
Bit cleaner powernet/pipes initialization in templates
2016-01-30 14:34:34 +01:00
duncathan 8392974ad0 fixes associative list; adds gas_overlay to "datum gases" 2015-12-29 22:50:09 -06:00
duncathan 12eeef552b small fixes 2015-12-27 20:13:44 -06:00
duncathan bf6a7b6741 updates gas_mixture.dm
the list is now used everywhere
updates logic of certain procs to reduce copypaste
no compile errors remain in this file
2015-12-27 17:58:50 -06:00
Kyle Spier-Swenson 27ec045c86 atmos dynamic wait tweaks 2015-12-20 11:35:20 -08:00
Bjorn Neergaard 531e4b947f Subsystem display tweaks 2015-12-05 10:13:59 -06:00
Aranclanos 6b8ab6641a Replaces the Cut() usage in the processing lists from the different controllers for a Remove() 2015-08-18 06:52:57 -03:00
MrStonedOne be886418b4 Minor fixes to air
It was initializing turfs after atmos machinery but some of those machines expect turfs to be initialized before they initialize.

Also fixes it clearing all active turfs and not just the one in the specified zlevel in turf initialization.
2015-07-27 16:10:11 -07:00
MrStonedOne dde57d8267 Fixes objs that block air breaking atmos when spawned in a non-blocking state
This included any door that started open (firedoors being the main example)
Fixes #10828
2015-07-25 23:16:23 -07:00
MrStonedOne 4e971a7e57 Moves build_network to air's initialize, Removes initialize() from atmos machinery 2015-07-25 23:08:02 -07:00
MrStonedOne d38cfcb4ec Removes MC's after init proc
It was only used for air, we can just move air to init last with priority = -1 (this is what this is for)
2015-07-25 23:04:49 -07:00
Owen Jacobson 3e133b610b Make rooms exposed to space more space-y by setting up atmos consistently.
Space-exposed turfs are now at a steady state at roundstart, and fully in vacuum. Bring internals and a hardsuit.
2015-07-23 23:36:50 -04:00
bear1ake c37813e301 Merge https://github.com/tgstation/-tg-station into at_list
Conflicts:
	config/admins.txt
2015-07-20 23:24:56 +09:00
Carl Ivanov 104f300952 remove file, take 2
remove file path from warning message
2015-07-19 22:36:30 +09:00
Carl Ivanov ec3c91c54b remove file
Aranclanos' request
2015-07-19 22:29:01 +09:00
Carl Ivanov 67d8f3c6a6 Don't spam file with coordinates
and save them to global list
2015-07-18 20:17:48 +09:00
Carl Ivanov 152562a33e AT list to textfile 2015-07-18 00:12:26 +09:00
MrStonedOne 2f255406ac Gives the large portable scrubber 3x3 scurbbing power
Also fixes portable scrubbers a bit

Conflicts:
	code/ATMOSPHERICS/components/unary_devices/vent_scrubber.dm
2015-07-16 20:13:02 -07:00
Firecage 4688c2c969 Fixes proc arguments 2015-07-15 23:52:35 +02:00
MrStonedOne 2f9b4cd3f2 Removes gas mixture graphic overlay code, Moves all of that to turfs.
(also fixes conflicts)

Conflicts:
	code/LINDA/LINDA_turf_tile.dm
2015-07-15 00:44:01 -07:00
MrStonedOne 08b9f6c8c6 More Dynamic wait tweaks.
I forgot a step in the algo and made it so it was decreasing in its slowdown effect with more lag, not increasing.

I've also made the -1.5 magic number in the algo configurable. its was a simple buffer of cost the subsystem is allowed to use that isn't counted against it in dwait.
2015-07-10 23:25:34 -07:00
Razharas 6d0c3840ab Merge pull request #9882 from MrStonedOne/mctweaks
Tweaks MC's dynamic rate system a bit. Lowers lag from singulo getting released.
2015-06-13 04:37:00 +03:00
Razharas f15baf895c Merge pull request #9896 from Aranclanos/subsystemAfterInitialize
Fixes the 3k active turfs at roundstart
2015-06-13 04:36:00 +03:00
Aranclanos 109aa5a715 Adds AfterInitialize() to the subsystem datums, it will be called once all Initialize() calls finish. Currently only atmos uses it to set up the turfs.
Before I had the luxury to initialize atmos last, by just ordering the calls, but now that they are on a list it's not viable
2015-06-11 03:48:32 -03:00
Aranclanos d448e0af66 Added a warning for having active turfs at roundstart 2015-06-10 15:44:14 -03:00
MrStonedOne 14b258c655 Tweaks MC's dynamic rate system a bit
The MC will now track the total cost of all subsytems (normalized out to a per second cost number so that subsystems that only run every 10 minutes but are costly (looking at you server tasks) aren't accounting for 90% of the number when they shouldn't.)

This is now used in the dynamic wait subsystems to ensure they slow down when other things are being lagging

This mainly means that air won't lag things if the singulo gets free.

I also tweaked the scaling curve used by the dynamic wait system so that it scales less during slight lag, but much more during higher lag times.

I added qdel to the dynamic wait subsystem with a really high scale. This didn't make sense before, because it limits its run time, but now it can scale back how often it runs when the other subsystems are being laggy. I also lowered qdel's max runtime from 2ds to 1ds, because deletes take 0.9 ds on avg, so it would end up running for 2.9ds often.

This should prevent air+singulo+qdel causing excessive amounts of lag.
2015-06-10 05:04:56 -07:00
MrStonedOne 94a132dbde pr-9231 changelog and minor subsystem tweaks 2015-05-01 05:24:33 -07:00
MrStonedOne bd6d51a0b5 Massive MC and subsystem rewrite
MC:
	No longer tracks a subsystem's cpu usage. This was basically worthless and took up space on the stat panel
	Can calculate wait down to a tenth of a decisecond to make it fps/world.ticklag agnostic
	Now allows subsystems to have a dynamic wait, that is based on a ratio of how long that subsystem has been taking to process(cost). (This system allows for upper and lower bounds, and an changeable cost delta for each subsystem)
	MC can now be told to init a zlevel

All Subsystems:
	Stats panel now allows child subsystems to pass it a message to add to its stats entry. All subsystems have been moved over to this system - This should cut down on subsystems having to copy and paste the stats proc in order to add to it
	All subsystems now properlly handle being given a zlevel in their init proc

Subsystem changes:
	Air:
		Added air to the dynamic wait subsystem. upper bound: 50, lower bound: 5, cost delta: 3 times process cost
		Air now fires 4 times faster when it can do so without lagging things up
		Pipenet has been merged into air
		Atmos machinery now processes with process_atmos(), ticked by air, not machinery.
		Hotspots (the fire object) are now object pooled
	Pipenet:
		Deleted, added to air
	Machinery:
		Moved all atmos calcualtions in all objects's process() to process_atmos().
	Lighting:
		Added Lighting to the dynamic wait subsystem. upper bound: 20, lower bound: 5, cost delta: 3 times process cost
	Ticker:
		Fixed ticker not updating the lobby panel when game start delayed
		Fixed the game start timer updating rapidly from queued fires when game start delay is removed
	Garbage/qdel:
		qdel will now limit its process time to 2ds a fire.
		qdel can now be given hints as a return to Destroy() as to what should be done with the object.
		the options are:
			queue: (default) this is the normal behavior.
			letmelive: old default to non-null/zero. does nothing with the object
			iwillgc: functionally the same as above, mainly to let people working with objects know that the object will not be queued for GC checking
			harddel: this will queue the object to be deleted without storing a soft reference, mainly to save locate() processing time.
			harddel_now: this will del() the object. To allow for a clean removal of every del() not in qdel
		All objects have been updated to the new system, harddel and iwillgc was not added to any new objects.
		Fixed some objects not GCing because they didn't properlly clear references in Destory()
		Fixed some objects getting qdel'ed preventing other objects from getting GCed because they did not null their reference to that object.
2015-04-29 02:00:25 -07:00
carnie a029a49392 SubSystem rewrite
Misc:

+Fixes unreported issue with initializing lighting on a specific zlevel

+Fixes two similar issues with moveElement and moveRange. Where fromIndex or toIndex could be adjusted incorrectly in certain conditions. Potentially causing bad-sorts, or out of bound errors.

+Rewrites listclearnulls(list/L) to no longer iterate through L.len elements for every null in the list (plus 1). i.e. went from L.len*(number_of_nulls+1) list-element reads (best-case), to L.len list-element reads (worst-case)

+New proc/getElementByVar(list/L, varname, value) which finds the first datum in a list, with a variable named varname, which equals value. You can also feed it atoms instead of lists due to the way the in operator functions.

+Fixes an unreported issue with Yota's list2text rewrite. Under certain conditions, the first element would not be converted into a string. Causing type-mismatch runtimes.

+New global map_ready variable. This is not fully implemented yet, but will be used to avoid duplicate calls to initialize() for map objects.

+All turfs now maintain references to all lights currently illuminating them. This will mean higher memory use unfortunately, due to the huge number of turfs. However, it will speed up updateAffectingLights significantly. I've used list husbandry to reduce baseline memory usage, so it shouldn't be any worse than some past atmos modifications memory-wise.

-Removed 'quadratic lighting', can add this back at some point. Sorry.

+modified the way lum() works slightly, to allow turfs to have overridden delta-lumen. i.e. space cannot be illuminated more than its default ambiance. This allowed removal of some iffy special-snowflake lighting areas implemented by somebody else.

+Lighting images in the dmi can now use arbitrary naming schemes. It is reliant on order now. This allows the dmi to be replaced by simply dropping in a new dmi.

-Removed all subtypes of /area/shuttle. Shuttles now create duplicate 'rooms' of /area/shuttle. (More on this later). This will conflict with most maps. Guide on how to fix to follow.

+All verbs/tools relating to world.tick_lag were refactored to use world.fps. However old config text for setting tick_lag will still work (it converts the value to fps for you)

+MC stats improved using smoothing. They now have their own tab so they dont get in the way when you're playing as an admin.

-removed the push_mob_back stuff due to conflicting changes. Sorry Giacom.

_OK, NOW THE ACTUAL INTERESTING STUFF_

Following systems moved over to subsystem datums:
air_master
garbage_manager
lighting_controller
process_mobs (aka Life())
nanomanager
power
sun
pipenets
AFK kick loops
shuttle_controller (aka emergency shuttle/pods), supply_shuttle and other shuttles
voting
bots
radio
diseases
events
jobs
objects
ticker

Subsystems hooks and variables should be commented fairly in-depth. If anything isn't particularly clear, please make an issue.

Many system-specific global variables have been refactored into

All tickers which previously used world.timeofday now use world.time

some subsystems can iterate before round start. this resolves the issue with votes not working pregame
2014-12-31 13:25:41 +00:00