Files
Polaris/code/_macros.dm
Aronai Sieyes 715de43f35 VChat: Redone chat output done in Vue.js (#6761)
* Better notifications

* Add buttons to del/move tabs in edit mode

* Add a <span> to emotes

* Fix duplicate IDs in VChat and add more logging

* VChat: Redone chat output in Vue.js

* Ported tg asset cache

* VChat DME Update

* Replace \image macro with bicon()

* NanoUI Subsystem Fixes

Don't do this, the asset subsystem does this for you

* Allow narrate/globalnarrate shenanigans

Allows HTML if your entire thing is HTML

* Disable bicon() icon object cache, and create text tag cache

* Ore Scanner is written incorrectly

Only revealed by vchat

* Fixes 2 VChat bugs

* Underline links in VChat

* Fix LOOC color

* VChat Improvements

Hopefully, anyway.
- Arbitrary font size setting
- Line height setting
- Multiple crush settings
- Rewrote how tabs work hopefully for performance
- Hidden messages are actually put elsewhere
- Attempts to correct chat backlog restore on rejoin

* Surgery steps to use <span>

* Some VChat Tweaks

- Chat remains between client reconnects if your client didn't close (so things like using the reconnect button, or autoreconnects at round end when that feels like working)
- The client doesn't send pings to the server, the server sends pings to the client. This fixes AFK measurements for AFK kick purposes.
- Turn latency indicator into a green/red indicator to show if you're connected, and when clicked will perform a one-time ping (and block doing it again for 10 seconds). It will display '?ms' if it never got a reply, or '999ms' if it did, but it was over 1s.

* Include date in filename for VChat log save

* Merge pull request #6767 from Cyantime/patch-2

Change chat export naming scheme

* Adds VChat tab saving

Saves every time you enter/exit edit mode. Persists between rounds, VChat reloads via verb, etc.

* Fix chat exporting when someone has used unicode

Only affects clients still using 512

* Use CLIENT_FROM_VAR for ease of code reading

* Update code/modules/client/asset_cache.dm

Co-Authored-By: Novacat <35587478+Novacat@users.noreply.github.com>

* Fix runtime when client disconnects before vchat loads

* Fix polaris version of command reports

* Fix LOOC color in oldchat

* Put some styles in various adminpm messages

* Round info and advanced who spans

* Fix missing tag-end

* Maybe fix images for linux and statpanel but also doom everyone

Co-authored-by: ShadowLarkens <ShadowLarkens@users.noreply.github.com>
Co-authored-by: Novacat <35587478+Novacat@users.noreply.github.com>
2020-03-27 14:07:28 -07:00

41 lines
1.9 KiB
Plaintext

#define span(class, text) ("<span class='[class]'>[text]</span>")
#define get_turf(A) get_step(A,0)
#define get_x(A) (get_step(A, 0)?.x || 0)
#define get_y(A) (get_step(A, 0)?.y || 0)
#define get_z(A) (get_step(A, 0)?.z || 0)
#define RANDOM_BLOOD_TYPE pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+")
// #define to_chat(target, message) target << message Not anymore!
#define to_chat to_chat_filename=__FILE__;to_chat_line=__LINE__;to_chat_src=src;__to_chat
#define to_world(message) to_chat(world, message)
#define to_world_log(message) world.log << message
// TODO - Baystation has this log to crazy places. For now lets just world.log, but maybe look into it later.
#define log_world(message) to_world_log(message)
#define to_file(file_entry, source_var) file_entry << source_var
#define from_file(file_entry, target_var) file_entry >> target_var
#define show_browser(target, browser_content, browser_name) target << browse(browser_content, browser_name)
#define send_rsc(target, rsc_content, rsc_name) target << browse_rsc(rsc_content, rsc_name)
#define open_link(target, url) target << link(url)
// From TG, might be useful to have.
// Didn't port SEND_TEXT() since to_chat() appears to serve the same purpose.
#define DIRECT_OUTPUT(A, B) A << B
#define SEND_IMAGE(target, image) DIRECT_OUTPUT(target, image)
#define SEND_SOUND(target, sound) DIRECT_OUTPUT(target, sound)
//#define WRITE_LOG is in logging.dm
#define CanInteract(user, state) (CanUseTopic(user, state) == STATUS_INTERACTIVE)
#define qdel_null(x) if(x) { qdel(x) ; x = null }
#define sequential_id(key) uniqueness_repository.Generate(/datum/uniqueness_generator/id_sequential, key)
#define random_id(key,min_id,max_id) uniqueness_repository.Generate(/datum/uniqueness_generator/id_random, key, min_id, max_id)
#define ARGS_DEBUG log_debug("[__FILE__] - [__LINE__]") ; for(var/arg in args) { log_debug("\t[log_info_line(arg)]") }