Commit Graph

287 Commits

Author SHA1 Message Date
phil235
3248e23887 Merge branch 'master' of https://github.com/tgstation/-tg-station into AudibleMsgFix
Conflicts:
	code/modules/recycling/disposal.dm
2014-09-25 18:45:53 +02:00
phil235
7afbd3345b Replacing some hearers(...) with get_hearers_in_view(...).
Renaming Make Sound to Object Say.
Switching deaf_message in audible_message proc to last argument.
Replacing some "for(mob in hearers)+show_message" with audible_message()
2014-09-25 18:22:27 +02:00
phil235
e4a958ac63 Simplifying audible_message proc by using get_hearers_in_view(). 2014-09-17 20:47:26 +02:00
phil235
8d6ee69a36 Fixing issue where people can't hear their own emotes while inside lockers and the audible messages when also in the dark. Removing object_talk() proc (obsolete). 2014-09-14 16:17:16 +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
Remie Richards
473bcd1858 Ports Drones from NTstation + New Improvements/Features 2014-09-13 15:02:57 +01: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
Firecage
6c7af5eb32 SPANCLASSES!!!!! 2014-08-26 09:52:13 +02:00
ChuckTheSheep
747e35c1c8 SearchFix - Fixes #4497 2014-08-21 20:47:58 -04:00
Aranclanos
fd66b5710a The strip panel will now use canUseTopic().
Cyborg and AI canUseTopic() procs will now include a BE_CLOSE variable, just in the case of having to be near the atom.
Added a BE_CLOSE and NO_DEXTERY define, they are both 1.
Third argument for canUseTopic(), dextery check, if a monkey or alien or whatever can perform the action.
2014-08-13 08:50:51 -03:00
Firecage
c0c9702c13 Fuck fucking spaces 2014-07-21 14:56:23 +02:00
Alex
0dc8aabd42 Revert "Spinning" 2014-07-13 00:55:18 +01:00
Aranclanos
83cb25ea41 Added a spinning visual effect to rolling on the floor to extinguish yourself in case of a fire.
Lube will now make you spin while you're slipping.
Water will make you slip on the spot and won't move you forward.
Fixed the bug of wrong mob directions when buckling them while they are lying down.
2014-07-09 05:25:12 -03:00
Rolan7
0fa91b06f1 Merge branch 'master' of https://github.com/tgstation/-tg-station into Issue3401
Conflicts:
	code/modules/mob/living/carbon/monkey/monkey.dm - I don't know why it thought there was a conflict.  Opening it in tortoisemerge showed no conflicts and automatically cleared the status.  I reset to the repo's version just to be safe, then re-added my freakin 2 line function which has caused 2-3 "conflicts" so far.
2014-07-07 13:42:31 -04:00
Rolan7
c587fa440d Merge branch 'master' of https://github.com/tgstation/-tg-station into Issue3401
In monkey.dm my SpeciesCanConsume check was conflicting with a new canBeHandcuffed check.  All resolved now.
2014-05-14 11:07:43 -04:00
Rolan7
d871779432 Replaced the isRobot() check with two new functions, one of which is overloaded for robots. Object oriented programming intensifies! 2014-05-09 18:03:49 -04:00
Rolan7
5b219ea119 Fixes issue #146, borgs placing modules on people
Simple fix for this one...
2014-05-07 14:54:35 -04:00
Rolan7
0656ef44e4 Fixes issue #3401 by adding a helper proc to mobs which specifies whether a mob has the racial ability to eat and drink, and checks this proc in the "canconsume" reagent proc (called when someone is fed or tries to eat/drink). Humans, aliens, and monkeys can all be fed food and drink as a result, and service borgs can no longer drink their own coolaid (to get diseases or otherwise). 2014-04-25 14:37:27 -04:00
Cheridan
4539711d9a Merge pull request #3459 from MrPerson/screen_deletion
Remove some unnecessary code of mine that's causing runtimes
2014-04-21 13:26:49 -05:00
Razharas
a2895ed9dc Merge pull request #3446 from Aranclanos/LindaChecks
Admin status panel, extra air thingies
2014-04-19 19:04:49 -07:00
MrPerson
5e92f3acfe Remove some buggy ass, unnecessary code of mine that's causing runtimes 2014-04-19 12:56:43 -07:00
Aranclanos
ca67aeb3aa Added more stuff to the status panel for admins, air related, these are only temporal (hehehe) 2014-04-17 21:37:06 -03:00
Ergovisavi
f302adc8ab Merge branch 'master' of https://github.com/tgstation/-tg-station into mineral_economy 2014-04-16 16:58:28 -07:00
MrPerson
910dae4154 Make reenter-corpse not delete your spells 2014-04-09 13:10:48 -07:00
Malkevin
d4e0052d03 mob.dm 2014-03-29 17:05:34 +00:00
Malkevin
c3552606f1 Merge branch 'master' of https://github.com/tgstation/-tg-station into saccult
Conflicts:
	code/modules/mob/mob.dm
2014-03-29 16:59:14 +00:00
Cheridan
c8da962b40 Merge pull request #3195 from MrPerson/qdel_ei_nath_REDO
Make ei nath not destroy brains again
2014-03-28 13:03:11 -05:00
Malkevin
3ff519cefc Merge branch 'master' of https://github.com/tgstation/-tg-station into saccult
Conflicts:
	code/modules/mob/mob.dm
2014-03-28 10:51:48 +00:00
Razharas
3000586e7b Merge pull request #3216 from Aranclanos/ClickDownRemoval2
Click cooldown removal take 2
2014-03-28 02:39:25 -07:00
Aranclanos
7bcb69ad88 Removes the click cooldown from almost everything, now it should be always be 0.1 seconds.
Ranged weapons and laser eyes have a cooldown of 0.4.
Grilles, windows, windoors, walls and blobs have a cooldown of 0.8.
Hitting mobs will also have a cooldown of 0.8.
Removes the unused USEDELAY flag.
2014-03-28 06:32:47 -03:00
YotaXP
febfa4d1e5 Merge branch 'qdel-with-datums'
Conflicts:
	code/_onclick/hud/screen_objects.dm
	code/controllers/garbage.dm
	code/game/atoms.dm
	code/game/objects/items/weapons/storage/storage.dm
	code/modules/mob/mob.dm
2014-03-27 21:46:53 -04:00
Ergovisavi
d55d72f049 Merge branch 'master' of https://github.com/tgstation/-tg-station into mineral_economy 2014-03-26 18:14:48 -07:00
Malkevin
96a892cacc Removed some debug check
Fixed the Debugger not selecting antags
2014-03-26 19:49:14 +00:00
MrPerson
1fa3dbde0c Make ei nath not destroy brains
Also small tweaks to make spells GC if you use the spellremove() proc.
2014-03-26 08:38:26 -07:00
Mloc-Hibernia
8af8a43d6f Initial pass to convert LF to CRLF
Signed-off-by: Mloc-Hibernia <colmohici@gmail.com>
2014-03-24 08:53:40 +00:00
YotaXP
3656217c29 Modified qdel() to accept any datum.
The garbage controller no longer bothers nulling out every variable on destroyed objects.
An object can opt to not be collected by returning true from Destroy().  Useful for pools or other edge cases.
Fixed boxes not being collected, along with a couple other things.
Turfs will not be monitored for collection.
generate_ion_law() is no longer a /datum proc, and I am an admin in the repo.  Deal with it.
2014-03-24 00:10:43 -04:00
Malkevin
542da7d73b Merge branch 'master' of https://github.com/tgstation/-tg-station into saccult
Conflicts:
	code/game/gamemodes/cult/runes.dm
	code/game/gamemodes/wizard/soulstone.dm
2014-03-22 21:01:09 +00:00
MrPerson
2858bf1c18 Fix for changling powers arm blade and fleshy space suit.
More del(AM) -> qdel(AM) and Del() -> Destroy()
Fixes a terrible bug that would have meant players could only ghost once.
2014-03-21 22:26:50 -07: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
Ergovisavi
d0ef73125a Various mining changes IE: mineral amounts per tile, mining mob stuff, mob anchoring, etc 2014-03-20 20:10:54 -07:00
Malkevin
7d2e2de62c New rune: summon artificer shell ("travel", "hell", "tech")
1 cultist
Requires 4 plasteel to convert to a shell

Boring coder stuff: Wrote a proc called mob/proc/sac_act - pretty simple thing that gets called in the sacrifice rune instead of it being a huge unwieldy wall of text full of conditionals
Exciting future of the game stuff: This will allow me to enable all mobs to be sacrificed.
¬TO-DO: Move current sacrifice code into relevent sac_act procs for humans, monkeys, aliums
¬TO-DO: Write sac_acts for the other mob types
-¬DONE: Corgis
--¬TO-DO: Make corgi sacrifice !!FUN!!
2014-03-19 00:13:28 +00:00
Perakp
fa56f9892e Merge with master, dissonant shriek and organic space suit
- Changed dissonant shriek and organic space suit from old verb system
to new system.
2014-03-15 13:49:26 +02:00
MrPerson
75353c1681 Stat number of dels per tick
More del(AM) -> qdel(AM)
2014-03-08 23:26:33 -08: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
MrPerson
3c58091437 Merge branch 'master' of https://github.com/tgstation/-tg-station into qdel
Hopefully nothing went wrong but you never know.

Conflicts:
	code/FEA/FEA_fire.dm
	code/controllers/supply_shuttle.dm
	code/game/gamemodes/changeling/changeling_powers.dm
	code/game/machinery/autolathe.dm
	code/game/machinery/drying_rack.dm
	code/modules/hydroponics/hydroponics.dm
	code/modules/projectiles/projectile/magic.dm
	code/modules/reagents/Chemistry-Recipes.dm
	code/modules/reagents/reagent_dispenser.dm
2014-03-02 21:39:27 -08:00
MrPerson
917a2dd2a4 Rename equip_to_slot_or_qdel() -> del()
Still qdel()'s them, just naming the proc back.
Should hopefully reduce the number of lines different in the pr.
2014-03-02 21:08:25 -08:00
Perakp
edb2154b48 - Changes changeling abilities from verbs to proc_holder objects.
- Functionality should be unchanged
- Admins can varedit chemical costs of individual abilities.
- Allows coders to implement sting upgrades more easily.
2014-03-02 09:12:03 +02:00
MrPerson
48923f9ce5 Redo of jitteriness and dizziness.
Fixes #2923
2014-02-27 23:19:44 -08:00
MrPerson
f27d35b760 Made gibbing not look stupid.
Also some basic stuff in an attempt to get complex mobs to GC. Still doesn't work atm.
2014-02-26 23:44:19 -08: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