Skip to content

Commit

Permalink
Refactor say.dm to remove unnecessary comments and improve readability
Browse files Browse the repository at this point in the history
  • Loading branch information
Superlagg committed Aug 11, 2024
1 parent 757ef12 commit d0b9840
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 25 deletions.
12 changes: 5 additions & 7 deletions code/__DEFINES/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,11 @@
\n\
- @ moves your name to that position in emotes and subtles. \n\
\n\
- ! at the start of a radio comm to emote over the radio \n\
\n\
We have added the following emoticons to say, add them to the end of your 'say' messages for say verb variation \n\
:), :(, :D, ;D, :P, :O, :|, :/, :S, :*, :3, :>, :<, :C, :L, <3, :X, :#, :$, \n\
:@, :^), :&, :!, :?, B^U, :B, :J, >:(, >:D, >:P, >:3, >:O, >:|, >:/, >:S, \n\
"
- ! at the start of a radio comm to emote over the radio "
// \n
// We have added the following emoticons to say, add them to the end of your 'say' messages for say verb variation \n
// :), :(, :D, ;D, :P, :O, :|, :/, :S, :*, :3, :>, :<, :C, :L, <3, :X, :#, :$, \n
// :@, :^), :&, :!, :?, B^U, :B, :J, >:(, >:D, >:P, >:3, >:O, >:|, >:/, >:S, \n
//Dan is the best, <3 ~TK
//put space before the \ so it reads properly
// use \ for readability, but one big line. \n for a new line. \n\ for a new line and readability.
8 changes: 4 additions & 4 deletions code/controllers/subsystem/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -729,12 +729,12 @@ SUBSYSTEM_DEF(chat)
cum += "<div style='width: 100%; border: [obs]px [obt] [obc]; display: flex; flex-direction: row;'>"
// first the head
if(giv_head)
// cum += "<div style='width: [img_size+20]px; background: linear-gradient([tgangle]deg, [tgc_1], [tgc_2]); border: [tbs]px [tbt] [tbc]; display: flex; flex-direction: row;'>"
cum += "<div style='width: auto; background: linear-gradient([tgangle]deg, [tgc_1], [tgc_2]); border: [tbs]px [tbt] [tbc]; display: flex; flex-direction: row;'>"
// now the profile picture
cum += "<div style='height: [img_size]px; width: [img_size]px;'>"
cum += "<img src='[m_pfp]' alt='x.x;' style='height: [img_size]px; width: [img_size]px; border-radius: 10px; margin-left: auto; margin-right: auto; margin-bottom: auto; text-align: center; object-fit: contain;'>"
cum += "</div>"
// cum += "<div style='width: auto; margin: 5px; padding: 5px;'>"
cum += "<img src='[m_pfp]' alt='x.x;' style='height: [img_size]px; width: [img_size]px; border-radius: 10px; margin-left: auto; margin-right: auto; margin-bottom: auto; text-align: center; object-fit: contain; padding: 7px'>"
// cum += "</div>"
cum += "</div>"

// now the body - the BottomBox
if(giv_body)
Expand Down
16 changes: 7 additions & 9 deletions testdoc4.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
<div style='width: 100%; border: 2px ridge #0c0c23; display: flex; flex-direction: row;'><div style='width: 130px; background: linear-gradient(315deg, #1b1b30, #303075); border: 1px solid #0c0c23; display: flex; flex-direction: row; padding: 2px;'><div style='height: 125px; width: 125px; border-radius: 10px; margin: 2px; '><img src='https://files.catbox.moe/4m71t6.jpg' style='height: 125px; width: 125px; border-radius: 10px; margin-left: auto; margin-right: auto; margin-bottom: auto; text-align: center;'></div></div><div style='width: 100%; background: linear-gradient(225deg, #1b1b30, #303075); border: 1px solid #0c0c23; padding: 2px; display: flex; flex-direction: column;'><p style='font-weight: bold; margin: 0;'><span style='color:#9f4835;'>Ward Buttersworth</span> <span style=' font-style: italic; color: #ef;'>says, </span></p><p style='margin: 0; color: #ef; id='Message'><span style='color:#9f4835;'>"Hello! You are hearing me talk. I am saying words. I am saying words to you. I am saying words to you in a friendly manner. I am not yelling, I am not whispering, I am not singing, I am not asking, I am not exclaiming. I am saying words to you, and you are hearing them. And now I am done. Hi."</span></p></div></div>
<!-- The above, but expanded for readability -->
<!-- The above, expanded foor readability -->

<div style='width: 100%; border: 2px ridge #0c0c23; display: flex; flex-direction: row;'>
<div style='background: linear-gradient(315deg, #1b1b30, #303075); border: 1px solid #0c0c23; display: flex; flex-direction: row;'>
<div style='height: 125px; width: 125px; border-radius: 10px; '>
<img src='https://files.catbox.moe/4m71t6.jpg' style='height: 125px; width: 125px; border-radius: 10px; margin-bottom: auto; text-align: center;'>
</div>
<div style='width: auto; background: linear-gradient(315deg, #1b1b30, #303075); border: 1px dotted #0c0c23; display: flex; flex-direction: row;'>
<img src='https://files.catbox.moe/4m71t6.jpg' alt='x.x;' style='height: 125px; width: 125px; border-radius: 10px; margin-left: auto; margin-right: auto; margin-bottom: auto; text-align: center; object-fit: contain;'>
</div>
<div style='width: 100%; background: linear-gradient(225deg, #1b1b30, #303075); border: 1px solid #0c0c23; padding: 2px; display: flex; flex-direction: column;'>
<p style='font-weight: bold; margin: 0;'>
<span style='color:#9f4835;'>Ward Buttersworth</span>
<span style=' font-style: italic; color: #ef;'>says, </span>
<span style='color:#9f4835;'>Ward Buttersworth</span> <span style=' font-style: italic; color: #eff;'>bas!</span>
</p>
<p style='margin: 0; color: #ef; id='Message'>
<p style='margin: 0; color: #eff;'>
<span style='color:#9f4835;'>"Hello! You are hearing me talk. I am saying words. I am saying words to you. I am saying words to you in a friendly manner. I am not yelling, I am not whispering, I am not singing, I am not asking, I am not exclaiming. I am saying words to you, and you are hearing them. And now I am done. Hi."</span>
</p>
</div>
</div>





11 changes: 6 additions & 5 deletions tgui/packages/tgui/interfaces/HornyChat.js
Original file line number Diff line number Diff line change
Expand Up @@ -984,12 +984,13 @@ const ProfilePicsTab = (props, context) => {
width="2em" >
--
</Box>
{` ${UserName}`}
<Button.Input
{` ${UserName} `}
<Input
content={PFPentry.CustomMessageVerb}
currentValue={PFPentry.CustomMessageVerb}
value={PFPentry.CustomMessageVerb}
defaultValue="says,"
onCommit={(e, value) => act('ModifyCustomMessageVerb', {
width="20em"
onChange={(e, value) => act('ModifyCustomMessageVerb', {
UserCkey: UserCKEY,
Mode: PFPentry.Mode,
NewVerb: value,
Expand All @@ -1011,7 +1012,7 @@ const ProfilePicsTab = (props, context) => {
}
value={PFPentry.CustomBlankVerb}
defaultValue="makes a cute face!"
onCommit={(e, value) => act('ModifyCustomBlankVerb', {
onChange={(e, value) => act('ModifyCustomBlankVerb', {
UserCkey: UserCKEY,
Mode: PFPentry.Mode,
NewMessage: value,
Expand Down

0 comments on commit d0b9840

Please sign in to comment.