-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update maptext #6867
Open
LetterN
wants to merge
10
commits into
Citadel-Station-13:master
Choose a base branch
from
LetterN:maptext
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
update maptext #6867
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5ee4259
maptext
LetterN 9df23a6
unused
LetterN 01c938d
buh
LetterN 1a89c33
status displays but better
LetterN cfbe9a6
Merge remote-tracking branch 'upstream/master' into maptext
LetterN 0c019d2
remove unused param
LetterN e1da097
Merge branch 'master' into maptext
silicons 5190057
Merge remote-tracking branch 'upstream/master' into maptext
LetterN 33dda19
drop message_language
LetterN 7c6d847
Merge remote-tracking branch 'upstream/master' into maptext
LetterN File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
#define CM_COLOR_SAT_MIN 0.6 | ||
#define CM_COLOR_SAT_MAX 0.7 | ||
#define CM_COLOR_LUM_MIN 0.65 | ||
#define CM_COLOR_LUM_MAX 0.75 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
/** | ||
* Gets a color for a name, will return the same color for a given string consistently within a round.atom | ||
* | ||
* Note that this proc aims to produce pastel-ish colors using the HSL colorspace. These seem to be favorable for displaying on the map. | ||
* | ||
* Arguments: | ||
* * name - The name to generate a color for | ||
* * sat_shift - A value between 0 and 1 that will be multiplied against the saturation | ||
* * lum_shift - A value between 0 and 1 that will be multiplied against the luminescence | ||
*/ | ||
/proc/colorize_string(name, sat_shift = 1, lum_shift = 1) | ||
// seed to help randomness | ||
var/static/rseed = rand(1,26) | ||
|
||
// get hsl using the selected 6 characters of the md5 hash | ||
var/hash = copytext(md5(name + GLOB.round_id), rseed, rseed + 6) | ||
var/h = hex2num(copytext(hash, 1, 3)) * (360 / 255) | ||
var/s = (hex2num(copytext(hash, 3, 5)) >> 2) * ((CM_COLOR_SAT_MAX - CM_COLOR_SAT_MIN) / 63) + CM_COLOR_SAT_MIN | ||
var/l = (hex2num(copytext(hash, 5, 7)) >> 2) * ((CM_COLOR_LUM_MAX - CM_COLOR_LUM_MIN) / 63) + CM_COLOR_LUM_MIN | ||
|
||
// adjust for shifts | ||
s = clamp(s * sat_shift, 0, 1) | ||
l = clamp(l * lum_shift, 0, 1) | ||
|
||
// convert to rgb | ||
var/h_int = round(h/60) // mapping each section of H to 60 degree sections | ||
var/c = (1 - abs(2 * l - 1)) * s | ||
var/x = c * (1 - abs((h / 60) % 2 - 1)) | ||
var/m = l - c * 0.5 | ||
x = (x + m) * 255 | ||
c = (c + m) * 255 | ||
m *= 255 | ||
switch(h_int) | ||
if(0) | ||
return "#[num2hex(c, 2)][num2hex(x, 2)][num2hex(m, 2)]" | ||
if(1) | ||
return "#[num2hex(x, 2)][num2hex(c, 2)][num2hex(m, 2)]" | ||
if(2) | ||
return "#[num2hex(m, 2)][num2hex(c, 2)][num2hex(x, 2)]" | ||
if(3) | ||
return "#[num2hex(m, 2)][num2hex(x, 2)][num2hex(c, 2)]" | ||
if(4) | ||
return "#[num2hex(x, 2)][num2hex(m, 2)][num2hex(c, 2)]" | ||
if(5) | ||
return "#[num2hex(c, 2)][num2hex(m, 2)][num2hex(x, 2)]" | ||
|
||
#define RANDOM_COLOUR (rgb(rand(0,255),rand(0,255),rand(0,255))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
TIMER_SUBSYSTEM_DEF(runechat) | ||
name = "Runechat" | ||
priority = FIRE_PRIORITY_RUNECHAT | ||
|
||
var/list/datum/callback/message_queue = list() | ||
|
||
/datum/controller/subsystem/timer/runechat/fire(resumed) | ||
. = ..() //poggers | ||
while(message_queue.len) | ||
var/datum/callback/queued_message = message_queue[message_queue.len] | ||
queued_message.Invoke() | ||
message_queue.len-- | ||
if(MC_TICK_CHECK) | ||
return |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lohikar will remember this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
runechat uses its own timer for qdel callback