Commit Graph

436 Commits

Author SHA1 Message Date
Swag McYolosteinen
58648d267e Merge pull request #7271 from Incoming5643/Maybe_it_ran_out_of_gas
Shuttle Stranding
2015-01-27 17:55:26 +01:00
Cheridan
d649846100 Fixes Weaken() for Ergo 2015-01-23 22:50:59 -06:00
Incoming
d7bca48557 Shuttle stranding:
Removes fake recalls, the shuttle will arrive in rounds that usually would not allow shuttles (rev, malf, blob) but when the time comes for the shuttle to leave, it simply won't.

What this does:
-It gives a bonus ~8 minute delay to antag discovery on shuttle calls
-It punishes crews that call the shuttle at first sign of danger by:
--Rev: having the heads/potential converts huddle in predictable locations
--Blob/Malf: Distracting focus from the antag
-Gives a nice little OH SHIT moment when the shuttle doesn't launch

Essentially this turns shuttle calls into something you wouldn't attempt without confirmation of the round type, which is the opposite of how it functions currently.

Malf AIs also gain the ability to recall the shuttle to avoid the hard tell if they prefer.
2015-01-21 17:35:45 -05:00
Remie Richards
17654037db Ports Mloc's Refactor of buckling, All /obj can now buckle things. HE Pipes now change colour based on heat. 2015-01-14 19:07:18 +00:00
Menshin
435ccf7ff9 * OOP'ed ear damages/deafness status updating
* Silicons are now immuned to ear damages/deafness
* Only living mobs can now take ear damages/be deafened
* Simple animals are now healing ear damages/deafness at the same rate as other living mobs
* Fixes being able to hear AI announcements when deaf
2015-01-13 00:40:46 +01:00
carnie
6643519866 Resolves #6890 - Uses ETA for centcom->station, ETD for station, ESC for station->centcom, RCL for station->centcom(recall) 2015-01-10 01:11:49 +00:00
Cheridan
e4f42a2aef Merge pull request #6750 from phil235/VisibleMessageFixing
Fixes visible_messages.
2015-01-07 20:06:21 -06:00
tkdrg
1716a82400 Merge pull request #6794 from psykzz/patch-4
Cell() Update
2015-01-06 01:22:30 -03:00
Matt Smith
249e19b935 Cell() Update
Was being output straight to the user, it looked like that might cause the order to be wrong.
Doing this because it looks like the intended results.
2015-01-04 15:11:52 +00:00
carnie
a3f5e7ebfd Merge branch 'master' of https://github.com/tgstation/-tg-station into SubSystems
Conflicts:
	code/game/gamemodes/setupgame.dm
	code/modules/mob/living/carbon/human/life.dm
	code/modules/reagents/Chemistry-Machinery.dm
2015-01-04 01:52:14 +00:00
phil235
f6003e12b5 Fixes visible_messages. Now ghost will properly see visible_messages and will only see the audible part of a visible_message if the src is hidden inside a container.
Fixes people seeing visible_messages from a src that is in the dark or inside a container; and fixes people not seeing the message when they are in the dark but not the src.
2015-01-02 16:10:54 +01:00
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
Razharas
76a21883a8 Merge branch 'master' of https://github.com/tgstation/-tg-station into GenShit
Conflicts:
	code/game/mecha/mecha.dm
	code/game/objects/structures/tables_racks.dm
	code/modules/mob/living/silicon/silicon.dm
	code/modules/projectiles/gun.dm

Fixes dem conflicts
2014-12-28 11:20:15 +03:00
phil235
a89711b6e4 Reverting back to using the recursive get_hearers_in_view proc. 2014-12-22 22:37:16 +01:00
phil235
2481bef95f Changed the visible_message procs and audible_message procs, they now use the new get_player_mob_hearers_in_view() proc instead of a recursive proc.
I removed some duplicated code from tools/tools.dm

Fixed two typos with span class.
2014-12-20 17:29:23 +01:00
phil235
c667feeb61 Merge branch 'master' of https://github.com/tgstation/-tg-station into RecursiveHearVisibleMessage
Conflicts:
	code/modules/reagents/Chemistry-Holder.dm
2014-12-19 15:23:16 +01:00
Razharas
f0c8f2eeac Merge branch 'master' of https://github.com/tgstation/-tg-station into GenShit
Conflicts:
	code/modules/reagents/Chemistry-Reagents.dm

conflicts resolution
2014-12-16 02:52:08 +03:00
tkdrg
79e8ad4142 The singularity/narsie are no longer machines 2014-12-12 19:42:37 -03:00
Razharas
0921aa201f Added datum mutations
Also removed some mob vars like sdisabilities and merged the usability
with disabilities
Removed need for mutations var, they are not handled in dna
Removed blinded var, now its handled by eye_blind being bigger than zero
Ands lots, lots of other shit in files that used mutations
2014-12-12 04:48:11 +03:00
phil235
a6b24162e1 Fixes visible_message's blind_message only being heard by actual blind mobs and not by other mobs who just cannot see the src in the dark. Now all non-deaf people in hearing range who did not get the "visible" message will instead get the "audible" blind_message. 2014-12-04 13:02:53 +01:00
phil235
d545eb7f9f Visible_message() now uses recursive_hear_check so mob inside something can see those messages. Fixes being able to see visible_message w/o seeing the src of it (happened when the src could see us but not the other way around), you no longer see visible_message from mobs inside closets for example.
Fixes pAI being deaf.
Removing some no longer needed occupant_message() in mecha code.
Fixed some typos and span class here and there.
2014-12-04 01:08:04 +01:00
Swag McYolosteinen
501ecb1d2a Merge pull request #5945 from JJRcop/get_ghost-fix
Fixes unreported issue with get_ghost
2014-12-03 17:45:07 +01:00
tkdrg
3bb478f12f Includes antag HUDs in the datum hud overhaul
Makes hud_list associative, and introduces the /atom list hud_possible,
which lists all the possible hud images a certain atom can provide.

Replaces all the awful procs in the gamemodes with their new
/datum/atom_hud versions, which are much shorter, simpler and faster.
2014-11-20 15:43:51 -03:00
JJRcop
140d368918 Fixes unreported issue with get_ghost
Get_ghost was not returning the ghost if players were disconnected from the server while ghosted
2014-11-18 12:31:19 -05:00
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