Commit Graph

407 Commits

Author SHA1 Message Date
MrPerson
12eecfd181 Makes raw HTML and browser datum popups UTF-8 aware (#49066)
* Makes raw HTML and browser datum popups UTF-8 aware

Admin menus specifically really shouldn't break just because you named some guy "☺s the Clown"

* Fixed new_player.dm

* Fucking filing cabinets
2020-02-01 22:14:31 +01:00
AnturK
4fbf5b8118 Fixes pda manifest (#49115) 2020-02-01 04:42:51 -08:00
AffectedArc07
6f5c638764 Adds a not garbage PDA manifest (#48915) 2020-01-28 18:31:36 -05:00
Rohesie
7bef84f009 Mass-replacement of stat to machine_stat (#48758)
Living and machine stat vars are pretty different, one uses flags and other number-defines.
This should make some other mass-replacements and searches a bit easier.
2020-01-24 12:37:17 +13:00
MrPerson
f7eb2c905b Unicode awareness Part 2 -- copytext() (#48512)
* Unicode support Part 2 -- copytext()

This is the transition of all copytext() calls to be unicode aware and also some nearby calls in the same functions. Most things are just replacing copytext() with copytext_char() as a terrible character limiter but a few others were slightly more involved.

I replaced a ton of
````
var/something = sanitize(input())
something = copytext(something, 1, MAX_MESSAGE_LEN)
````

with a single stripped_input() call. stripped_input() already calls html_encode(), trim(), and some other sanitization so there shouldn't be any major issues there.

This is still VERY rough btw; DNA is a mess, the status displays are complete ass, there's a copytext() in code\datums\shuttles.dm that I'm not sure what to do with, and I didn't touch anything in the tools folder. I haven't tested this much at all yet, I only got it to compile earlier this morning. There's also likely to be weird bugs until I get around to fixing length(), findtext(), and the rest of the string procs.

* Makes the code functional

* Assume color hex strings are always # followed by ascii.
Properly encodes and decodes the stuff in mob_helpers.dm which fixes some issues there.

* Removes ninjaspeak since it's unused
2020-01-18 13:07:22 +13:00
MrPerson
e22560a346 update_icon() improvements (#48669)
* update_icon() improvements

Fixes some update_icon() calls to properly call parent and use update_overlays() and update_icon_state().

The rest of obj/item fuck it

* Suggested fixes, also passes the linter

* I always forget . = ..() is faster than return ..() FOR SOME FUCKING REASON

* Actually this is better

* Signilzes datum/action to update its icon when its connected item does.
2020-01-11 23:46:43 -05:00
MrPerson
d5b98c4d8d Unicode support Part 1 (#48304)
* Unicode support Part 1

Makes all calls to ascii2text() and text2ascii() unicode aware as well as all calls in code/__HELPERS/text.dm.

Adds defines for the footext_char() procs to maintain 512 support.

I did some cleanup on the text helpers since a lot of them were really, really bad.

reject_bad_text() and reject_bad_name() have an arg to reject non-ascii chars which defaults to TRUE.

* Give travis a more recent beta

* Ultimate compat
Added the _char procs I was missing
Test the build instead of the version because Lummox is a goddamn moron

* Suggested fixes, removes the last of the dd_ helpers

* Reading the reference is very important!

* Minor code improvements and a comment

* Typo
2020-01-07 09:25:47 +01:00
AnturK
e624cabe5d Fix various runtimes (#48563)
The grille one could use a lower level solution eventually. As in 
separation of simple animal attack/visuals/aftereffects but that's 
bigger refactor.

* Fixes explosion dismemberment runtime.
* Fixes removing pen from PDA runtime.
* Mulebot bullet act runtime.
* Trying to refuel plasmacutter with fuel runtime.
* Fixes grille runtime.
* Teslium reaction runtime
* lavaland elite win runtime
2020-01-04 22:13:10 -08:00
cacogen
f66a03c926 PDA cart swapping, eject hotkey and verb; toggle light action button (#48336)
* PDA cart swapping, eject hotkey and verb

* Update PDA.dm and action.dm

- Toggle light action button
- Proper use of mob/user instead of usr when appropriate
- Fixes UI not updating when ejecting or inserting cartridge or ejecting ID
- Makes toggle_light item action work with PDAs
2019-12-27 10:39:51 -05:00
skoglol
56acd336c6 Fixes pda sorting (#48176) 2019-12-10 10:40:55 +01:00
skoglol
8b366f8264 PDA can now sort by name or job (#47638)
* PDA can now sort by name or job.

* text fix

* name reverted
2019-11-16 18:33:31 +01:00
Rohesie
9dd28d5180 ID fix (#47387) 2019-10-30 16:17:55 -07:00
spessbandit
42766641f0 Buffs the mime. (Adds 30 new emojis, all emojis visible within PDA.) (#47420)
* buffs mime

* alphabetizes emoji list

* antur's redesign

* make that 24

* did I say 24 fuck that we're going 30
2019-10-30 01:55:03 -07:00
tralezab
fcf2dbfa02 [READY] Mime PDAs only accept emojis for messages, mime cartridge comes with an emoji guidebook (#47177)
* relic file

* Revert "Merge branch 'master' of https://github.com/tralezab/tgstation"

This reverts commit 826916d87b421dbb0ebcfce7fad96e456b6d3674, reversing
changes made to a0f476d874.

* mime pda

* hey maybe it works

* some steps forward

* IT WORKS HAHAHA YAAAAAAAAAAAAAAAAA

* logged properly in everything
2019-10-22 20:19:21 -07:00
kingofkosmos
228b4282ca Merge branch 'master' of https://github.com/tgstation/tgstation into misc_span_fixes1
# Conflicts:
#	code/game/objects/items/devices/PDA/PDA.dm
#	code/modules/mob/dead/new_player/new_player.dm
2019-10-13 15:21:17 +03:00
Arkatos1
5e47463792 Silicon PDA fix (#46922)
About The Pull Request

This PR makes it so that silicon PDA verbs like toggle ringer are given only to a silicons that actually have one, like AI or pAI. This is also consistent with other similiar silicon items, like silicon camera.
Why It's Good For The Game

Less bugs.
Changelog

cl Arkatos
fix: Only silicons with a valid PDA will now get PDA-related verbs.
/cl
2019-10-13 16:39:00 +13:00
kingofkosmos
280d416d4f Adds missing spans, missing periods and missing span endings. Also changes spans to suit the situation better. 2019-10-12 19:34:11 +03:00
nemvar
8cfe0f6467 Slightly improves visible and audible messages. (#46499)
* Doubtful improvement

* Switches out all the magic numbers with defines

* Thanks travis for finally finding a real error

* properly resolves some left over conflict
2019-09-18 12:52:18 +02:00
spookydonut
62b3fffe3b Removes unneeded client checks on GLOB.player_list contents (#46445)
About The Pull Request

All mobs in GLOB.player_list have clients attached and there is in fact a fair amount of code that is working fine without checking client on things in player_list. This pr just removes a bunch of checks for client when iterating over player_list.
2019-09-16 16:48:50 +12:00
Rob Bailey
2029163d33 playsound vary boolean define conversion (#46254)
About The Pull Request

Converts every single usage of playsound's vary parameter to use the boolean define instead of 1 or 0. I'm tired of people copypasting the incorrect usage.
Also changes a couple of places where a list was picked from instead of using get_sfx internal calls

This was done via regex:
(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\)) to match 1
(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\)) to match 0
full sed commands:
/(playsound\(.+,.+,.+, ?)1( ?\)| ?,.+\))/\1TRUE\2/ 1 to TRUE
/(playsound\(.+,.+,.+, ?)0( ?\)| ?,.+\))/\1FALSE\2/ 0 to FALSE

I'm not very good with regex and these could probably be optimized, but they worked.
Why It's Good For The Game

Code usability
2019-08-30 18:45:20 +12:00
Akrilla
c5b11dc283 Adds cancel buttons to inputs (#45825)
About The Pull Request

Adds cancel buttons to input boxes that didn't have them before.
Why It's Good For The Game

Good UX.
Changelog

cl
add: More cancel buttons.
/cl
2019-08-21 11:25:41 +12:00
nemvar
02251be5ac Turns Gibberish code into something that's not gibberish (#45753) 2019-08-09 11:32:32 +12:00
Akrilla
92b100a2d7 PDA now accepts ID card when in inventory (#45037)
* id card pda

* cleanup
2019-07-12 19:14:32 +02:00
Nick
a8197eb3dd Citations (#44853)
* Citations Step 1 - New Datacore Stuff

* Committing before merging with master

* Initial work on PDA messaging

* Adds support for automated PDA messages

This is just a flag that, when set, replaces the standard (Reply) href with a static "automated message" message

* Citations now generate PDA messages

The target of a citation will be notified via PDA message

* Escaping some non-optimal characters in PDA messages

* Creates a public warrant computer

Initial framework. Computer machine and circuit. Adds it to the DME.

* We're gonna flipflop on this for a while

* Removing unneeded functions

This is a read-only terminal, so we don't need to have all this code for managing entries and updating fields

* Whoops

So this is why byond was warning me about unused vars

* Need some help

Pushing this commit because I got this into a state where it doesn't work right

* Adds support to pay fines!

* Map changes. Adds a warrant console to the hallway outside the brig and law office on Box.

* Adds some checks to fine creation

* Aaaaand more work on paying citations

* Paying citations works! The money goes into the defense budget!

* More functionality and usability changes

* Adds warrant consoles to the rest of the maps

* Cleaning up text

* Rewrote warrant computer to be more up to date.

* Fines are capped to 1000 credits

* Requested changes

* Citations can now be paid with holochips and warrant consoles don't require your ID to be inserted.

* Fines can be paid from security record consoles, and more feedback messages

* Citation payments now actually go into the defense budget for real

* Removing even more unused code!

* Removes unused code (emp_act and ID handling)

* More unused code for the unused code gods

* ID card reference is now just fetching attached name.

* remove simple mob typepath kthx for the remove simple mob typepath kthx gods

* one usr, many M
2019-07-03 20:19:05 +02:00
Tad Hardesty
ba95173289 Fix keyword argument warnings 2019-06-26 01:59:57 -07:00
Shaps
8954265573 Agender fixes (#44597)
Credits to Europaisch for help finding all the records stuff

Fixes a few issues I was not aware of with my initial PR

* Being agender is now a distinct DNA value (fixes agender spessmen
  turning female when having their DNA referenced, like during cloning
  and some rudimentary transformations)
* Neatens up preference code, more in line with previous code, fixes
  an issue with male underwear not surviving preference loading and
  defaulting to female underwear
* Allows agender spessmen to change their facial hair with mirrors
* Change medical, personnel, and security records from sex to gender
  and add "Other" option (they currently display "plural" even for
  agendered species like ethereals)
* The -san honorific now applies to plural gender instead of just
  neuter with the Chinese Cartoons admin secret (highly important)

I have never really played genetics and only tested the DNA code with
cloning and rudimentary transformations while still in a body (which
causes it to reference the old body's DNA, like with cloning). Please
let me know if there's a better way to do this and/or if this is apt
to create issues.
2019-06-19 13:59:39 -07:00
vuonojenmustaturska
8ddc9677c7 examine-code refactor (#44636)
* 1/4 done? maybe?

* more

* stuff

* incremental stuff

* stuff

* stuff & things

* mostly done but not yet

* stuffing

* stuffing 2: electric boogaloo

* Git Commit and the Kingdom of the Crystal Skull

* make it actually compile

* found more stuff

* fixes

* fix AI laws appearing out of order

* fix windows

* should be the remaining stuff

* this time for real

* i guess it should compile too

* fix sechuds
2019-06-19 22:07:57 +02:00
Emmett Gaines
c3f95024b2 Gets rid of the GetComponent macros (#44220)
* Removes the GetComponent macros

* Regex replacement for GET_COMPONENT

Search: `GET_COMPONENT\( *(.+?) *, *(.+?) *\)`
Replace: `var$2/$1 = GetComponent($2)`

* Regex replacement for GET_COMPONENT_FROM

Search: `GET_COMPONENT_FROM\( *(.+?) *, *(.+?) *, *(.+?) *\)`
Replace: `var$2/$1 = $3.GetComponent($2)`
2019-06-04 17:39:58 +02:00
kingofkosmos
1bf60bbe06 Adds missing </span>'s. 2019-06-02 21:29:14 +03:00
JJRcop
bab214e892 PDA Message Server can be constructed (#43961)
About The Pull Request

I made a machine board for the PDA message server and added it to the telecomms techweb node. To keep the usefulness of the machine's password, a player built message server won't work until 15 minutes after construction. I've also converted a lot of magic numbers to defines, and changed the departmentType var on request consoles into a bitflag.

I'm open to ideas other than a time gate when it comes to keeping the server password's usefulness.
Why It's Good For The Game

You can't build a Message Server right now. If it's destroyed, PDAs may be knocked out for the rest of the round.
Changelog

cl JJRcop
add: You can now build a new PDA messaging server if you lose it.
tweak: Requests console messages no longer work if the messaging server is offline. Emergency alerts will still function in that case as long as the rest of telecomms is online.

/cl
2019-05-27 22:23:59 +12:00
vuonojenmustaturska
a844611ff4 removes an explicit uplink component check in favor of a signal in detomatix carts (#44023)
* yeets a GET_COMPONENT_FROM

* signal rather than component

* Update code/game/objects/items/devices/PDA/virus_cart.dm

Co-Authored-By: Emmett Gaines <ninjanomnom@gmail.com>
2019-05-20 19:43:42 -04:00
RaveRadbury
ade1a97e7c [READY] pAI HUD Overhaul (#43741)
* Initial overhaul work and some fixes.

Running into a bug with getting healthanalyzer variables to pass.

Signed-off-by: RaveRadbury <risforradbury@gmail.com>

* Fixes some typos, shortens a message

* Update pai.dm

* Prevents pAI OS from coming up in other windows.

* Moved around some camera stuff, trying to fix lost pAI zoom

* Fixes pAI zoom, adds camera flash

* PAI buttons grey out if they need software first

* Better greying out of buttons in PAI

* Removes unimplemented HUD stuff

* Should make pAI Host Scan require being held (like DNA check)

* Includes host scan as a greyed out hud

* Improved button loop

* Fixes pda icon off-set

* Fixed inconsistent indentation

* Replaces outdated and innacurate checks for scans

Thanks to Cobblestone for the help

* Refactor pAI hud button grey out

* Changes browse to browser

* cleans up the code, gets rid of an error

* Removes indent from #undef

* Removes an unneeded text-align:right
2019-05-18 23:06:29 +02:00
Rob Bailey
106cd26fc0 Small audio fixes (#43883)
* pure file fixes

* beep pitch fix

* duump eet
2019-05-11 18:09:00 +02:00
RaveRadbury
9a7eabbacc Change 'return' to 'return menu' so it works now (#43631) 2019-04-17 14:27:19 -04:00
RaveRadbury
369933d541 pAIs eject into hands (#43592)
Currently pAIs cannot be configured for DNA and secondary directives
while inside a PDA. If I need to eject my pAI from my PDA, why would I
want to drop it on the floor, especially when it hasn't been configured?

An activated pAI is too valuable to drop from your PDA directly to the
ground.
2019-04-14 21:41:48 -07:00
ShizCalev
1ebbab60ec Fix slippery oil never initializing, move some Initialize() to ComponentInitialize() (#43129) 2019-03-16 19:09:47 -07:00
ShizCalev
a46376e22d Merge pull request #43128 from Lett1/firebotpdafix
Adds firebots to robotics pda remote
2019-03-15 17:04:36 -04:00
Strommer Kilian
6d10fb67d6 And also to the rd and atmos pdas 2019-03-14 21:08:58 +01:00
Strommer Kilian
82b3a6d607 Add firebot access to the ce and captains pdas 2019-03-14 21:06:59 +01:00
Strommer Kilian
b323f40481 Update cart.dm 2019-03-12 08:04:19 +01:00
Tad Hardesty
1433e48eba Fix some proc calls with bad keyword arguments 2019-03-09 12:56:19 -08:00
Tad Hardesty
990e2c7bc2 Fix a few junk type annotations (#42985) 2019-03-07 10:58:05 +01:00
ShizCalev
8f060bb5fb Fixes PDA TK exploits 2019-02-08 03:21:36 -05:00
Tad Hardesty
3b2c0e27f7 Scope various unscoped locate() calls (#42195)
* Scope locate calls which are immediately checked against a list

* Remove silly use of locate from bible Topic

* Scope various locate calls (needs testing)

* More WIP

* Buff up lightswitches while we're here

* Tidy record browsing code

* Scope a few more locates

These have caused problems in the past (#41917, #39303). Continues #29349.

Also cleans up lightswitch code while I was already touching it.

I recommend a testmerge.
2019-01-06 20:39:27 +13:00
nicbn
c4213f13ab New() -> Initialize() (#41876) 2019-01-03 18:56:15 -08:00
ShizCalev
327a3d9927 Fixes sechuds not updating when inserting & removing an ID into/from a PDA/wallet/computer (#40826)
cl ShizCalev
fix: Fixed sechuds not updating when a user removes/inserts an ID from/into their PDA/wallet/computer while it's in their ID slot.
/cl
2018-10-17 23:45:35 +13:00
ShizCalev
b7739a4a23 Standardizes bomb logging (#40474)
Fixes #39976

A good number of things were missing various parts of the logging (going to GLOB.bombers, not going to client logs, not logging to game, ect), or doing incorrect things like passing admin verbs to saved logs.

Unified all the necessary actions under a single proc log_bomber() which handles everything in most use cases. This way the log isn't all jumbled up with inconsistent messages, everything's one format so you can quickly find what you need to bwoink the right person.
2018-10-01 15:03:00 +13:00
ShizCalev
1c10bd9256 Fix PDA light exploit (#40402) 2018-09-22 21:09:24 -07:00
AnturK
3084371f6d Failsafe uplink codes. 2018-09-16 13:35:43 +02:00
Patrick Chieppe
2c8248575a Logging system refactor and improvement (#39521)
* Refactor several log lines to use datum_info_line and atom_loc_line

* Add default return strings from datum_info_line and atom_loc_line

* Add parentheses around atom_loc_line data

* Change more logs to use atom_loc_line

* Add check in atom_loc_line for turfs to avoid calling get_turf on them

* Re-add removed 'at'

* Replace datum_info_line with key_name and atom_loc_line with loc_name

* Refactor logging functions

* Avoid double-logging self-interactions

* Fallback to simple stringification if all else fails in key_name()

* Rewrite muscle spasm logging to use log_message

* Standardize logging of martial arts

* Tweak individual logging panel look

* Fix individual logging panel source

* When I typed || I really meant &&

* Fix Telecomms logging always showing client logs in the panel

* Reverts addition of buggy ownership log to panel

* Remove colon

* Fix missing log_directed_talk tag

* Add warning for missing type in log_direted_talk

* Change warnings to stack_traces

* Add square brackets around fallthrough key_name() case to help parsing

* Allow atom arguments/src in log_*() functions

* Change log_combat call with null argument to log_message

* Change mecha types' log_message() arguments to match atom and mob version

* Add key_name() case for atoms

* Fix resist_grab() unsetting pulledby before log_combat gets a chance to use it

* Fix log_globally logic

* Add logging for hitting objects with items

* Move log_combat() to atoms.dm

* Use utility functions for object stringification in log_combat()

* Use utility functions for object stringification in log_combat()

* Add missing logs for interacting with display cases

* Rewrite log_combat() comment

* Add missing space in log_combat()

* Add logging for hitting grilles barehanded

* Add missing ..()
2018-08-12 21:41:09 +02:00