Commit Graph

715 Commits

Author SHA1 Message Date
Cheridan
882b376eb2 Code Cleanup! Moves Area-finding into a helper, uses a parent anomaly-event datum to cut down on repeated code! 2013-09-19 23:39:32 -05:00
Cheridan
d19e7f6493 Converts bluespace events into the anomaly system. Adds some sprites and polishes up some effects
Next up: Moving all of the anomalies into an event subtype to cut down on copied code!
2013-09-19 22:08:04 -05:00
Cheridan
115faf4954 Anomaly Neutralization
Anomalies can now be scanned to determine their frequency, and neutralized by sending a signal on that frequency.
2013-09-19 03:20:44 -05:00
Cheridan
4521b3f882 Merge branch 'master' of https://github.com/tgstation/-tg-station 2013-09-17 21:38:31 -05:00
supersayu
a993ce62db Bugfixen and minor changes. Fixes #136.
Adjusts the click code to not use client/Click().  The code is largely unchanged, except that it allows the compiler default behaviour of calling atom/Click(), and then forwards the call to mob/ClickOn().  I had some reports that melee combat mixed with movement was behaving oddly, and I believe it may be due to the use of client/Click; the byond documentation says that redefining client/Click() causes additional overhead, and it isn't strictly necessary.

Alters the way double clicks are handled, in an attempt to better handle clickspam, as often occurs during pitched combat.  This may also be responsible for the above, but I don't know.

Inserts proximity (aka flag) checks in all afterattack() procs.  The old assumption was that unless an item used the USEDELAY flag, afterattack() was only called when adjacent, but this is no longer true.  This led to beakers, soap, crayons, etc, all being usable at all ranges.

Removes the NODELAY flag, which was unused.  Removes all existing uses of the USEDELAY flag so that it can be readded to things that need extra delay.

Removes the hand_* procs, previously used by restrained actions.  Instead, the mob helper mob/RestrainedClickOn() has abosrbed basically all the functionality they were used for, which is really only monkeys with jungle fever.

Adds a special case of the Adjacency() proc for doors.  This fixes #136, airlocks being unreachable due to border fire doors.  However, this only takes us back to the unpleasant position where you have to open-hand the door, switch to a crowbar, and pry open the firedoor; it still needs a better fix.
2013-09-17 18:19:14 -04: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
Cheridan
2ee9e23ea9 Initial Event Rework
Adds anomalies, special effects which tie into the event system.

Ports bholes into an anomaly, cleans up their code.
Adds new gravitational anomalies. Imagine a trampoline.
Flux event is now an anomaly.
Adds a new pyro anomaly.
2013-09-17 15:46:00 -05:00
Cael_Aislinn
5ea4807d50 Merge branch 'torban' of https://github.com/Carn/-tg-station
Conflicts:
	code/modules/admin/IsBanned.dm

Signed-off-by: Cael_Aislinn <cael_aislinn@yahoo.com.au>
2013-09-12 11:49:40 +10:00
Aranclanos
c2c0d320ab Merge pull request #1310 from KazeEspada/sounds
Stop sounds
2013-09-08 05:11:34 -07:00
KazeEspada
53424fc84f Adds a new admin verb in the debug category called Silence Sounds. It can be used to stop all sounds currently playing. Useful if you need to diagnose if the sounds are the cause of lag, or if you play two sounds on top of each other. 2013-09-05 19:40:40 -07:00
Cheridan
a4b17f7ef3 Merge pull request #1246 from Intigracy/adminchangingstuff
Standardizing permissions for admins
2013-08-29 21:38:49 -07:00
Intigracy
0962cd2679 Start of standardizing required permissions for admins.
Using the dropdown menu / changing health / names of people in view variables now actually requires +VAREDIT.

Shuttle moving moved from +FUN to +ADMIN for convenience sake.

+ADMIN now required to view antagonists / law changes, before it was only required to check antags via verbs, which you could get around through the secrets menu.

+ADMIN Also now required to view all of the special information given about players in who menu (like antagonist status), but all admins can still see stealth keyed admins.
2013-08-28 15:51:45 -07:00
Cheridan
1ee6c4f5c7 Merge pull request #1166 from Carn/admin_ranks
Fixes #1147 (type-mismatch) +features
2013-08-28 11:57:21 -07:00
Cael Aislinn
2f698f5c7c Merge pull request #1197 from Cheridan/Admin
Admin Log Tweaks
2013-08-23 07:20:45 -07:00
Cheridan
ede4192a60 Removes the "Remove All Notes" options from Player Notes. Ckeys are cleared from the list automatically when the last of their notes are erased. 2013-08-22 16:07:10 -05:00
carnie
e217ef760e Randmutb will no longer select and mutate RACEBLOCK - mutagen, cloning, radiation-events etc will no longer cause this block to change.
IsBanned() now only processes the key into a ckey once...rather than several times.
2013-08-21 15:45:03 +01:00
Cheridan
dfa2750f41 The auto-notes which are added when a ban is applied won't cause logs. 2013-08-21 00:14:57 -05:00
Cheridan
be4625fce6 Admin Log Tweaks
-Wire cut logs are now accessed via the Investigate verb, instead of popping up in the admin chat log.
-Wizard Fireball explosions no longer create admin chat log messages either.

-Adding and removing Player Notes is now logged.
-The note that is added automatically to people who get banned, now displays the duration of ban.
2013-08-20 21:51:39 -05:00
Cheridan
bfeef72660 Merge pull request #1102 from Aranclanos/Linda
Linda.
2013-08-18 15:27:23 -07:00
Cheridan
4301afbc14 Merge pull request #1152 from Giacomand/removeprison
Removed unused prison shuttle code.
2013-08-14 22:08:48 -07:00
Giacomand
1a19dd6142 Merge pull request #1114 from Carn/data_records
Helper proc /proc/find_record(field, value, list/L)
2013-08-14 16:35:04 -07:00
carnie
bbe7354265 Fixes #1147 - type-mismatch
Added helper: /proc/findchar(haystack, needles, start=1, end=0)
works like findtext except it finds the first occurrence of one of the characters from the needles string, within haystack.

Permissions can now be removed as well as added, by replacing the + with a -. e.g. +BAN adds bans permissions, -BAN removes them. This applies to admin_ranks.txt and the permissions panel.

Verb overrides are now possible for admins_ranks. Specific verbs can be forced-on, or forced-off via keywords like +/client/proc/mimespeak or -/client/verb/ooc. This applies both to admin_ranks.txt and the permissions panel. SQL system is not compatible.

admin_ranks are now datums. This means admin_ranks actually behave more like permission groups as intended.
When you temporarily modify an admin's permissions via the permissions panel, their rank_name is appended with "([ckey])". This prevents modifications to their rights affecting everyone.

admin rank names now support - _ and @ characters (since ckeyEx() does not strip these).

SQL permissions system was modified. SQL databases will have to be updated or they will no longer work.

WARNING: admin_ranks.txt and admins.txt format has changed slightly! You will need to redo those txt files!
2013-08-14 18:10:26 +01:00
carnie
fc8ba2112d Removes TorBan.
Better alternatives are so cheap nowadays as to render it pretty useless.
2013-08-12 13:28:11 +01:00
Giacomand
d669aca5b6 * Removed unused prison shuttle code.
* Fixed an implant/prison computer runtime. Fixes Issue #1150.
2013-08-12 13:23:26 +01:00
carnie
ffa9bb51cd Helper proc /proc/find_record(field, value, list/L)
It will search list/L for a /datum/data/record with fields[field] == value, and return it.

This removes a vast amount of copypasta (there's still so much left in there though). It also removes all the locate(\ref[record]) I could find, which were normal used with topic(), meaning it was susceptible to abuse.

Secbots, ed209s and turrets are now smarter with their record-checks. They now prefer to use our face-name rather than id-name. ICly, this is the bot using facial recognition. This fixes an issue where it'd try to use the name variable which could be in the format "Unknown (as their id name)" when they were disfigured, etc. causing record-lookup to fail.

Additionally, these bots will treat those without a valid record in the security database, to be treated like criminals.
2013-08-11 12:49:55 +01:00
Carnie
48cdc61bcf Merge pull request #1095 from Giacomand/ion_fix
Ion Law Announcement Fix
2013-08-10 23:35:12 -07:00
Aranclanos
0ce01d1583 Adding Linda. 2013-08-10 06:15:14 -03:00
Cheridan
642194d4f3 Merge pull request #1082 from errorage/2013-08-07_clear_clients_from_lobby_at_round_end
Disconnects clients who have not joined the round before restarting
2013-08-09 13:31:13 -07:00
Giacomand
8d1e51dfda * Fixes the ion law verbs announcing twice or announcing when you didn't want it to.
* Cleaned up some code with it.
 * Small tweak to the job preference window size.
2013-08-09 01:45:14 +01:00
Giacomand
ef5f2f4b1d Merge pull request #1077 from Carn/misc
Misc
2013-08-08 11:37:38 -07:00
errorage
c32f56e750 - When clients in the lobby are kicked at round end, only afk clients actually get kicked.
- The admins now have the ability to kick all or just afk clients from the lobby
- When admins use this action, a list of kicked clients is sent to admins and into the log.
- Added a confirmation message to the admin command.
2013-08-07 18:09:38 +02:00
carnie
ada01c7e5f Reverting some accidental changes.
Medical consoles emp_act uses random_blood_type() random_name() etc, rather than hardcoded pick/rand.
2013-08-07 16:44:17 +01:00
errorage
134ba32236 - In an effort to decrease the number of unneeded client connections, I've made it so when the round ends, all the clients who are in the lobby get kicked before the restart. This is only effective when rounds end 'organically' (not when restart commands or votes are used, for example). The intention is to prevent people from leaving their computers on and connected indefinitely, because all clients contribute to the total. The assumption is that if you are in the lobby when the round ends, you have not participated in the previous round, meaning you are probably not actually present.
- Also added a button to the player panel, which allows admins to do the same thing. The admin's name is reported to all the kicked clients.
2013-08-07 03:15:44 +02:00
Giacomand
13d76e6da2 * Added a debug verb for counting non-turf instances during rounds.
* Added a category to the kaboom verb.
2013-08-04 21:42:36 +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
Intigracy
293fc7ce6c Removed the check in jobbans that prevented admins from banning each other. Everything is already logged up the yinyang, admins are able to regular ban themselves, even perma, and sometimes an admin NEEDS to be jobbanned for something. 2013-07-27 03:30:33 -07:00
Cheridan
a77d09131b Merge pull request #1023 from errorage/2013-07-25-adminhelps-to-irc
Admins without +BAN no longer stop adminhelp relaying to IRC.
2013-07-26 14:41:17 -07:00
errorage
23703d19ed Slight edit to the output format, it now writes AFK/TOTAL and IGNORED/TOTAL as an ignored admin might also be afk, so he'd be counted twice. 2013-07-26 23:03:44 +02:00
errorage
68c13044c7 - When determining whether to send an adminhelp to IRC or not, admins without +BAN are treated as 'not being there'. IRC messages now follow the format: "[original_msg] - All admins AFK ([admin_number_afk]) or skipped ([admin_number_ignored])" 2013-07-25 23:24:05 +02:00
Cheridan
8cd64ac05f Merge pull request #1002 from errorage/2013-07-22-permission-flags-expansion
Expands the max number of admin permission flags from 16 to 31
2013-07-25 10:44:00 -07:00
errorage
86a68cb55b - Expands the maximum number of admin permission flags you can have from 16 to 31.
To test: add these debug lines somewhere:

//START COPY PASTE

mob/verb/give_allrights()
	src.client.holder.rights = 393087

mob/verb/hasright()
	var/hi = input(src,"Choose a file to access:","Download",null) as null|num
	var/r = check_rights(hi, 1);
	world << "[r]"

mob/verb/checkrights()
	for(var/i = 0; i < 32; i++)
		var/n = 1 << i
		var/r = check_rights(n , 1);
		world << "has right 2^[i] = [n]? [r]"

//END COPY PASTE

Start the game, run 'give allrights', which doesn't give all rights, but some of the rights. 128 and 131072 are missing. Then you can either run 'hasright' to check whether you have the permissions that correspond to a user defined number, or you can run 'checkrights' to check for all 31 theoretical permissions.
2013-07-22 19:22:47 +02:00
Cheridan
9913df53d9 Merge pull request #996 from Giacomand/blob_userability
Blob usability changes and tweaks
2013-07-21 12:09:28 -07:00
Giacomand
1fb9227f77 Blob/AI cameras can now be followed by ghosts.
Added the blob to the check antagonists, displaying how many blobs are left to win and being able to show the player panel for the blob.
Gave overminds mind datums which will initialize to give the overmind a blob special role.
Re-worded the BE ALIEN candidate so that it is more abstract and could mean becoming a blob.
Added another message for when the infected crew is about to burst into a blob.
EMPs will now hurt the blob.
Fixed blob spores blocking the blob from expanding.
Nodes will also slowly recharge their health.
Gave a little bit of health to normal blobs so that lasers don't one shot them anymore, barely.
2013-07-21 15:13:43 +01:00
Cheridan
ccae8cf55a Merge pull request #981 from SuperSayu/snack_attack
Minor fix omnibus
2013-07-20 22:43:28 -07:00
supersayu
941631b664 Removes the spacevine-attack code 2013-07-18 23:22:32 -04:00
supersayu
78f5f96fa5 Fix for the grant_full_access that doesn't suck 2013-07-18 23:02:54 -04:00
supersayu
b7c13761ef Fixes a rare potential runtime for using the admin grant_full_access verb on a mob with something other than an ID in the ID slot. 2013-07-17 15:51:19 -04:00
errorage
5925d3a876 Added the ability to define the ip and computer id for a manual ban (in the banning panel). This is so mirroring bans or banning people who were not online during the round in progress does not require admins to spawn a mob, set their variables and then ban the mob.
If however an admin attempts to add a manual ban for a player who was present during the current round, a player who still has a mob somewhere in the game world, the proc will prioritize the mob's ip and computer id variables, not the things entered in the banning panel form.
2013-07-16 07:26:51 +02:00
KazeEspada
b2b2705c58 Merge pull request #925 from Giacomand/blob_vamp
Blob Gamemode Revamp
Blob gamemode is back and better than ever.
The blob is selected from be_alien candidates and is controled like a real time strategy game.
2013-07-09 21:33:29 -07:00
Giacomand
33e8976274 Removed the nuke code. You cannot nuke the station anymore.
Added a Jump to Node power.
Cleaned up the code.
Changed some more values.
Added a blob_act() to camera.
Removed most "if(gamemode == "blob") checks to stop people from using it to metagame.
Removed cells exploding when being blob_act()'d
2013-07-10 01:49:06 +01:00