Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into station_traits
This commit is contained in:
@@ -161,6 +161,10 @@
|
||||
if (CONFIG_GET(flag/log_telecomms))
|
||||
WRITE_LOG(GLOB.world_telecomms_log, "TCOMMS: [text]")
|
||||
|
||||
/proc/log_econ(text)
|
||||
if (CONFIG_GET(flag/log_econ))
|
||||
WRITE_LOG(GLOB.world_econ_log, "MONEY: [text]")
|
||||
|
||||
/proc/log_chat(text)
|
||||
if (CONFIG_GET(flag/log_pda))
|
||||
//same thing here
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
///Returns whether or not a player is a guest using their ckey as an input
|
||||
/proc/is_guest_key(key)
|
||||
if(findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
|
||||
return FALSE
|
||||
|
||||
var/i, ch, len = length(key)
|
||||
|
||||
for(i = 7, i <= len, ++i) //we know the first 6 chars are Guest-
|
||||
ch = text2ascii(key, i)
|
||||
if (ch < 48 || ch > 57) //0-9
|
||||
return FALSE
|
||||
return TRUE
|
||||
@@ -79,6 +79,12 @@
|
||||
var/datum/emote/E = new path()
|
||||
E.emote_list[E.key] = E
|
||||
|
||||
for(var/path in subtypesof(/datum/bark))
|
||||
var/datum/bark/B = new path()
|
||||
GLOB.bark_list[B.id] = path
|
||||
if(B.allow_random)
|
||||
GLOB.bark_random_list[B.id] = path
|
||||
|
||||
// Hair Gradients - Initialise all /datum/sprite_accessory/hair_gradient into an list indexed by gradient-style name
|
||||
for(var/path in subtypesof(/datum/sprite_accessory/hair_gradient))
|
||||
var/datum/sprite_accessory/hair_gradient/H = new path()
|
||||
|
||||
@@ -138,6 +138,25 @@ round(cos_inv_third+sqrt3_sin, 0.001), round(cos_inv_third-sqrt3_sin, 0.001), ro
|
||||
var/sinval = round(sin(angle), 0.001); var/cosval = round(cos(angle), 0.001)
|
||||
return list(cosval,sinval,0,0, -sinval,cosval,0,0, 0,0,1,0, 0,0,0,1, 0,0,0,0)
|
||||
|
||||
/**
|
||||
* Builds a color matrix that transforms the hue, saturation, and value, all in one operation.
|
||||
*/
|
||||
/proc/color_matrix_hsv(hue, saturation, value)
|
||||
hue = clamp(360 - hue, 0, 360)
|
||||
|
||||
// This is very much a rough approximation of hueshifting. This carries some artifacting, such as negative values that simply shouldn't exist, but it does get the job done, and that's what matters.
|
||||
var/cos_a = cos(hue) // These have to be inverted from 360, otherwise the hue's inverted
|
||||
var/sin_a = sin(hue)
|
||||
var/rot_x = cos_a + (1 - cos_a) / 3
|
||||
var/rot_y = (1 - cos_a) / 3 - 0.5774 * sin_a // 0.5774 is sqrt(1/3)
|
||||
var/rot_z = (1 - cos_a) / 3 + 0.5774 * sin_a
|
||||
|
||||
return list(
|
||||
round((((1-saturation) * LUMA_R) + (rot_x * saturation)) * value, 0.01), round((((1-saturation) * LUMA_R) + (rot_y * saturation)) * value, 0.01), round((((1-saturation) * LUMA_R) + (rot_z * saturation)) * value, 0.01),
|
||||
round((((1-saturation) * LUMA_G) + (rot_z * saturation)) * value, 0.01), round((((1-saturation) * LUMA_G) + (rot_x * saturation)) * value, 0.01), round((((1-saturation) * LUMA_G) + (rot_y * saturation)) * value, 0.01),
|
||||
round((((1-saturation) * LUMA_B) + (rot_y * saturation)) * value, 0.01), round((((1-saturation) * LUMA_B) + (rot_z * saturation)) * value, 0.01), round((((1-saturation) * LUMA_B) + (rot_x * saturation)) * value, 0.01),
|
||||
0, 0, 0
|
||||
)
|
||||
|
||||
//Returns a matrix addition of A with B
|
||||
/proc/color_matrix_add(list/A, list/B)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
speed /= segments
|
||||
|
||||
if(parallel)
|
||||
animate(src, transform = matrices[1], time = speed, loops , flags = ANIMATION_PARALLEL)
|
||||
animate(src, transform = matrices[1], time = speed, loops, flags = ANIMATION_PARALLEL)
|
||||
else
|
||||
animate(src, transform = matrices[1], time = speed, loops)
|
||||
|
||||
|
||||
@@ -258,15 +258,24 @@
|
||||
|
||||
send2adminchat("Server", "A round of [mode.name] just ended[mode_result == "undefined" ? "." : " with a [mode_result]."] Survival rate: [survival_rate]")
|
||||
|
||||
if(LAZYLEN(GLOB.round_end_notifiees))
|
||||
world.TgsTargetedChatBroadcast("[GLOB.round_end_notifiees.Join(", ")] the round has ended.", FALSE)
|
||||
|
||||
if(length(CONFIG_GET(keyed_list/cross_server)))
|
||||
send_news_report()
|
||||
|
||||
//tell the nice people on discord what went on before the salt cannon happens.
|
||||
world.TgsTargetedChatBroadcast("The current round has ended. Please standby for your shift interlude Nanotrasen News Network's report!", FALSE)
|
||||
world.TgsTargetedChatBroadcast(send_news_report(), FALSE)
|
||||
if(CONFIG_GET(string/chat_roundend_notice_tag))
|
||||
var/broadcastmessage = ""
|
||||
|
||||
if(LAZYLEN(GLOB.round_end_notifiees))
|
||||
broadcastmessage += "[GLOB.round_end_notifiees.Join(", ")], "
|
||||
|
||||
|
||||
broadcastmessage += "[((broadcastmessage == "") ? "the" : "The")] current round has ended. Please standby for your shift interlude Nanotrasen News Network's report!\n"
|
||||
broadcastmessage += "```\n[send_news_report()]\n```"
|
||||
|
||||
if(CONFIG_GET(string/chat_reboot_role))
|
||||
broadcastmessage += "\n\n<@&[CONFIG_GET(string/chat_reboot_role)]>, the server will reboot shortly!"
|
||||
|
||||
send2chat(broadcastmessage, CONFIG_GET(string/chat_roundend_notice_tag))
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
@@ -370,6 +379,8 @@
|
||||
|
||||
parts += "[FOURSPACES]Shift Duration: <B>[DisplayTimeText(world.time - SSticker.round_start_time)]</B>"
|
||||
parts += "[FOURSPACES]Station Integrity: <B>[mode.station_was_nuked ? "<span class='redtext'>Destroyed</span>" : "[popcount["station_integrity"]]%"]</B>"
|
||||
if(mode.station_was_nuked && SSevents.holidays && SSevents.holidays[PRIDE_MONTH])
|
||||
parts += "[FOURSPACES]Gender revealed: <B>[pick(500; "Male", 500; "Female", "Bigender", "Agender", "Demiboy", "Demigirl", "Genderfluid", "Pangender", "Xenogender", "Clown", 50; "What", 50; "Oh no.", 50; "Excuse me?")]</B>"
|
||||
var/total_players = GLOB.joined_player_list.len
|
||||
if(total_players)
|
||||
parts+= "[FOURSPACES]Total Population: <B>[total_players]</B>"
|
||||
@@ -548,7 +559,7 @@
|
||||
parts += "There were [station_vault] credits collected by crew this shift.<br>"
|
||||
if(total_players > 0)
|
||||
parts += "An average of [station_vault/total_players] credits were collected.<br>"
|
||||
// log_econ("Roundend credit total: [station_vault] credits. Average Credits: [station_vault/total_players]")
|
||||
log_econ("Roundend credit total: [station_vault] credits. Average Credits: [station_vault/total_players]")
|
||||
if(mr_moneybags)
|
||||
parts += "The most affluent crew member at shift end was <b>[mr_moneybags.account_holder] with [mr_moneybags.account_balance]</b> cr!</div>"
|
||||
else
|
||||
|
||||
@@ -1176,25 +1176,22 @@ GLOBAL_REAL_VAR(list/stack_trace_storage)
|
||||
var/initialpixely = pixel_y
|
||||
var/shiftx = rand(-pixelshiftx,pixelshiftx)
|
||||
var/shifty = rand(-pixelshifty,pixelshifty)
|
||||
animate(src, pixel_x = pixel_x + shiftx, pixel_y = pixel_y + shifty, time = 0.2, loop = duration)
|
||||
pixel_x = initialpixelx
|
||||
pixel_y = initialpixely
|
||||
animate(src, pixel_x = shiftx, pixel_y = shifty, time = 0.2, loop = duration, flags = ANIMATION_RELATIVE)
|
||||
animate(pixel_x = initialpixelx, pixel_y = initialpixely, time = 0.2)
|
||||
|
||||
/atom/proc/do_jiggle(targetangle = 45, timer = 20)
|
||||
/atom/proc/do_jiggle(targetangle = 25, timer = 20)
|
||||
var/matrix/OM = matrix(transform)
|
||||
var/matrix/M = matrix(transform)
|
||||
var/halftime = timer * 0.5
|
||||
M.Turn(pick(-targetangle, targetangle))
|
||||
animate(src, transform = M, time = halftime, easing = ELASTIC_EASING)
|
||||
animate(src, transform = OM, time = halftime, easing = ELASTIC_EASING)
|
||||
animate(src, transform = M, time = timer * 0.1, easing = BACK_EASING | EASE_IN)
|
||||
animate(transform = OM, time = timer * 0.4, easing = ELASTIC_EASING)
|
||||
|
||||
/atom/proc/do_squish(squishx = 1.2, squishy = 0.6, timer = 20)
|
||||
var/matrix/OM = matrix(transform)
|
||||
var/matrix/M = matrix(transform)
|
||||
var/halftime = timer * 0.5
|
||||
M.Scale(squishx, squishy)
|
||||
animate(src, transform = M, time = halftime, easing = BOUNCE_EASING)
|
||||
animate(src, transform = OM, time = halftime, easing = BOUNCE_EASING)
|
||||
animate(src, transform = M, time = timer * 0.5, easing = ELASTIC_EASING)
|
||||
animate(transform = OM, time = timer * 0.5, easing = BOUNCE_EASING, flags = ANIMATION_PARALLEL)
|
||||
|
||||
/proc/weightclass2text(var/w_class)
|
||||
switch(w_class)
|
||||
|
||||
Reference in New Issue
Block a user