Commit Graph

17 Commits

Author SHA1 Message Date
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
carnie
6529e7b302 Interface for using boost::regex in byond.
Regex is a robust text-parsing mini-language. It can perform complex and dynamic searches and return the results in an easy to read format. This implementation also uses Boost's extended formatting syntax which gives you a flexible way to conditionally replace complex strings with only a few lines of code

Source code and license info can be found here: http://code.google.com/p/byond-regex/
Licensed under LGPL.

This uses the perl regex syntax (with some extensions) in non-recursive mode (as recursion has additional overheads).

Information on this syntax can be found here: http://www.boost.org/doc/libs/1_55_0/libs/regex/doc/html/boost_regex/syntax/perl_syntax.html

There are many introductions to regex on the internet. Here is the one I learned from: http://www.regular-expressions.info/tutorial.html

Note: I have added #define USE_BYGEX in code/_compile_options.dm. Simply comment out the define if you encounter any problems.

Due to byond being unable to communicate with a dll through anything but C-strings, the results are returned to byond in a string similar to those you get with list2params. Since byond uses parameters a lot, its params2list() proc is fairly streamlined, so it's pretty much the fastest way you could do this with byond. This data is then stored in a datum/regex object for easy use. See demo.dm datum/regex/proc/report() for an example.
2014-11-13 05:55:58 +00:00
Lo6a4evskiy
5fb3f9ac9c Edited comment and added delay to roman armor 2014-10-06 22:07:11 +04:00
Lo6a4evskiy
61937c8dae Changed strip delays for most clothes 2014-10-06 19:42:12 +04:00
MrPerson
f035c9be5d Per Aran's request, re-add dellogging 2014-06-16 11:21:42 -07:00
MrPerson
44638fd05c Add logging to failed GC's that result in a del() call
You can view these logs in-game using a debug verb. You have to use the debug-verbs command to see it.

Removed the dellogging compile option. If this is a problem, speak up, but for most users, this new functionality is more useful.
2014-06-13 11:46:17 -07:00
hornygranny
c31647376e This is for discussion of things that need to be changed to move away from purely stun based combat. Please only comment if you have something to contribute, rather than just saying you like or dislike it.
Shoes do not increase your movement speed
Stun/weaken on basically everything reduced from 10+ to 5 ticks
Time to unbuckle/uncuff self halved
2014-02-27 10:56:06 -08:00
Giacomand
f1e7637bab Disabled the game using set background by making all instances of it use a define, which can be changed in code/_compile_options.dm
Testing has revealed that it reduces the sluggishness of the game, though it will spike from lag when the singularity is loose. Thanks to ChuckTheSheep for suggesting it.

Server owners who want to keep set background enabled can do so by changing the define.
2014-01-10 18:32:28 +00:00
Giacomand
f44faba532 Added a voice announcement system for the AI.
Voices are based on /vg/'s female voice and are copyright free.
There is a 60 second cooldown for each announcement.
Added a compile option for AI voices. Undefining AI_VOX will not compile the resources, meaning players won't have to download them.
2013-10-26 17:56:39 +01:00
supersayu
711654c15e Moved #defines
Moves the constants from defines and compile_options files into the __DEFINES directory.  The compile options in the latter file that are actually tweakable remain in their existing file in the code directory.
Constants from DEFINES.dm, globals.dm, names.dm, and global_lists.dm have been moved into the _globalvars subdirectory.
stylesheet.dm has been moved into the interface directory since that's a better place for it.

This move contains no code changes for stock TG.  It is purely an organizational move meant to clean up hard to read code.
Some global constants that appear to be unused have been put into unused.dm, but not unticked.  This list is by no means exhaustive.

Branches should be aware that they need to move any additional defines and global constants manually.
2013-10-23 16:11:45 -04:00
Giacomand
646d7596f2 * Made the emergency shuttle code use the defined times.
* Added a SHUTTLEAUTOCALLTIMER define for the auto call.
2013-10-16 08:30:25 +01:00
carnie
26957f5357 Remote resources support.
There is now a PRELOAD_RSC define in code/_compile_options.dm. Setting it to 0 will allow you to use on-the-fly rsc downloads, or the new remote rsc features.

Normally (PRELOAD_RSC == 1) the game will send you all the resources for the game that existed at compile time, this is the long-delay before joining the game...but it means that the game isn't sluggish later on due to trying to download icons and such. Which is good, but uses a lot of bandwidth.

On-the-fly behaviour (PRELOAD_RSC == 0) is when the game only downloads icons when you see something for the first time...this is often responsible for things being briefly invisible on slow connections.

Remote RSC behaviour (PRELOAD_RSC == 0 and some urls defined in config/external_rsc_urls.txt), is a mixture of the two above behaviours. It allows you to connect without downloading lots of resources immediately. However, once you connect it will select a url from a list of urls which hold zipped up copies of the tgstation.rsc. This allows the load of downloading those large files to be distributed across a few cheap web-servers or free upload sites...whilst the main game-server is freed up for other stuff. Should preloading from a remote url fail, behavior will revert to on-the-fly.
2013-06-25 07:44:57 +01:00
Pete Goodfellow
62b848c6ce Removes equip_e - Fixes #423
This updates everything that used equip_e, particularly the strip panel, but also DNA injectors and CPR.

Removed unused mob vars:
 var/obj/effect/organstructure/organStructure
 var/other
 var/proc_holder_list[]

Removed unused alien suit and head slots.
 Removed var/obj/item/weapon/card/id/wear_id from monkeys, and updated ed209s to not use :

Renamed HUMAN_STRIP_DELAY to STRIP_DELAY.

Muddled Topics() around so that mobs are now a bit more OO. Also updated quite a few misc inventory procs to various degrees.

Updated monkey and aliens huds a little bit.

Random movement when confused now happens half the time.

Fixed monkey breathmask onmobs.

Added a .unconscious text style, for that nice bold blue text you get when you're unconscious. Only CPR uses it at the moment.

This has been tested fairly extensively, and everything seems to work fine.

-Merged commits ~carnie
Signed-off-by: carnie <elly1989@rocketmail.com>
2013-04-24 04:07:39 +01:00
Malkevin
346aae0160 comment change for mr pedantic 2013-04-17 00:30:43 +01:00
Malkevin
71aac937cb Gives fire suits a bit of extra cold protection over normal armor.
I set it to 60, so you can't use fire suits like the ghetto space suits of old (which would be impossible to emulate now, back then coldness did only negligible damage) but it is enough for atmostechs to clean up a medbay cryo leak, and they will protect you long enough for the ballsy atmos tech to plug a hullbreach, or gives an unlucky engineer about a minute thirty to wire a solar array.
2013-04-11 23:19:03 +01:00
Pete Goodfellow
b02c459505 Adding google code commits r5836 to r5849. RIP in peace google code. 2013-03-11 04:26:54 +00:00
elly1989@rocketmail.com
0fbd92f5c3 Shuffled all the #defines in global.dm and setup.dm
They have been separated into low-level stuff that you wouldn't really want to ever edit (like the definition of PI) which are in __DEFINES.dm
The others, which hosts could possibly want to modify for their server, are located in _compile_options.dm

I've tried to group it together in some sort of logical way so it's easier to find what you need. Feel free to move whatever.

Main reason for the change is so we can add some more compile options into the game to make it more configurable.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5825 316c924e-a436-60f5-8080-3fe189b3f50e
2013-03-08 19:02:19 +00:00