Commit Graph

312 Commits

Author SHA1 Message Date
phil235
74f8a08522 Merge branch 'master' of https://github.com/tgstation/-tg-station into AttackAnimation
Conflicts:
	code/modules/mob/living/living.dm
2014-11-04 18:55:07 +01:00
hornygranny
3d09f8031a Merge pull request #5632 from GunHog/Botcall_Lagfix_TryTwo
Botcall Fix for MC lag + Tweak to floorbots Take Two
2014-11-03 17:35:16 -08:00
tkdrg
0335c4adec Makes ghostpointing invisible (thanks PsiOmegaDelta!) 2014-11-03 18:19:20 -03:00
GunHog
7f41894319 Gives bots their own place in the MC!
- Adds bots to the Master Controller as their own datum instead of
machines.
- Puts bots into their own global list.
- Processes bots asynchronously so as to not hold up the MC processing
them.
2014-11-03 12:39:07 -06:00
phil235
1506383b2c Adding some missing do_attack_animation()
Moving do_attack_animation() proc to mob/living
Fixing the pixel offset issue from beds especially rollerbed.
Fixing the nograv bouncing stopping because of another animation being used.(lying down, jittering, attack animation)
2014-11-03 15:11:39 +01:00
phil235
8b49caa5ee Fixes typos and show messages. Fixes attack animation code. 2014-11-03 01:06:02 +01:00
phil235
3f30912c51 WIP - Adding attack animation to most attacks.
Fixing a couple "for(......) show_message()".
2014-11-02 22:50:58 +01:00
tkdrg
9140006256 Fixes ghost pointing 2014-11-02 15:24:03 -03:00
tkdrg
7ebc4bb742 Merge remote-tracking branch 'upstream/master' into pullingyourleg
Conflicts:
	code/modules/mob/mob.dm
2014-11-02 14:40:37 -03:00
phil235
128c9222e5 Adding checks for stun, restrained to many object verbs.
Fixing paper and supply manifest description upon examination.
Fixing being able to adjust jumpsuit while restrained.
Fixing one typo.
2014-11-01 19:18:01 +01:00
tkdrg
a5ab00975b Moves pulled() to /mob/living, lets ghosts point (only other ghosts can see the pointing) 2014-10-29 17:53:41 -03:00
Remie Richards
07ff02b7c4 Merge pull request #5477 from MrPerson/space_movement_jam
Space movement rewrite to allow everything to drift
2014-10-28 22:15:05 +00:00
tkdrg
b0db18234f Makes pull into a mob verb. 2014-10-27 12:28:06 -03:00
MrPerson
ef6204656f Space movement rewrite to allow everything to drift
Removes a version of atom/movable/Move() that was in mob_movement.dm.
New proc called newtonian_move() that's called as a result of things like shooting a gun or spraying a fire extinguisher and as part of atom/movable/Move().
It pushes src if it's not under gravity and gives the object a chance to stop itself.
As a result, inertial_drift() is kill.
Moved Process_Spacemove() out to atom/movable. It does the same thing, it's called whenever a drift is attempted and stops the drift if it returns 1. Default check is to look for nearby lattices to make dragging shit around the station less annoying. Mobs still call it in Client/Move()
The mob version of Process_Spacemove() will shove non-anchored nearby objects out of the way if you try to move like that. For example if you're free-floating in space next to a closet and try to move right, the closet will drift off to the left.
Mechs call their occupant's version of Process_Spacemove() so mining with a mech isn't retarded. The pussy wagon does the same thing and thus no longer works like a jetpack. Will it be making a comeback?!?! (no)
Any move will attempt to keep dragging your pulled object, not just ones initiated by the client. Should make space wind a little less annoying. Was needed to make drifting not break your drags.
Mechs drift correctly without any special snowflake crap.
Spaceslipping is gone because fuck that shit
Space movement is now slow instead of fast. Having a jetpack helps go faster but even that's slower than current. Hopefully means nuke ops can see each other as they move to the station instead of losing sight of each other instantly. Having your hands full makes spacemovement even slower.
You can drift in office chairs and drag mobs in beds or the bed itself. Currently drifting diagonally while in an office chair is bugged and I need help to solve it. It winds up in cardinal movement instead of a diagonal one.
Changes up the jetpacking effects system to cause fewer errant ion trails but it's still awful code. In hindsight I shouldn't have bothered but here we go.
2014-10-25 23:19:46 -07:00
tkdrg
c83bf83108 Fixes #2098 2014-10-25 22:54:25 -03:00
tkdrg
b37b2651d3 Point is now a mob verb to reduce lag 2014-10-25 22:54:17 -03:00
JJRcop
1e51b88c5f Drone tweaks
Drones can hear and understand human speech, but still cannot speak it
Drones recieve 25 brute damage when hit by a heavy EMP blast
You can tell if drones do not have a player controlling them
If you attempt to repair a dead drone, but the player is ghosted and can re-enter, you will repair it, and the ghost will be notified
Added new get_ghost proc to mobs, which will attempt to retrieve the ghost mob of the player if it exists and can re-enter, override arg available if you want it even if it can't re-enter
Syndrones now start with initial TC/2 instead of a hard coded 5 (which was made before the TC*2 update)
Drones get a robotic chat bubble
2014-10-11 01:13:51 -04:00
MrPerson
651c3e6db5 Merge to master - sole conflicting file was ninja.dm FUCK NINJAS 2014-10-04 01:45:39 -07:00
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
MrPerson
a23dbe2357 Merge branch 'master' of https://github.com/tgstation/-tg-station into examinate_the_doctor
Conflicts:
	code/game/objects/items/devices/radio/radio.dm
	code/game/objects/items/toys.dm
	code/game/objects/items/weapons/tanks/tank_types.dm
	code/game/objects/items/weapons/tanks/tanks.dm
	code/modules/events/ninja.dm
	code/modules/power/cell.dm
	code/modules/power/port_gen.dm
	code/modules/reagents/reagent_dispenser.dm
2014-08-29 04:21:15 -07: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
MrPerson
44383ec1c8 Disregard that I suck cocks 2014-08-21 07:35:51 -07:00
MrPerson
d0c97aae72 Merge branch 'master' of https://github.com/tgstation/-tg-station into examinate_the_doctor
Conflicts:
	code/ATMOSPHERICS/components/unary/vent_pump.dm
	code/game/gamemodes/cult/ritual.dm
	code/game/gamemodes/nuclear/pinpointer.dm
	code/game/machinery/spaceheater.dm
	code/game/machinery/status_display.dm
	code/game/objects/effects/decals/crayon.dm
	code/game/objects/items/stacks/stack.dm
	code/game/objects/items/weapons/airlock_painter.dm
	code/game/objects/items/weapons/cigs_lighters.dm
	code/game/objects/items/weapons/storage/secure.dm
	code/game/objects/items/weapons/tanks/tank_types.dm
	code/modules/assembly/assembly.dm
	code/modules/assembly/holder.dm
	code/modules/assembly/mousetrap.dm
	code/modules/mob/living/carbon/alien/special/facehugger.dm
	code/modules/mob/living/carbon/slime/examine.dm
	code/modules/power/cable.dm
	code/modules/reagents/grenade_launcher.dm
	code/modules/reagents/reagent_containers/food/drinks.dm
	code/modules/reagents/reagent_containers/food/snacks.dm
	code/modules/reagents/reagent_containers/glass.dm
	code/modules/recycling/sortingmachinery.dm

Thanks Firecage, this is all your fault
2014-08-20 05:54:20 -07: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
MrPerson
c43518351f Some fixes and minor improvements to examining. 2014-06-13 09:01:52 -07:00
MrPerson
59d64656c4 Some fixes and minor improvements to examining. 2014-06-09 11:35:29 -07:00
MrPerson
645ca7f8a1 Merge branch 'master' of https://github.com/tgstation/-tg-station into examinate_the_doctor
Conflicts:
	code/_onclick/click.dm
	code/game/atoms.dm
	code/game/objects/items/toys.dm
	code/modules/paperwork/folders.dm
	code/modules/power/cable.dm
2014-06-09 01:50:44 -07: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
MrPerson
9d9a657acf Change examine() from an atom verb to a mob verb
Just in time for the feature freeze, a big change that will introduce bugs! Yay!
Mob verb is called verb/examinate(target), which just calls target.examine(user) and face_atom(target)
For explanation why, see http://www.byond.com/forum/?post=1326139&page=2#comment8198716
Long story short, mob verbs are much faster than object verbs. The goal is to make right-click menus populate faster.

Also changes a bunch of examine() procs to always, ALWAYS call the parent. Except mobs, but you have 1 guess why I'm not touching them. Mostly this affects obj/item/examine().
And also remove a whole shitload of pointless set src in view(2) kind of crap. Also span classes.
2014-05-01 09:56:39 -07: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