Commit Graph

11 Commits

Author SHA1 Message Date
Aryn
ca7d4026b8 Lighting system is too buggy to continue until I know wtf is going on 2014-02-24 05:58:09 -07:00
Mloc
d8683f2d39 Revert "Merge pull request #3965 from jack-fractal/dev"
This reverts commit fa57b76f25, reversing
changes made to 40ee2278ed.

Signed-off-by: Mloc <colmohici@gmail.com>
2013-11-25 11:59:57 +00:00
jack-fractal
ce18d47778 Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into dev
Conflicts:
	baystation12.int
	code/controllers/verbs.dm
2013-11-23 11:58:50 -05:00
DJSnapshot
983ca2d5e3 Fix for reported issue with the transfer_controller causing a runtime error. Also included is a debug controller for the transfer_controller 2013-11-21 17:44:31 -08:00
jack-fractal
c6ec432904 - major update to all systems
- creating the mask entity
- modifying the code for cult icons
- updating the camera net
- adding visibility network updates to all mobs
- unifying the culting and deculting process
- adding "Make Mask" function to Player Panel
2013-11-17 16:23:36 -05:00
jack-fractal
6764c54989 making a generic version of the AI's visibility code so that it can be reused by the Cult Spirits 2013-10-26 16:52:14 -04:00
elly1989@rocketmail.com
a10f6e0ec2 Added a switch inside client/Topic which can direct the topic call to a few frequently used destinations.
Before, when making a link to an admin tool, you done this:
<a href='?src=\ref[C.holder];parameter=1;>link</a>

Now, we do not need to use a reference to direct it to places like usr or usr.client.holder (or client, but you never needed src for that anyway)
usr: <a href='?_src_=usr;parameter=1;>link</a>
holder: <a href='?_src_=holder;parameter=1;>link</a>

This basically allows us to move a LOT of code outside of loops as we no longer have to create a \ref for every recipient of the message. They can all be sent identical links. A simple example of this would be in pray.dm Although it's most noticeable in the adminhelp code which is vastly simplified.

Adminhelp name spotting code thingy...whatever... looks for ckey matches first, then surnames, then forenames. This is to stop it possibly weirding out if there is a station full of "Ed"s of "Sarah"s

Prayer code no longer loads a new icon into memory every time a prayer is sent. Use image() not icon()!

key_name() no longer needs a reference for it's admin_link argument.

message_admin() pretty much doesn't need those extra arguments for finding and replacing %holder_ref%. I've got to go through all the code to check before I remove it though.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5105 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-18 08:27:11 +00:00
giacomand@gmail.com
3dd4f8cbc5 -Optimized freelooking a bit.
-Larva can now die, instead of staying in critical.
-Improved the prison break event.
-Added the cameranet to the list of debuggable controllers (I know it's not technically a controller but it seems like the best place to be).

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4858 316c924e-a436-60f5-8080-3fe189b3f50e
2012-10-13 19:52:41 +00:00
elly1989@rocketmail.com
9f1362c68d Failsafe added to the debug/restart controller verbs.dm
Failsafe now checks the lighting_controller too. It will restart it if it doesn't progress for 5 cycles (same as MC)
datum/failsafe is now datum/controller/failsafe

The probability of lights breaking after spawn was reduced from tube:10 and bulb:25 to tube:2 bulb:5

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4674 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-10 12:53:55 +00:00
elly1989@rocketmail.com
e97813d2b6 Replaced the master_controller with the WIP sequential version.
Fixed a problem where TG was using this sequential master_controller but I had removed a spawn where master_controller.process() was called because I was working with the default master_controller. This problem was causing the master_controller to prevent the lighting_controller.process() ever running properly because it was hogging the current thread (thread isn't the right word there, not sure what you call it....stack?)

Added debugging to both the lighting_controller and master_controller. http://filesmelt.com/dl/debugging.png

Both lighting_controller and master_controller may be deleted to terminate their processes (this is done via the restart controller verb. This allows for clean restarts without 'doubling up' (where, for instance, the master_controller would be running more than one instance).

lighting_controller has a prototype recovery proc which is called by the "restart controller - lighting" verb. It's basically an overly paranoid version of process() which will only transfer light_sources to the replacement controller if they don't runtime. It's not needed at the moment as the process() has yet to runtime.

master_controller has the beginnings of self pruning lists. This method using list.Cut(index,index+1) is faster than doing list.Remove(thing) all over the place (the latter iterates through the list to find the thing).

Added more detailed time-measurements for the master_controller. It now displays the processing costs (in real-world seconds) of each part of the master_controller's cycle.

The stat panel only updates for mobs actually -looking- at the stat panel.

Explosion debugging is now hidden behind a if(Debug2). To have it print that data to world.log just click the DebugGame verb

debug controller and restart controller verbs are now both GameAdmin rank. Not sure how they got split up.

Fixed another cause of dark splotchy space turfs. (turf/wall/ex_act was replacing the turf with space and then deleting that new space turf)


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4593 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-31 04:14:26 +00:00
elly1989@rocketmail.com
6e274cd395 New lighting, it's essentially just the old DAL system with a queue.
Comments for lighting:
	Like sd_DAL (what we used to use), it changes the shading overlays of areas by splitting each type of area into sub-areas
	by using the var/tag variable and moving turfs into the contents list of the correct sub-area.

	Unlike sd_DAL however it uses a queueing system. Everytime we  call a change to opacity or luminosity
	(through SetOpacity() or SetLuminosity()) we are  simply updating variables and scheduling certain lights/turfs for an
	update. Actual updates are handled periodically by the lighting_controller. This carries additional overheads, however it
	means that each thing is changed only once per lighting_controller.processing_interval ticks. Allowing for greater control
	over how much priority we'd like lighting updates to have. It also makes it possible for us to simply delay updates by
	setting lighting_controller.processing = 0 at say, the start of a large explosion, waiting for it to finish, and then
	turning it back on with lighting_controller.processing = 1.

	Unlike our old system there is a hardcoded maximum luminosity. This is to discourage coders using large luminosity values
	for dynamic lighting, as the cost of lighting grows rapidly at large luminosity levels (especially when changing opacity
	at runtime)

	Also, in order for the queueing system to work, each light remembers the effect it casts on each turf. This is going to
	have larger memory requirements than our previous system but hopefully it's worth the hassle for the greater control we
	gain. Besides, there are far far worse uses of needless lists in the game, it'd be worth pruning some of them to offset
	costs.

	Known Issues/TODO:
		admin-spawned turfs will have broken lumcounts. Not willing to fix it at this moment
		mob luminosity will be lower than expected when one of multiple light sources is dropped after exceeding the maximum luminosity
		Shuttles still do not have support for dynamic lighting (I hope to fix this at some point)
		No directional lighting support. Fairly easy to add this and the code is ready.
		When opening airlocks etc, lighting does not always update to account for the change in opacity.

Explosions now cause lighting to cease processing temporarily.

Moved controller datums to the code/controllers directory. I plan on standardising them.
"Master","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply Shuttle","Emergency Shuttle","Configuration","pAI" controller datums can be accessed via the debug controller verb (used to be the debug master controller verb)
Supply shuttle now uses a controller datum. Shuttles tend to arrive up to 30 seconds late, this is not a bug.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4537 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-25 16:06:57 +00:00