Commit Graph

108 Commits

Author SHA1 Message Date
phil235
cd0590c355 Replacing two audible_message() by say().
Fixing two small mistakes.
2014-09-14 16:36:06 +02:00
phil235
87d7c9e91e Create the audible_message() proc to replace most instance of " for(var/mob/M in hearers(...) show_message(..., 2)"
fixing typos and missing emotes in emote lists.
2014-09-14 01:15:15 +02:00
Cheridan
866dbb7959 Merge pull request #4634 from Carn/timSort
TimSort for byond
2014-09-07 19:52:02 -05:00
Cheridan
0d1b47eaec Merge pull request #4627 from Aranclanos/pipenetsandpipestwo
Pipes and pipenets
2014-09-07 19:12:16 -05:00
Alex
8f81a0e766 Merge pull request #4709 from Lo6a4evskiy/2014-08-15-Welding-stuff
Removed unnecessary messages when welding
2014-09-07 15:08:01 +01:00
ikarrus
93d7aa68c2 Consistent welding sounds
Starting a weld job will always play welder.ogg
Finishing a weld job will always play welder2.ogg

Closets and airlocks were backwards.
2014-09-06 10:06:17 -06:00
Lo6a4evskiy
82f869c9a6 Updated to resolve conflicts 2014-09-06 13:34:43 +04:00
Aranclanos
aa4ebacbf1 Adds some dots to the end of three sentences related to messages given to the user by pipes. 2014-09-02 20:31:09 -03:00
Aranclanos
8cb30cf950 Adds back the span class tags that I removed on previous commits while updating the branch. 2014-09-02 20:26:33 -03:00
Aranclanos
646e8d0b83 added a new proc for atmos machinery, nullifyPipenetwork(). As their name says, it will nullify the references of a pipenet network datum.
Added qdel for pipenet network datums, this removes most of the singularity lag.
Makes datums work on the garbage collector.
2014-09-02 19:22:27 -03:00
carnie
05b76b123e TimSort for byond:
RESULTS:
sorting 10 random lists of length 3 to 303 in increments of 3
(Meh, I forgot to refresh this one, there were only 338 trials rather than 1010, can't be bothered to recode the test)
                                    Profile results (total time)
Proc Name                                             Self CPU    Total CPU    Real Time        Calls
-------------------------------------------------    ---------    ---------    ---------    ---------
/proc/sortList                                           0.672       16.141       16.243       171226  <--TG's current mergesort(recursive, hence the higher number of calls)
/proc/sortTim                                            0.008        3.278        3.274          338  <--TimSort
/proc/sortMerge                                          0.011        2.839        2.855          338  <--new mergesort
/proc/sortInsert                                         0.010        2.124        2.103          338  <--binary insertion

Sorting 10 presorted lists with 3 inversions (3 elements shuffled up), Lists of length 3 to 303 (increments of 3)
                                    Profile results (total time)
Proc Name                                             Self CPU    Total CPU    Real Time        Calls
-------------------------------------------------    ---------    ---------    ---------    ---------
/proc/sortList                                           1.290       23.056       23.254       308050	<--rather cataclysmic
/proc/sortMerge                                          0.015        4.077        4.068         1010	<--
/proc/sortInsert                                         2.639        3.472        3.464         1010	<--
/proc/sortTim                                            0.014        1.567        1.576         1010	<--TimSort is faaar more effective in these cases,
Timsort can exploit runs effectively

sorting 10 presorted lists which have been reversed
                                    Profile results (total time)
Proc Name                                             Self CPU    Total CPU    Real Time        Calls
-------------------------------------------------    ---------    ---------    ---------    ---------
/proc/sortList                                           1.234       23.193       23.295       308050
/proc/sortMerge                                          0.023        4.681        4.686         1010
/proc/sortInsert                                         2.875        3.750        3.765         1010
/proc/sortTim                                            0.020        3.294        3.284         1010	//This can be lower by using a different comparison method
 *Corrected: /proc/sortTim                                0.017        0.665        0.663         1010	//Using a non-strictly ascending comparison

sorting 10 presorted lists
                                    Profile results (total time)
Proc Name                                             Self CPU    Total CPU    Real Time        Calls
-------------------------------------------------    ---------    ---------    ---------    ---------
/proc/sortList                                           1.199       21.391       21.517       308050
/proc/sortMerge                                          0.018        3.724        3.729         1010
/proc/sortInsert                                         2.497        3.302        3.309         1010
/proc/sortTim                                            0.024        0.586        0.584         1010

Summary, all the new procs are faster than the old ones. TimSort is ever so slightly slower than Insertion and Merging on random lists. But on lists with natural runs (partially sorted data) it is far faster than all others.

The old merge sort was removed and replaced with timSort. Other algorithms are provided as alternatives.

All algorithms use a central datum, so accept many of the same parameters. For instance, setting associative=1 will make them sort associative lists by their associated values, rather than keys.
They also accept a cmp argument. This allows sorting of lists of datums, text, numbers or whatever. The pre-existing helpers in lists.dm were rewritten as examples.
2014-09-01 11:29:49 +01:00
Aranclanos
2514c2a63d Fixes manifold pipe initialization, they would place the same connection on several nodes.
Fixes the qdel() of pipes, scrubbers, vents and others atmos related machines.
Adds an error message when a pipe is in at least two pipenets.
Adds a new proc to add pipes to a pipenet datum, addMember().
Stops the mass creation of pipenet datums that would not be used.
Makes pipenet datums more stable, a pipe will be a member of only one pipenet datum.
Removes a lot of initialization() and build_network() calls around pipe code.
Pipes can now be wrenched without the need of a connector next to them.
2014-08-31 20:22:59 -03:00
Firecage
6c7af5eb32 SPANCLASSES!!!!! 2014-08-26 09:52:13 +02:00
Firecage
b74fc08283 Absolute paths for the files in the ATMOSPHERICS folder 2014-08-16 12:33:16 +02:00
Aranclanos
c3b545c6de Removes the wrench subtype "W" 2014-04-30 15:44:16 -03:00
Aranclanos
1f74292923 Fixes a server crash due to infinite loops related to atmos unary machines interacting with eachother. 2014-04-23 02:10:03 -03:00
Incoming
a938b90034 Fixes a small bug in ventcrawling that allowed crawlers to avoid things that relied on area.Entered. Mostly the turrets in the AI Core/upload.
Reported http://www.ss13.eu/phpbb/viewtopic.php?f=42&t=9&start=1900#p126318 . NEXT TIME USE GIT.
2014-03-27 19:05:54 -04:00
Aranclanos
b1e2493b51 Merge pull request #3030 from Razharas/UnaryMachinery
General cryo and unary atmos machinery fix
2014-03-22 20:07:17 -03:00
MrPerson
6930283efc Merge branch 'master' of https://github.com/tgstation/-tg-station into qdel_r
Conflicts:
	code/game/gamemodes/changeling/changeling_mutations.dm
	code/game/gamemodes/changeling/changeling_powers.dm
	code/game/gamemodes/malfunction/Malf_Modules.dm
	code/game/objects/items/weapons/tanks/watertank.dm
	code/game/objects/structures/tables_racks.dm
	code/modules/research/server.dm
2014-03-21 03:05:39 -07:00
Rockdtben
a034e41f25 Removing TLE comment stamps and useless comments 2014-03-13 08:25:28 -05:00
MrPerson
6b29fecda1 Merge branch 'master' of https://github.com/tgstation/-tg-station into qdel_r
Conflicts:
	code/game/machinery/bots/ed209bot.dm
	code/game/machinery/rechargestation.dm
	code/game/machinery/turrets.dm
	code/game/objects/structures/crates_lockers/closets.dm
	code/modules/research/circuitprinter.dm
2014-03-08 22:03:03 -08:00
Razharas
e55a9204f3 General cryo and unary atmos machinery fix
Fixes cryo and other unary atmos machinery connection fuckery
Cryo now doesnt freeze the dead/fullhealth people and ejected people
dont get frostbiten
2014-03-09 03:12:32 +04:00
Incoming
232077e5cb Cleaned out some now obsolete comments 2014-03-01 17:45:35 -05:00
Incoming
f0b81575e7 Removes the ventcrawl verb, all ventcrawlers are still ventcrawlers and can use ventcrawling with the alt click. This is simutaniously less buggy and far easier to do on the fly.
The meat of ventcrawling is now stored in the vent pump, meaning anything can ventcrawl if it has ventcrawling on.

Ventcrawling 0 is no crawling, Ventcrawling 1 is naked crawling, Ventcrawling 2 and above is always crawling.

Yes you can var edit humans to be able to ventcrawl with this, great if you want to reenact diehard!

Simple animals that logically should fit in a vent can now ventcrawl. Note that this only is relevent for player controlled simple animals (staff of change/badminry), it won't be used by the mob AI.
2014-02-25 20:43:30 -05:00
MrPerson
9eee3e5067 First pass at a qdel() garbage collection system for tgstation
Works pretty well. If it can't GC something, it'll just del() it and be done.
Speed is amazing, holy shit.

New procs you should be aware of:
qdel(atom/movable) - sets up an object for garbage collection. Call this rather than del(atom/movable).
atom/movable/Destroy() - called right before the object is GC'd, so it still has a loc. Also called if the object is del()'d.
new controller - garbage.dm has all the details on this. Basically it nulls all references on GC'd objects and force del() them if necessary.
Generally speaking, objects should use Destroy() for behavior prior to deletion rather than Del(). You should also always call the parent so the object gets the right gc_destroyed var set.

ISSUES:
Tries to GC mobs atm. This actually works for new players, not so much for humans/monkies/simple_animals/anything. I'm guessing it needs to clear out their mind and HUD and maybe other things.
Gibbing is really bugged. It works, but the overlays just sit there for awhile and ugh. I'm very tempted just to del() mob/living and mob/camera and call it a day.
qdel() equipment doesn't unequip the item.
Pipes don't generally GC correctly. Debugging suggests they get referenced in many pipenets and that isn't cleared properly. However some do work fine. Need assistance here.
Bots don't GC, probably in the radio controller.
Lots of other shit doesn't GC but it's hard to find them because of the pipe spam.
I think I'm calling Destroy() twice by accident.
2014-02-23 14:55:12 -08:00
Razharas
77622da3cc Cryo fix
Shall fix it
2014-02-11 10:21:06 +04:00
Razharas
c0aa3b56bb Merge branch 'master' of https://github.com/tgstation/-tg-station into SayYiffYiffIfYouAreMachineFucker
Conflicts:
	code/game/machinery/Sleeper.dm
	code/game/machinery/computer/aifixer.dm
	code/modules/hydroponics/biogenerator.dm
	code/modules/power/apc.dm
	code/modules/research/server.dm
	icons/obj/stationobjs.dmi

Yeah nah time to merge this shit behore resolving conflicts will take more than 2 hours
2014-02-06 22:05:39 +04:00
Giacomand
7a76e9456b Ported the MiniStation branch.
MiniStation is now a single folder which isn't included by default. When you tick the code file for the ministation map, like with tgstation and metastation, it will then include the necessary code files itself. These code files modify certain datums, like jobs, supply packs and uplink datums.

The modified files outside the MiniStation folder are modifications made by the MiniStation branch which aren't changes exclusive to MiniStation.

Such as changing the unused circulator, which only MiniStation used, so that it was fixed and would correctly match the direction of the thermal generator.
The TEG was also changed to have a better interface and to include the above fix.
The department security was changed so it wouldn't runtime if it didn't find a checkpoint.
The preferences' SetChoices was changed so that the screen would automatically grow for every column in the job list.

The main difference between this version and the forked version is that the Unemployed and the Lieutenant was reverted back to their original names; since it would've been a massive pain to add support for that.
2014-01-29 22:36:10 +00:00
Razharas
1685dd3b7a Machine overhaul 2: Constructable Revolution
Yeah i lost half of my work so its only other half
Durning this PR ill try to redo what was lost, in no way is it a
complete thing
Hope git wont do anything bad with it
2014-01-10 18:53:26 +04:00
Miauw
68652294a8 Digital valves can now be made and unwrenched. Fixes pipe fitting names.
Weird pipe fitting names like "uvent fitting" have just been changed to "vent fitting".
2013-12-18 17:31:26 +01:00
Giacom
3e9b2bdb52 Merge pull request #1817 from kyrahabattoir/ItemNameFixingRound1
proper/improper/consistency name fixing (round1)
2013-11-20 03:46:28 -08:00
Aranclanos
38efa3b415 Merge pull request #1777 from adrix89/pipeFix
Fixes pipe bug.
2013-11-19 00:14:17 -08:00
Kyrah Abattoir
301c5be5f5 /code/ATMOSPHERICS/* lowercasing pass. 2013-11-18 01:36:36 +01:00
Laurence Reading
415631732f Fix for being unable to unwrench vents 2013-11-14 22:14:37 +00:00
adrix89
28de2e5fe6 Fixes pipe bug.
Issue https://github.com/tgstation/-tg-station/issues/1669 and its duplicate https://github.com/tgstation/-tg-station/issues/1099
2013-11-13 13:24:07 +02:00
Mloc-Argent
a3867b46a6 Cleanup of pipe unwrenching code.
Fixes #1509

Signed-off-by: Mloc-Argent <colmohici@gmail.com>
2013-10-12 17:24:54 +01:00
Pete Goodfellow
0195caad16 Ported and improved Sayu's awesome alt-click stat panel. Alt-clicking a tile will bring up a list of the objects on it in a stat panel- these can be interacted with normally, with both left and right clicks. This is particularly useful for getting specific items from lockers. 2013-09-18 23:04:08 +01:00
supersayu
a3ba991d2f Additional comments, move some code
Should improve documentation of new and old click code
2013-09-17 19:03:22 -04:00
Aranclanos
0ce01d1583 Adding Linda. 2013-08-10 06:15:14 -03:00
EuroNumbers
2db11f705d Reverted Giacom's changes 2013-06-15 17:07:12 +02:00
EuroNumbers
2fcfafe5c9 Fixed crappy copy/paste 2013-06-14 10:14:20 +02:00
EuroNumbers
e5cb95cf51 Fixed crappy copy/paste 2013-06-14 11:12:33 +03:00
EuroNumbers
024951917a Fixed crappy copy/paste 2013-06-14 10:10:02 +02:00
EuroNumbers
52f07ac1ed Fixing issue #658
Fixing proper naming of Plasma
2013-06-14 05:51:48 +03:00
EuroNumbers
3afeb93649 Fixing issue #299
Now 0/100% mixing works
2013-06-14 05:50:30 +03:00
carnie
b84d12d949 *Small tidy-up of various helper procs*
-Turns out there was already a Gaussian PRNG proc already, used by mechs and turrets. I've replaced it with my one as mine has almost half the cost. (currently broken! still waiting for fixes to be pulled!)
-replaced between(min, val, max) with Clamp(val, min, max)
-get_turf(thing) now uses var/list/locs to locate its turf, rather than iterating up through loc of its loc of its loc...etc
-sign(num) moved to maths.dm
-InRange(val, min, max) replaced with IsInRange(val, min, max) (they were identical)
-Removed ismultitool() iswrench() iscoil() iswire() iswelder() iscrowbar() etc
-removed modulus(num) as abs() performs the same task! *roll-eyes*
-removed get_mob_with_client_list() as it is no longer needed (we have var/list/player_list now)
-removed get_turf_or_move() as it simply called get_turf
-removed get_turf_loc() as it was identical to get_turf()

*Additions:*
-The "Declare Ready" link in the lobby will automatically become "Join Game" if the round starts before you declare ready, so you don't have to click it twice
2013-05-27 12:21:43 +01:00
Tastyfish
ccc2c099dc Fixed some atmos machine New()'s not calling base's new at right time, and more importantly, initialize() selects new connections rather than aborting if previously connected, as the point of the initialize proc is for construction 2013-04-30 06:18:54 -04:00
Rastaf.zero
3365735921 Fixes #88 panic syphon status gets stuck on.
Also air alarm "off" state returns back. It turns off all the machines in area.
2013-03-25 18:41:07 +04:00
giacomand@gmail.com
e70ddc5356 Committing SuperSayu and Kaze Espada's patch.
http://forums.nanotrasen.com/viewtopic.php?f=16&t=11958

Atmospherics:
 * Atmo computer UI auto updates again (simple interact() fix)
 * Injectors should show up on atmo computers without hitting refresh
 * Fixes Issue 1258

Powernets:
 * Rebuild powernets no longer breaks the system.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5652 316c924e-a436-60f5-8080-3fe189b3f50e
2013-02-04 20:24:55 +00:00
giacomand@gmail.com
b9bb759cd8 -Multiple fixes for machinery not correctly updating their icons when depowered.
-Gave request consoles an off sprite.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5421 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-30 02:20:03 +00:00