Commit Graph

257 Commits

Author SHA1 Message Date
Cael_Aislinn
c4bd191222 Merge remote-tracking branch 'remotes/git-svn' into bs12_with_tgport (r4618)
Conflicts:
	baystation12.dme
	code/controllers/master_controller.dm
	code/defines/obj.dm
	code/game/gamemodes/events.dm
	code/game/machinery/newscaster.dm
	code/game/objects/items/blueprints.dm
	code/game/objects/items/stacks/sheets/sheet_types.dm
	code/game/objects/items/stacks/stack.dm
	code/game/objects/structures/stool_bed_chair_nest/bed.dm
	code/game/turfs/turf.dm
	code/modules/awaymissions/zlevel.dm
	code/modules/maps/fromdmp.dm
	code/modules/mob/living/silicon/ai/freelook/eye.dm
	code/modules/mob/living/silicon/ai/freelook/update_triggers.dm
	code/modules/mob/living/silicon/silicon.dm
	code/modules/mob/living/simple_animal/life.dm
	code/modules/mob/mob_movement.dm
	code/setup.dm
	icons/mob/uniform.dmi
	icons/obj/closet.dmi
	icons/obj/clothing/uniforms.dmi
	maps/RandomZLevels/assistantChamber.dmm
	maps/RandomZLevels/fileList.txt
	maps/tgstation.2.0.9.dmm

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
2012-09-04 22:19:03 +10:00
elly1989@rocketmail.com
73e5c38a56 Preparations for reducing the number of processing machines at round-start. There are currently 8000 or so at round start, this was already pruned to 2800ish by doohl's stuff.
machine.process() now uses a return value to remove itself from the processing machines list. This is more efficient and will help reduce costs especially at round start where some 5000+ machines were removed from the list using first-find. Now there is no searching involved. Instead of machines.Remove(src) just do .=PROCESS_KILL that will return the flag to the proc which called it (the MC) and trigger its removal from the list. If you're deleting something don't even bother removing it from the machines list, there is no need to.

Simplified the last_processed stuff for the MC. It's now a single variable rather than 3. It is simply a typepath rather than a reference to an object (this is so it works even if said object is deleted)

MC stats in admin status_panels now show the length of the processing lists (indicated by #). I've just realised I forgot to mention what the abbreviations are:
The less obvious ones are: Dis=diseases; Net=pipes; Pnet=powernets; Mch=Machines; Tick=the game-mode ticker.

Beach-water now uses an overlay image rather than a separate object.

Fixed a typo in the shuttle console.

Hydroponics trays no longer use first-find within their process() for checking the plant is in the tray (why is that even there anyway? talk about lazy)

Removed some junk/placeholder procs like organ/proc/process() return

Removed newscasters from the processing machines lists.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4603 316c924e-a436-60f5-8080-3fe189b3f50e
2012-09-02 20:32:01 +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
johnsonmt88@gmail.com
024c16df00 Added movement speed config options.
Basically these numbers get added directly to movement values.

run_delay and walk_delay affect all mob's walk/run speeds before their mob-specific modifiers take effect. Make this number higher to slow things down, make it lower to speed things up.

human_delay, robot_delay, monkey_delay, alien_delay, metroid_delay and animal_delay will affect those mobs specifically. So if you'd like humans to slow down but you don't want robots to suffer, just raise the value of human_delay! Same as before, raise the number to slow things down, lower it to speed it up.

Note: most mobs already run as fast as byond will let them.

Although these are config options. It is possible to adjust these values in-game. The values will reset at the end of the round however.
To adjust the values in-game you must be a high enough level admin to have access to the 'Debug' tab. Open the Debug tab and select 'Debug Controller". In the popup list, select "Configuration". The variables will have the same name as those in the config options.

Note: The values will act a little differently between servers with ticklag compensation turned on and those which have it turned off.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4576 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-28 16:20:35 +00:00
Cael_Aislinn
eacd84b212 Merge tgstation13 r4570 into bs12_with_tgport
Conflicts:
	baystation12.dme
	code/defines/obj.dm
	code/defines/procs/helpers.dm
	code/defines/turf.dm
	code/game/gamemodes/changeling/modularchangling.dm
	code/game/gamemodes/cult/cult_structures.dm
	code/game/gamemodes/events.dm
	code/game/machinery/telecomms/machine_interactions.dm
	code/game/master_controller.dm
	code/game/objects/items/blueprints.dm
	code/game/objects/items/devices/uplinks.dm
	code/game/objects/items/item.dm
	code/game/objects/items/weapons/gift_wrappaper.dm
	code/game/objects/items/weapons/wires.dm
	code/game/objects/weapons.dm
	code/game/turfs/turf.dm
	code/modules/clothing/head/hardhat.dm
	code/modules/mining/mine_items.dm
	code/modules/mining/mine_turfs.dm
	code/modules/mob/living/silicon/robot/life.dm
	code/modules/mob/mob_defines.dm
	code/modules/mob/new_player/login.dm
	code/modules/paperwork/pen.dm
	code/modules/paperwork/stamps.dm
	code/unused/toilets.dm
	html/changelog.html
	icons/effects/alert.dmi

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
2012-08-28 19:57:11 +10:00
elly1989@rocketmail.com
474294466a Fixes a really stupid mistake where a sleep() was causing the explosion() proc to end after the sleep due to src being null. This meant that the lighting process was turned off but never turned back on. It also meant powernets were deferred permanently :( sorry.
Reduced the Login delay for new_players. It stays because it protects against rapid connect/disconnects sending resources repeatedly, it's just a lot less annoying now.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4554 316c924e-a436-60f5-8080-3fe189b3f50e
2012-08-26 17:50:29 +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