Commit Graph

15 Commits

Author SHA1 Message Date
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
Tad Hardesty
cf6f064e21 Use spritesheets to reduce time spent sending PNG assets by 90+% (#37399)
The total number of assets to be sent has been reduced from 1532 to 76, with time between first asset and last going from about 112s to about 7s (a 93% reduction) by my measure. The following assets have been coalesced:

    705 pipe images (used by RPD) -> 1 spritesheet + css
    595 research design icons (used by R&D console) -> 3 spritesheets + css
    116 OOC emoji + 15 language icons -> 1 spritesheet + css
    27 PDA icons -> 1 spritesheet + css
    11 paperwork stamps -> 1 spritesheet + css
2018-05-10 14:34:57 +12:00
Emmett Gaines
25080ff2c4 defines math (#33498) 2017-12-17 11:02:11 -05:00
Emmett Gaines
7c69cdcb8a Revert math (#33059)
* Revert "all this wrapping and it's not even christmas (#33035)"

This reverts commit faaf151580.

* Revert "fuck me for forgetting to graph this one"

This reverts commit 45d7acea2f.

* Revert "defines math"

This reverts commit 2817a1737b.
2017-11-23 20:59:52 -05:00
ninjanomnom
2817a1737b defines math 2017-11-22 17:36:58 -05:00
Kyle Spier-Swenson
f2cf4c2f5c [ready]Makes bIcon better (#29690)
Goonchat will use the asset cache, you now have to specify who to send the icons too.

Goonchat will now load icons in the background, displaying them once they load. this prevents the message from being delayed while the icons are sent.

Icons that aren't preloaded using the asset cache system will not render on ie8 clients. This is because of a ie8 bug that prevents changes on runtime created images from rendering.
2017-08-14 10:40:50 +12:00
Leo
5e07c55565 Fixes language icons on goonchat 2017-06-10 22:44:46 -03:00
Jack Edge
bf8bffcbe0 Codespeak language and manual
🆑 coiax
add: Syndicate agents can purchase a "codespeak manual", that teaches
them a language that sounds like a series of codewords. You can also hit
other people with the manual to teach them. One use per manual.
add: Nuclear operatives have access to a deluxe manual that is more
expensive but has unlimited uses.
/🆑

- DNM until we have language icons
- Syndicate codespeak only displays the language icon if you KNOW the
language, so you cannot tell the difference between someone just
shouting random codewords on the radio, and someone actually using the
language.
- Modifies generate_code_phrase to optionally return a list of words,
rather than a preformatted string.
- Codespeak manuals turn into random books after being used.
2017-05-14 15:55:52 +01:00
Joan Lung
5ce91a8230 Cultists of Nar-sie have their own language (#26952) 2017-05-07 08:06:38 -03:00
coiax
b633cd6ba2 Moves languages to a holder datum, gives mind its own language holder (#26776)
* Ghosts now have a language menu

🆑 coiax
add: Ghosts can now modify their own understood languages with the
language menu.
/🆑

- Language menu is now on /atom/movable, and can be opened by any atom
with the `open_language_menu` proc.
- Used for testing, and simulating what various station members hear.

* Language holders, I

* Language holder, II

* Dos line endings

* MIND LANGUAGES

* Fixes some mobs not having language holders in their minds

* Shadow languages

* How did you lose the holder?

* Mob level IC->Open Language Menu verb

* Gives draconic to silicons

* Lazy breeki

* Use of pre-initialized global lists for languages

* Fixes bugs with lazy holders
2017-05-05 15:12:27 +02:00
Jack Edge
99abdf5088 Fixes a number of bugs 2017-04-27 19:11:43 +01:00
Jack Edge
2cc290e31c Uses WJohnston's new fantastic icons 2017-04-25 21:07:41 +01:00
Jack Edge
e858379cce Language icons 2017-04-25 20:09:27 +01:00
Cyberboss
9e1ef0ffe2 Global variable wrappers (#25325)
* Add the system for managed global variables

* Travis ban old globals

* So you CAN inline proccall, that's neat

* Fix that

* master.dm

* Remove the hack procs

* Move InitGlobals to the proper spot

* configuration.dm

* Fix the missing pre-slash

* clockcult.dm

* This is probably for the best

* Doy

* Fix shit

* Rest of the DEFINES tree

* Fix

* Use global. for access

* Update find_references_in_globals

Always hated that proc

Whoever made it must've bee a r e a l idiot...

* __HELPERS tree

* Move global initialization to master.

Fix the declaration

* database.dm

* Dat newline

* I said DECLARATIVE order!

* Here's something you can chew on @Iamgoofball

* game_modes.dm

* Fix this

* genetics.dm

* flavor_misc.dm

* More stuff

* Do it mso's way. Keep the controllers as global

* Make master actually see it

* Fix

* Finish _globalvars/lists

* Finish the rest of the _globalvars tree

* This is weird

* Migrate the controllers

* SLOTH -> GLOB

* Lighting globals

* round_start_time -> ticker

* PAI card list -> pai SS

* record_id_num -> static

* Diseases list -> SSdisease

* More disease globals to the SS

* More disease stuff

* Emote list

* Better and better

* Bluh

* So much stuff

* Ahh

* Wires

* dview

* station_areas

* Teleportlocs

* blood_splatter_icons

* Stuff and such

* More stuff

* RAD IO

* More stuff and such

* Blob shit

* Changeling stuff

* Add "Balance" to changelogs

* Balance for changelog compiler + Auto Tagging

* Update the PR template

* hivemind_bank

* Bip

* sacrificed

* Good shit

* Better define

* More cult shit

* Devil shit

* Gang shit

* > borers

Fix shit

* Rename the define

* Nuke

* Objectives

* Sandbox

* Multiverse sword

* Announce systems

* Stuff and such

* TC con

* Airlock

* doppllllerrrrrr

* holopads

* Shut up byond you inconsistent fuck

* Sneaky fuck

* Burp

* Bip

* Fixnshit

* Port without regard

* askdlfjs;

* asdfjasoidojfi

* Protected globals and more

* SO MANY

* ajsimkvahsaoisd

* akfdsiaopwimfeoiwafaw

* gsdfigjosidjfgiosdg

* AHHHHHHHHHHHHHHHHHHHHHHH!!!!!

* facerolll

* ASDFASDFASDF

* Removes the unused parts of dmm_suite

* WIP

* Fix quote

* asdfjauwfnkjs

* afwlunhskjfda

* asfjlaiwuefhaf

* SO CLOSE

* wwwweeeeeewwwww

* agdgmoewranwg

* HOLY MOTHER OF FUCK AND THATS JUST HALF THE JOB?!?

* Fix syntax errors

* 100 errors

* Another 100

* So many...

* Ugh

* More shit

* kilme

* Stuuuuuufffff

* ajrgmrlshio;djfa;sdkl

* jkbhkhjbmjvjmh

* soi soi soi

* butt

* TODAY WE LEARNED THAT GLOBAL AND STATIC ARE THE EXACT SAME FUCKING THING

* lllllllllllllllllllllllllllllllllllllllllll

* afsdijfiawhnflnjhnwsdfs

* yugykihlugk,kj

* time to go

* STUFFF!!!

* AAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!!!!!!!!!!!!!

* ngoaijdjlfkamsdlkf

* Break time

* aufjsdklfalsjfi

* CONTROL KAY AND PRAY

* IT COMPILEELEELELAKLJFKLDAFJLKFDJLADKJHFLJKAJGAHIEJALDFJ!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

* Goteem

* Fix testing mode

* This does not belong in this PR

* Convert it to a controller

* Eh, fuck this option

* Revert controllerization Ill do it some other time

* Fix

* Working controllerization

* FOR THE LOVE OF CHRIST PROTECT THE LOGS

* Protect admins and deadmins

* Use the inbuilt proc
2017-04-06 23:26:13 -06:00
coiax
7554b5f454 Language datums; removes the talk wheel (#25333)
* Initial burst of languages

* Scratchings of beginnings

* Code review I

* Compilation!

* You can now understand your own speech

* Fixes whispering

* Gets typecaches working again

* Remie's `PASS`ing

* Back to pass() to stop the compiler whining

* Why can't drones check their languages

* Everyone speaks how they should

* Removes world string debug stuff

* Currently failing to massage radio code into working

* The radio transmits the languages!

* ,0 to talk common

* Replaces speech wheel with language menu

* Observers can speak all languages

* pAIs now speak languages FOREVER

* New action button for language menu

* pAIs have an action button to open their language menu

* AIs can talk and all that

* AIs have a language menu button

* Fixes supermatter making strange noises

* Fixes AI holopads

* Fixes request consoles

* Fixes bots making strange sounds

* Meaningless MMI change

* Some caching of datums

* Brains in MMIs speak common

* Ratvarian AIs can only speak Ratvarian

* Tables can speak common, apparently

* Removes var in args

* Fixes the (AI Eye) problem

Thanks to Shadowmobile for their help with this one.

* Fixes tape recorders

* Fixes humans being able to speak in languages they did not know

* Adds some new posibrain names

Honk.

* The voice analyzer replies in the language you spoke to it

* Gives swarmers only swarmer language

* `initial_languages` var.

* OMNITONGUE, clockwork restrictions

* Fixes barmaid and bardrone language abilities

* Code review I

* Omnitongue correction

* Code review II

* Removes force_compose var
2017-04-02 21:03:40 +02:00