Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged

Replays #7070

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions code/__DEFINES/quickwrite.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#define QUICKWRITE "quickwrite.dll"

#define QUICKWRITE_OPEN(filename) call(QUICKWRITE, "open_file")(filename)
#define QUICKWRITE_CLOSE(filename) call(QUICKWRITE, "close_file")(filename)
#define QUICKWRITE_WRITE(file, data) call(QUICKWRITE, "write_file")(file, data)
#define QUICKWRITE_CLOSE_ALL call(QUICKWRITE, "close_all")()

/proc/_quickwrite_check(res)
if(copytext(res, 1, 6) == "ERROR")
world.log << "<font color='red'><b>QUICKWRITE: [res]</b></span>"
return FALSE
return TRUE

/proc/quickwrite_open(file, data)
return _quickwrite_check(QUICKWRITE_OPEN(file))

/proc/quickwrite_close(file, data)
return _quickwrite_check(QUICKWRITE_CLOSE(file))

/proc/quickwrite_write(file, data)
return _quickwrite_check(QUICKWRITE_WRITE(file, data))

/proc/quickwrite_close_all()
QUICKWRITE_CLOSE_ALL
5 changes: 4 additions & 1 deletion code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
#define INIT_ORDER_PATH -50
#define INIT_ORDER_DISCORD -60
#define INIT_ORDER_PERSISTENCE -95
#define INIT_ORDER_DEMO -99 // To avoid a bunch of changes related to initialization being written, do this last
#define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init.

// Subsystem fire priority, from lowest to highest priority
Expand Down Expand Up @@ -124,7 +125,7 @@
#define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME)



// Truly disgusting, TG. Truly disgusting.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is frankly a beautiful macro, and you should shut up

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh oh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's art, you wouldn't UNDERSTAND

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

art

more like stinky


#define COMPILE_OVERLAYS(A)\
if (TRUE) {\
Expand All @@ -149,4 +150,6 @@
}\
}\
A.flags_1 &= ~OVERLAY_QUEUED_1;\
if(isturf(A)){SSdemo.mark_turf(A);}\
if(isobj(A) || ismob(A)){SSdemo.mark_dirty(A);}\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much performance have we lost because this isn't an else if 😆

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none you fucking spoon, stop wasting time on meaningless microops that get lost in the noise

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It gets called a LOT tbf

}
1 change: 1 addition & 0 deletions code/__HELPERS/_logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
/* Close open log handles. This should be called as late as possible, and no logging should hapen after. */
/proc/shutdown_logging()
rustg_log_close_all()
quickwrite_close_all()


/* Helper procs for building detailed log lines */
Expand Down
7 changes: 6 additions & 1 deletion code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
var/resolved = target.attackby(src, user, params)
if(!resolved && target && !QDELETED(src))
afterattack(target, user, 1, params) // 1: clicking something Adjacent

SSdemo.mark_dirty(src)
if(isturf(target))
SSdemo.mark_turf(target)
else
SSdemo.mark_dirty(target)

//Checks if the item can work as a tool, calling the appropriate tool behavior on the target
/obj/item/proc/tool_attack_chain(mob/user, atom/target)
Expand All @@ -20,6 +24,7 @@
if(SEND_SIGNAL(src, COMSIG_ITEM_ATTACK_SELF, user) & COMPONENT_NO_INTERACT)
return
interact(user)
SSdemo.mark_dirty(src)

/obj/item/proc/pre_attack(atom/A, mob/living/user, params) //do stuff before attackby!
if(SEND_SIGNAL(src, COMSIG_ITEM_PRE_ATTACK, A, user, params) & COMPONENT_NO_ATTACK)
Expand Down
6 changes: 4 additions & 2 deletions code/controllers/subsystem/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SUBSYSTEM_DEF(chat)
return


/datum/controller/subsystem/chat/proc/queue(target, message, handle_whitespace = TRUE)
/datum/controller/subsystem/chat/proc/queue(target, message, handle_whitespace = TRUE, confidential = FALSE)
if(!target || !message)
return

Expand All @@ -37,6 +37,8 @@ SUBSYSTEM_DEF(chat)
message = replacetext(message, "\t", "[FOURSPACES][FOURSPACES]")
message += "<br>"

if(!confidential)
SSdemo.write_chat(target, message)

if(islist(target))
for(var/I in target)
Expand All @@ -48,7 +50,7 @@ SUBSYSTEM_DEF(chat)
if(!C.chatOutput.loaded) //Client still loading, put their messages in a queue
C.chatOutput.messageQueue += message
continue

message = to_utf8(message, I) // yogs - LibVG
payload[C] += url_encode(url_encode(message))

Expand Down
Loading