Commit Graph

128 Commits

Author SHA1 Message Date
Swag McYolosteinen daa6fa89d0 Merge pull request #8014 from paprka/altclick2
Alt click for PDAs
2015-03-05 19:13:07 +01:00
Mandurrrh c52a630a17 Fixes GhostPDA bug making it show in lobby. 2015-03-02 20:52:46 -05:00
Mandurrrh da6d3fc2cd Creates a separate toggle for ghosts to see pda messages! 2015-03-02 10:57:25 -05:00
Mandurrrh e2d77899fa Change log and changes toggling ghostears to toggling ghostwhisper 2015-02-28 09:01:21 -05:00
Mandurrrh a0e19a466f Adds the ability to see pda messages with GhostEars toggled in deadchat. Port from bay. 2015-02-27 14:27:11 -05:00
paprka b7c19dbc11 alt click for pdas 2015-02-26 01:56:24 -08:00
Remie Richards 5fc7af7fbf attackby() now has an argument containing the parameters of the click that called it. Items placed on tables now center their icon where the user clicked. this is NOT true for racks, since racks look organised in their sprite.
Items reset their pixel_x and pixel_y values on pickup.
2015-02-19 13:02:43 +00:00
Deantwo 0e8156814f Font Define'ers Renamed
- Renamed font define'ers.
- Removed font duplicate define'ers.
2015-01-24 17:32:17 +01:00
Deantwo bfea67611e Pencode Changes Cleanup
- Moved the "parsepencode" proc from **newscaster.dm** and **PDA.dm** to
**text.dm** as a global proc.
- Made the "parsepencode" proc accept only a single agrument if desired.
- Removed the font constants from **newscaster.dm**, **PDA.dm**,
**paper.dm**, **paperbin.dm**, and **photocopier.dm**.
- Replaced aforementioned constants with define'ers in **misc.dm**.
2015-01-24 16:07:13 +01:00
Deantwo 1653ca900d Space Ups
I shouldn't have removed that space. Sorry space.

Oh and I jsut proved [xkcd 1296](http://xkcd.com/1296/).
2015-01-23 18:34:29 +01:00
Deantwo dc17f211f3 Version Numbers Update
- Incremented the messager's version number.
- Added a version number to NTRC.
- Removed "SS13" from NTRC's title.
2015-01-23 18:23:57 +01:00
Deantwo 2739dc0eb3 Scanned Image Warning
- Added a little warning so the user knows that some of the text
formatting will change when edited.
2015-01-23 17:20:54 +01:00
Deantwo b7a612b90f NTRC Fixes
PDA.dm:
- Set Nick maximum length was 7 when you started with a 8 character
nick. Input maximum length changed to 8 (9).
- Set Nick and Set Channel 's input are not trimmed.
- Set Channel now has it's input's spaces (" ") replaced with
underscores ("_") after trimming.
- Minor changes to NTRC Help.

chatroom.dm:
- All messages that begin with a "/" are now considered commands.
Feedback is given when a bad command is entered.
- Commands now take a fixed number of agruments. Feedback is given when
bad command agruments are entered.
- Added checks to prevent channel names like  "#".
2015-01-23 15:50:48 +01:00
Deantwo 396ff5c800 PDA Notekeeper 2.2
Notekeeper:
- Now uses [PenCode](https://tgstation13.org/wiki/Paper_BBCode) rather
than HTML.
- Now uses the same font as paper. Meaning that signature has a
different font, same as paper.
- Editing the notes now uses **stripped_multiline_input** proc.
- Cancelling the input box no longer deletes all the notes.
- Added a horizontal rule between the Edit button and notes section.
- Incremented the Notekeepers version number by 0.1 because of this new
notekeeper update.
- Scanning paper with your PDA now saves most of the content to the var
that is shown as default text in the edit input box.
- Scanning paper now states that it is saved to the notekeeper.
- Can no longer scan blank paper. User is notificed of this.

NTRC Chatroom:
- Set Nick now does not allow "" as a name, and cancelling the input box
doesn't delete the nick.
- Set Channel now has a length limit of 15 rather than 255.
- Message now does not send "" messages, and cancelling the input box
doesn't send a message.
- Added a horizontal rule between the buttons and notes section.

Other:
- Changed the **msg_input** proc to use **stripped_input**.
2015-01-22 23:15:08 +01:00
Deantwo 2a78daa8b5 Blank PDA Messages Fix
- Added "if (!t) return" after msg_input is called. So no blank
messages.
2015-01-19 20:10:21 +01:00
phil235 884e2a6f73 Fixes some runtimes from audible_message proc. Fixes silent PDAs calling audible message when receiving a message. 2015-01-14 18:00:17 +01:00
tkdrg 379b7b83fc Fixes a missed variable 2015-01-11 20:00:41 -03:00
tkdrg b852aa41ea Replaces a bunch of input() with stripped_input()
Some of these were exploitable for XSS, as well.
2015-01-11 19:02:53 -03:00
Remie Richards 005d79073a Merge pull request #6731 from tkdrg/ntrc_strikes_back
Adds an "unread message count" to the NTRC link
2015-01-06 07:22:45 +00:00
tkdrg 56a1d11162 Adds an "unread message count" to the NTRC link
Fixes #6720
2015-01-01 13:54:52 -03: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
tkdrg 0b4261e016 Merge pull request #6355 from AnturK/librarian_pda
Adds Librarian PDA cartridge
2014-12-27 01:44:49 -03:00
paprka 2371e2ebd8 renames chef to cook 2014-12-22 17:02:06 -08:00
AnturK e573f02acc Check trimming 2014-12-17 14:36:49 +01:00
AnturK a1f3a51dab Adds Librarian PDA cartridge 2014-12-14 13:59:35 +01:00
CorruptComputer 058e342e95 Added a cancel button to the PDA 2014-11-27 14:27:00 -06:00
Menshin ec944abfc6 * limit atmos/fire alerts to the current z_level
* atmos/fire alerts are now linked to an object and not its area, as intended
* simplified and full pathed the radio frequency datum
* made radio objects properly clean on del/qdel, instead of letting the radio controller remove nulls at each post_signal()
2014-11-14 10:10:45 +01:00
tkdrg a0b61707a4 NTRC (PDA chatrooms) bugfixes
Removed operator, revamped structure, fixed a lot of bugs

Adds myself to admins.txt
2014-11-04 22:47:48 -03:00
hornygranny 8b4ab665cb Merge pull request #5490 from tkdrg/hiasl
Nanotransen Relay Chat
2014-11-03 17:26:53 -08:00
phil235 4803f099f6 Fix lack of sound when non-silent PDA receive message. 2014-11-01 15:32:48 +01:00
tkdrg 7db4f1f9a2 Fixes chat channel bugs, removes PDA authentication because apparently our players are too dumb to not share passwords between ss13 and banking accounts 2014-10-29 23:00:23 -03:00
tkdrg cc96d09843 Adds NTRC help screen, fixes PDA /join bug that let you join multiple times without updating chat_channel 2014-10-29 20:50:08 -03:00
tkdrg 571a0953b4 Fixes chatroom runtime (thanks Gun Hog!), auto-adds # if the channel does not contain it already, obsoletes /new (its functionality is now included in /join) 2014-10-29 20:17:16 -03:00
tkdrg ab6ca61e2a Lets AIs and pAIs use the chatroom function in their built-in PDAs. 2014-10-29 19:32:23 -03:00
tkdrg 90d9dddf39 Merge remote-tracking branch 'upstream/master' into hiasl
Conflicts:
	code/modules/client/client procs.dm
2014-10-29 01:27:08 -03:00
tkdrg 3a862deb6b Adds chatroom logging (both admin and IC). 2014-10-29 01:20:53 -03:00
tkdrg 4d79788e24 Removes the <font> from NTRC errors 2014-10-27 11:46:19 -03:00
tkdrg 314617ea6d PDAs now have a Nanotransen Relay Chat client 2014-10-27 11:22:40 -03:00
GunHog 921143c078 ED-209 balance changes and bot tweaks
- ED-209's effective range has been reduced to 7, down from 12, to
prevent them attacking people off-screen.
- Ruthlessly nukes ".src" from the bot files, especially ed209bot.dm and
secbot.dm!
- Summoned bots now report on their department radio when summoned by
PDA.
- Bot radio frequencies now use the helpers instead!
- Officer Pingsky (On the MiniSat) is now set to declare his arrests on
the AI Private frequency, instead of Security.
- The remote_disabled var now prevents bots from being summoned or
controlled via PDA as well removing them from the AI's control panel.
- The AI can no longer re-activate a bot's remote control radio by
hacking it from the interface.
- The telescopic baton is now considered a safe weapon to carry and
wield by security bots.
- Added a small reminder to PDA users that bots can download access from
their ID to reach them.
2014-10-22 10:26:16 -05:00
GunHog 20bd9976b7 Merge remote-tracking branch 'remotes/upstream/master' into Botcall_TG_Edition
Conflicts:
	code/game/machinery/bots/bots.dm
	code/game/machinery/bots/cleanbot.dm
	code/game/machinery/bots/ed209bot.dm
	code/game/machinery/bots/floorbot.dm
	code/game/machinery/bots/medbot.dm
	code/game/machinery/bots/mulebot.dm
	code/game/machinery/bots/secbot.dm
	code/game/objects/items/devices/PDA/cart.dm
2014-10-21 18:06:04 -05:00
phil235 5fadf38aa6 Merge branch 'master' of https://github.com/tgstation/-tg-station into ed209fix
Conflicts:
	code/game/machinery/bots/ed209bot.dm
	code/game/machinery/bots/secbot.dm
2014-10-10 17:12:05 +02:00
phil235 f40edc5ce6 *FIX: the taser that ed209 drops on death looks full but is empty(need an update icon shit)
*FIX: issue4487 (lasersound)

*Fix: repairing bot with weldingtool off. Gives warning msg.

*FIX: medbot fleeing one step when using weldtool/holosword.

*Fix: attacking silicon w/ holosword no longer gives spark.

*FIX: attacking bot w/ holosword is an assault.

*FIX: bots produce spark when damaged via attakby, similar to borgs.

*FIX: attacking ED209 with weldingtool on harm now triggers the bot response to the assault.

*FIX: bots can produce sparks when hit by projectile w/ damage>0. (to have some feedback b/c there's no msg otherwise)

*FIX: ED209 doesn't try to tase monkey despite wanting to arrest.

*FIX: LaserTAG ED209 points at monkey despite not shooting/hunting them.

*FIX: we don't check projectiletype and sound each time we fire. (Now only when using New() or emagging/hacking/emp'ing) (also

simplifying code)

*FIX: cannot access behavior mode to toggle patrol on lasertag ED209 (despite the fact that it should be able to patrol.

*FIX: ED209 tases cuffed target that are standing.

*FIX: ED209 can stun through a closet! And, it can cuff through windows and closet.

*FIX: the handcuffing problem. (issue2025)

*FIX: no message when trying to screwdriver panel of bots open but it's locked.

*FIX: added one audible message instead of for+show

*FIX: make 'detain' mean stun repeatedly. (issuenumber???)

*FIX: After finishing summon order, bot goes patrolling even if no auto_patrol.

*FIX: ED209 cannot be summoned or appear on the PDA securitron interlink cartridge.

FIX: autocustom names for lasertag ed209s doesn't work (if you don't give them a custom name, it gives them a custom one from a

list)

Removing maxstuns var in process() proc of both ED and beepsky. It doesn't do shit.
Lasertag ED no longer calls look_for_perp(), the loss in reaction speed is minimal. And it no longer calls for infraction
Adding myself as game master admin list.
2014-10-10 16:34:26 +02:00
phil235 537280b4b9 Removing many instances of the no longer used second argument of message_admins() proc.
Replacing "for(var/mob/M in viewers()) M.show_message()" by "visible_message()" or audible_message()" in many places.
Changing a few span classes.
2014-10-05 01:29:30 +02:00
GunHog 589c1f4cbb Botcall, TG edition! 2014-09-25 09:44:41 -05: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
Cheridan 866dbb7959 Merge pull request #4634 from Carn/timSort
TimSort for byond
2014-09-07 19:52:02 -05:00
Miauw 7c97447d24 Balance changes to the sleepypen. 2014-09-05 18:24:25 +02: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
Miauw 78a9b0be69 Merge branch 'master' of https://github.com/tgstation/-tg-station into say()
Conflicts:
	code/__HELPERS/game.dm
	code/game/gamemodes/cult/runes.dm
	code/game/machinery/requests_console.dm
	code/game/machinery/telecomms/logbrowser.dm
	code/game/objects/items/devices/PDA/radio.dm
	code/game/objects/items/devices/aicard.dm
	code/modules/admin/admin_verbs.dm
	code/modules/assembly/holder.dm
	code/modules/assembly/voice.dm
	code/modules/mob/living/carbon/brain/brain.dm
	code/modules/mob/living/carbon/human/whisper.dm
	code/modules/mob/living/carbon/slime/slime.dm
	code/modules/mob/living/say.dm
2014-08-31 13:40:16 +02:00
Firecage 6c7af5eb32 SPANCLASSES!!!!! 2014-08-26 09:52:13 +02:00