Commit Graph

247 Commits

Author SHA1 Message Date
Giacomand
a1af8853be Merge branch 'master' of https://github.com/tgstation/-tg-station into pr/1640 2013-10-25 11:49:59 +01:00
dumpdavidson
7236f6dc0d Moved mime and clown rename code. 2013-10-24 19:05:31 +02:00
dumpdavidson
31aab08a80 Mimes can now rename themselves.
Stage personas are a thing for mimes as well as clowns.
2013-10-24 10:10:38 +02:00
S0ldi3rKr4s0
0c5a723097 pls go 2013-10-11 20:23:32 +02:00
S0ldi3rKr4s0
7b6c41b010 Long bangs from disability PR. 2013-10-11 19:52:27 +02:00
S0ldi3rKr4s0
f2e78631b3 2 new disability types, and fixes curly hair again. 2013-09-22 01:34:53 +02:00
S0ldi3rKr4s0
0e2f353a92 Curly fixed, cripples added. 2013-09-21 18:27:28 +02:00
S0ldi3rKr4s0
d556b40399 Adds a new hair, Curly (yeah not really that curly but still) 2013-09-20 23:47:40 +02:00
supersayu
475042a212 Click code rework
Fixes #646, #579, #863

Completely redoes the click code.  Moves all click related code into code/_onclick for reference.  Also moves hud datum code and all the screen object code I could find into code/_onclick/hud, as it is related.  Item attack(), attackby(), afterattack(), and attack_self() have been moved into item_attack.dm for consistency.

Completely removes dummy objects and adds atom.Adjacent(user).  This proc checks for border items and anything marked with throwpass for determining whether or not you can reach a given square.  A turf helper, ClickCross(), was added to facilitate this.

Removes the monolithic Atom.Click() proc in favor of an overridable click handler attached to mobs.  Click code no longer uses the : path operator as a consequence, and mob/lastDblClick has been moved to Client/next_click.  A few end arounds were necessary (screen objects, buildmode, and spells), but this has been handled by repurposing Atom.Click(); if you have special click code, insert it in the object's Click() function and return 1 to prevent normal processing.

This update adds support for attack_ghost(); the previous "new" click handler had support for it but was never finished.  I have taken the liberty of letting ghosts click portals, the gateway, and the teleporter to jump to the intended target square, and kept the previous default action of examine()ing every damn thing you click.  It is to be suggested that you could do more with this proc when ghost interactions are enabled.

This update also adds support for double clicking.  It is currently only used for ghosts and AIs, because the original (first) click still registers normally.  For both of these, double clicking a square will jump you to it, and double clicking a mob will follow it.  In the case of ghosts, double clicking bots and the singularity will also set you following it; if you double click your own corpse, you will re-enter it; this also works if your body is in a closet, sleeper, DNA scanner, etc.  Default mobs ignore double clicks as normal.

-- NOTE --

There are two flags which were previously unused or misused by click code: USEDELAY and NODELAY.  Ostensibly, USEDELAY would double the normal 1sec delay, and NODELAY would remove it.

Using either of these flags as intended would significantly affect the timing of the game.  In particular, USEDELAY is currently applied to guns and about everything else that acts at range.  I am adding USEDELAY as a half-second increase for now, but I have not put a significant amount of thought into it.  I considered lowering the normal 1sec delay to .8sec to balance it, but the consequences of that on combat involve more calculations than I care to make.

NODELAY seems to never have been used, and I did not implement it, but I could do so trivially.
2013-09-17 18:15:54 -04:00
d3athrow
33b90b805f Fixes identity bans, no longer will it cause everybody to have a random name and appearance 2013-09-11 00:58:49 -05:00
carnie
3317aa9fe3 Merge branch 'master' of github.com:tgstation/-tg-station into FUTURE_DNA_2
Conflicts:
	code/game/dna.dm  <-- leave this shit alone unless it's a small-tidy change. ffs.
2013-08-06 09:54:24 +01:00
Mark Aherne (Faerdan)
dacd5da81a Choose Profession
- Updated to new UI
- Put professions into columns to reduce the length of the window

Supply Ordering Console
- Updated to new UI
- Added "Main Menu" button to the top of all lists

Security Records Console
- Fixed colors (eyes should bleed less now)

Voting Panel
- Updated to new UI

Newscaster Unit
- Updated to new UI

DNA Modifier Console
- Overhauled UI to make it (slightly) more accessible

Airlock Control Console
- Fixed UI not updating automatically
- Updated to new UI
- Overhauled UI
2013-08-01 18:09:58 +01:00
carnie
02be173c60 Renamed variables:
b_type to blood_type
h_color to hair_color
f_color to facial_hair_color
f_style to facial_hair_style
h_style to hair_style
2013-08-01 13:48:41 +01:00
Carnie
b649b9070d Merge pull request #836 from Zelacks/hrefpreffix
New player option screen href exploit fix
2013-06-23 22:23:38 -07:00
Zelacks
8a605d1cc2 new_player href sanitization
Prevents players from modifying another player's preferences and
character setup.
2013-06-22 04:41:26 +08:00
Giacomand
1ba80dc764 * Made the lobby pre-game countdown timer a configuration option.
* Changed the default value to 120, to compensate for BYOND adverts and round restarts closing the client or kicking you randomly.
2013-06-20 20:45:24 +01:00
Ikarrus
1518d285e7 Standardized spelling of all instances of "Centcom"
Centcomm/CentComm -> Centcom
centcomm -> centcom
2013-06-17 20:49:01 -06:00
Cael Aislinn
cd36661610 Merge pull request #644 from Ikarrus/latejoin
Latejoining Antagonists
2013-05-31 23:25:06 -07: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
Ikarrus
2845065463 Adding lost pulls #590 #528 #574 #563 #529 2013-05-26 13:02:13 -06:00
Ikarrus
2dfb0ac9f0 Latejoiners can no longer be antagonists if:
[Number of antagonists] >= [Number of Players Joined] / [Scaling coefficient] + 1
2013-05-26 00:24:45 -06:00
Ikarrus
07590723d2 Gives latejoiners a chance of becoming a traitor and/or changeling depending on the game mode.
They will have the same chance of becoming an antagonist as round-start characters.

This function can be toggled off via server configuration.
2013-05-25 13:41:25 -06:00
carnie
cff9ed5f71 >Resolves some dna runtimes. - check_dna_integrity() was not being used properly.
>Removed a for(obj/item in world) loop triggered by bloodying items. It now uses a caching system.
>New skin_tones - they are now sprite-based. This is to prepare for expansion of the mutantrace system. Thanks validsalid x
>Removed fat icons from the game - when you are obese you will now just look like a regular human. You will not be immune to being pushed. You will not be immune to choking. You will still overheat and run slower and appear fat upon "examine" verb use.

Modified   code/__HELPERS/mobs.dm
Modified   code/game/atoms.dm
Modified   code/game/dna.dm
Modified   code/game/machinery/computer/hologram.dm
Modified   code/game/objects/items.dm
Modified   code/modules/client/preferences.dm
Modified   code/modules/client/preferences_savefile.dm
Modified   code/modules/flufftext/Hallucination.dm
Modified   code/modules/mob/living/carbon/alien/larva/larva.dm
Modified   code/modules/mob/living/carbon/human/human.dm
Modified   code/modules/mob/living/carbon/human/human_defines.dm
Modified   code/modules/mob/living/carbon/human/life.dm
Modified   code/modules/mob/living/carbon/human/update_icons.dm
Modified   code/modules/mob/living/carbon/monkey/monkey.dm
Modified   code/modules/mob/living/silicon/robot/robot.dm
Modified   code/modules/mob/living/simple_animal/constructs.dm
Modified   code/modules/mob/living/simple_animal/friendly/corgi.dm
Modified   code/modules/mob/living/simple_animal/friendly/farm_animals.dm
Modified   code/modules/mob/new_player/preferences_setup.dm
Modified   icons/effects/genetics.dmi
Modified   icons/mob/human.dmi

Signed-off-by: carnie <elly1989@rocketmail.com>
2013-05-08 08:20:15 +01:00
carnie
043028db83 Resolves #283
DNA modification uses normally distributed random numbers. Radiation strength dictates the standard deviation of the change in the hex character which is hit (higher output means greater chance for a large change) . Similarly, radiation duration dictates how likely we are to hit the hex-character we clicked on (longer duration means more likely to hit). Irradiation is strength*duration. All balancing is done via multiplier defines so you can rebalance it easily.

DNA blocks and structuring all use defines. Making modification/expansion easier. I'll likely expand this into a datum-based system to allow more interesting features, reduce code further and allow admins to interact with the way dna strings behave.

DNA strings can be spliced together using merge_text().
 e.g. string 1: "Hello World"
 string 2: "Seeya______"
 result: "Seeya World"
 This isn't used except for admin-spawnable SE injectors at the moment.

r_hair, g_hair, b_hair, r_facial, g_facial, b_facial, r_eyes, g_eyes, b_eyes were removed and made into 3 short hex-colors.

Skin tones now support colours other than shades of brown. I've had to restrict it heavily until other stuff is done. Skin tones include Albino Caucasian, Oriental, Mediterranean, etc.

Data disks and DNA injectors were reworked to use associative lists so transferring data is just a matter of doing list.Copy()

var/dna is now defined at /mob/living/carbon level. Only monkeys and humans may have dna currently. Support is there for all carbon-based lifeforms to have dna.

DNA modifier console has almost all controls on one screen.

UIs and UEs can be injected separately (appearance and name, respectively)

dna helper procs like ready_dna() and such were changed to make them more versatile. There is now a hardset_dna() proc as an alternative to ready_dna which can initialize dna with properties passed into it or update an existing dna string (useful for cloning and antag spawning)

Every block of SEs are in randomised positions.

Disabled automatic logging of world.log, as it produced undesirable behaviour.

Mr Muggles and God Emperor of Mankind disks removed.

Floor() removed. (it was completely uneccesary, that is what round() is).

Fixed spelling mistakes in modularchangling.dm (thanks tenebrosity)

Tanning removed from beaches (again)

Experimental: monkeys and humans do not have dna until first attempt to read dna (using check_dna_integrity(mob))
This is mainly due to the way everything is hardcoded into New().

Changelog.html updated
Signed-off-by: carnie <elly1989@rocketmail.com>
2013-04-24 09:37:30 +01:00
Cael Aislinn
bdfc088f91 Merge pull request #181 from Carn/Issue105
Partial solution to #105. Will fix a bunch of mislinks in admin toolpanels + PM system.
2013-04-02 19:05:47 -07:00
Cheridan
255fe983dd Hair Update Attempt 2
makes some hairs look better
adds fiveoclock shadow beard
2013-04-02 12:15:39 -05:00
Pete Goodfellow
842d9028d3 Merge branch 'master' of github.com:tgstation/-tg-station
Conflicts:
	code/modules/mob/new_player/new_player.dm
2013-04-01 16:29:36 +01:00
Pete Goodfellow
6831ab046c Added a configuration option to force random names. This replaces the gameticker var/random_players. The 'Make everyone random' verb works as it did before. 2013-04-01 00:17:15 +01:00
carnie
66e6a2dbf0 Mobs each now have a unique tag which are not after they are deleted (unlike byond's \ref[] macro)
Since tag replaces the output of the \ref[] macro, this means that menus which use hrefs with \ref[mob] will no longer be able to accidentally link to the wrong mob.
The tags are of the form "mob_475" etc

Admin_pms now use ckey instead of client-reference. This means that PMs will no longer accidentally get sent to the wrong people.
There is no risk of players using hrefs to send adminhelps to known admin ckeys to see if they are online (as I'd already changed the PM system to not tell non-admin users whom received their message).

key_name() now accepts text input (key or ckey) - it is slightly more efficient to feed it a client or mob however!
This functionality is provided to allow certain admintools to become more robust when we want to talk about e.g. a griefer whom has just DCed whom no-longer has a corpse (no client/mob...just a ckey reference).
key_name() now reports DCed players properly.
2013-03-31 11:26:22 +01:00
carnie
732d72e227 Merge branch 'master' of github.com:tgstation/-tg-station into pr/151
Conflicts:
	code/modules/mob/new_player/new_player.dm
2013-03-28 18:35:37 +00:00
Pete Goodfellow
fe3cc313f6 Adds name/appearance bans. They're based on jobban code, but prevent the banned player from using their preset names and appearances.
Also corrects a spelling error (Indentity) in the char prefs panel.
2013-03-28 15:51:35 +00:00
carnie
5ca166cae0 Refactored underwear to use datum/sprite_accessory/underwear similar to hair and facial_hair.
People may select any underwear (regardless of gender) at a dresser, but not in preferences.
random_underwear(gender) will return a random pair of underwear suitable for your gender.
Removed an unused variable in sprite_accessory

The new_player preferences screen now randomizes character slots for which there is no data (so no more bald, fat, white guys in diapers greeting new players)
datum/preferences character settings are randomised at New().
replaced /datum/preferences/proc/randomize_appearance_for(human/H) with /datum/preferences/proc/random_character(), it does the same stuff without the copying to a mob. Basically, now when you want to make a random character you just do var/datum/preferences/A = new(); A.copy_to(human_mob), randomisation of appearance and name will already be done. Easy.

Reworked the savefile updating/versioning code to make it easier to work with. I've used it to update underwear preferences to the new system as an example.

Signed-off-by: carnie <elly1989@rocketmail.com>
2013-03-28 11:11:40 +00:00
Cheridan
10bd174a03 Underwear update! Adds two new undie styles, a modest tankini for ladies and red briefs for the guys.
Adjusts a couple hardcoded lines to make adding more undies in the future easier.
Adds dressers! Similar to mirrors, they let you change your underpants.
2013-03-27 00:08:45 -05:00
MrPerson
a88b30ab31 Removed mind.original
All usage of it on silicons is replaced by is_special_character()
is_special_character moved from admin.dm to mob_helpers.dm
Also fixed a runtime having to do with objectives.
2013-03-11 05:40:21 -07:00
giacomand@gmail.com
edbae4d9d5 - More runtime fixes.
- Committed carn's fix to events happening every 5 minutes, on the dot.
 - Changed some more turf which play sound so they do not play to everyone in the area.
 - Made the join screen a little bigger for the "view player polls" option.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5801 316c924e-a436-60f5-8080-3fe189b3f50e
2013-03-02 16:51:57 +00:00
giacomand@gmail.com
46dc7d6084 Committing Faerdan's UI overhaul. Includes a UI browser class to easily manage and standardize user interfaces. This first release does not convert all the user interfaces in the game but only most of them. You can find samples of these user interfaces here: http://imgur.com/a/5dr6E
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5794 316c924e-a436-60f5-8080-3fe189b3f50e
2013-02-27 20:02:42 +00:00
baloh.matevz@gmail.com
4b5b5ea87e - Added a config option that requires players to have played a certain number of days to select some jobs to play. The option is turned off by default and requires the database to work. See screenshot for default age requirement.
- When players connect, the database is polled for their age, accounts matching their ip and computer id. This information is stored in their client datum.

Screenshot: http://www.ss13.eu/account%20age%20restriction2.png

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5552 316c924e-a436-60f5-8080-3fe189b3f50e
2013-01-15 03:39:46 +00:00
baloh.matevz
77afc4383d Removed some world << "" debug messages from multichoice polls.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5373 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-22 09:56:10 +00:00
baloh.matevz
43ee6cf5d2 - Added the ability to have multiple choice player polls.
- Added two new verbs to 'debug verbs'. The first outputs everything in the jobban records list to standard output, the 2nd applies a filter and only prints the things that contain the word.
- Fixed an old jobban bug which only checked if someone's ckey ends with the bannee's ckey to jobban them from the job. So perrorage getting banned would result in errorage having the ban in effect too.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5338 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-16 03:29:06 +00:00
petethegoat@gmail.com
3ac67f339a Fixed randomised appearances being batshit crazy.
Improved the janicart a bit. It should be less cursed now.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5264 316c924e-a436-60f5-8080-3fe189b3f50e
2012-12-05 22:27:16 +00:00
elly1989@rocketmail.com
73b54b017b Removed mob/var/UI, it now uses client.prefs.UI_style
Removed var/constant/Pi It's already defined in setup.dm
Moved a bunch of global_lists to global_lists.dm
Fixed hair randomisation. (still bits to do)
Moved a lot of preferences_setup.dm stuff into __HELPERS/mobs.dm They'll be FAR more helpful as generic procs, rather than something tied to preferences.
Merged mob/var/nopush into status_flags with the CANPUSH flag
Merged mob/var/nodamage into status_flags with the GODMODE flag
Removed mob/var/be_syndicate and mob/var/be_random_name as they are not used.
Added /proc/ui_style2icon(ui_style) proc. It converts a string like "Midnight" into its corresponding dmi file. The code fore creating a new hud uses it.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5164 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-22 15:22:08 +00:00
elly1989@rocketmail.com
1aaf44e076 Moved a lot of preference related toggles to the Preferences verb tab.
You can now modify specialrole candidacy mid-round and it will save changes to your savefile.
Added a BE_NINJA flag. Doesn't do anything yet. If somebody wants to implement it, go for it.
Moved prefrences stuff from new_player to the folder /code/modules/client/
Renamed toggles so they appear in a nice order.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5146 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-21 08:06:44 +00:00
elly1989@rocketmail.com
2e68af07c1 Merged listen_ooc, seeprayers, STFU_ghosts, STFU_radio, deadchat, sound_adminhelp, ghostears, ghostsight, canplaysound, midis, no_ambi and lobby_music into client.prefs.toggles as bitflags.
Toggling these preferences in-game will update your savefile. Meaning that your preferences will persist between rounds.

Added some savefile_version updating stuff. It's pretty crude. If you're changing any of the savefile stuff just ask and I can change it/help.

Removed some unused client vars

Ghosts no longer hear ambience. Simplified ambience code.

Simplified lobby music code. It will no longer cause a massive queue of events (which would eventually balloon in memory use)

Moved ooccolor and sound_adminhelp back to prefs. It's easier and allowed me to remove the setupclient() stuff completely.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5143 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-21 05:58:04 +00:00
elly1989@rocketmail.com
99d3d9c900 Fixes a runtime caused by observing a round. eek
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5129 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-20 07:08:27 +00:00
elly1989@rocketmail.com
27a53e211b removed client/var/be_alien and client/var/be_pai, everything now uses client.prefs.be_special
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5126 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-19 18:35:14 +00:00
elly1989@rocketmail.com
14ed3f155b Mutes are now in datum/preferences. That means they are persistent! You can't avoid them by logging out you naughty little spammers.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5124 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-19 17:09:05 +00:00
elly1989@rocketmail.com
599430c3ff Re-added warnings. Admins can now give players formal warnings via the player panel. Even when they are offline. These warnings can no longer be reset by logging out.
The number of strikes a person gets is a define so hosts can modify it to their liking (I should probably move this to a config option but I can't be bothered to test it again). It defaults to 3 strikes, on the third strike you're out. It'll autoban you for 10 minutes.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5123 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-19 16:48:03 +00:00
elly1989@rocketmail.com
30357d18ce SANITY: Created a series of generalised sanity procs. They can be found in code/__HELPERS/sanitize_values.dm
They include such procs as sanitize_integer(num, min, max, default) which will check num is a number, round num to make it an integer, then check if it is between min and max (inclusive). If it fails the bound-checks it will return default. There are others, have a look.

PERSISTENT PREFERENCES: Every ckey which connects to the game gets its own persistent /datum/preferences datum.
It is archived in var/list/preferences_datums = list("ckey" = datum)
At connect it is automatically associated with the client defines.dm (or a new one is created if it can't find an archived prefs datum). This means clients will ALWAYS have a var/datum/preferences/prefs which references this datum. So you can use it without checking if(client.prefs)
This has simplified only a few bits of code. It will however, allow us to make preferences like see_deadchat ghost_ears etc, persistent. So they will not reset when you DC.

SAVEFILES: Changed the player savefile code a lot. Hopefully I've not fucked it up too much. Every single variable loaded from saves is now sanity checked using the new sanity procs. This should help prevent savefiles becomming obsolete by sanitizing input to meet current requirements, without deleting all the ok variables and making you start from scratch >_> NOTE: I still need to sort out the savefile version stuff. I'll probably figure it out before the server updates anyway. It sees to be fine without it.

You can no longer choose your blood type. It is randomised (with each bloodtype having a realistic probability of occuring). This is to make blood analysis (detective/medical) less pointless. It is chosen as soon as you connect. It remains persistent throughout each round so you won't be able to change it by logging in/out over and over.

Replaces some copypasta code with is_afk() (still a fair bit to do)

There are new hyperlink shortcut things. _src_=vars will direct your hyperlink to viewvars. _src_=prefs to your preferences datum. (These are the only way to access those bits of code via links). This means that the overall amount of operations in almost every Topic has pretty much halved and is much prettier.

Replaced and removed adminplayervars from datum/admins/Topic. It was superfluous. They now all point directly to the viewvars code using _src_=vars

Removed the changelog popup at round start. Instead a button on your game-window will glow white if there are new updates. To peruse at your convenience. This will speed up connect times.

Removed the AFK_THRESHOLD define. It is integrated into is_afk() now.

TODO: remove the prefs stuff from mobs and clients and update code to use client.prefs to access that info.



git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5121 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-19 15:13:57 +00:00
elly1989@rocketmail.com
0bca943424 Fixed OOC color being missing from the preferences screen (was using the wrong flag, changed from FUN to ADMIN)
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5097 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-17 16:00:52 +00:00
elly1989@rocketmail.com
50fbfa0c35 As per SoS' request, added a config option ALLOW_ADMIN_OOCCOLOR. If commented out, admins won't be able to have their own personal ooc colours (it will use the default dark red colour).
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5056 316c924e-a436-60f5-8080-3fe189b3f50e
2012-11-13 19:28:31 +00:00