Merge branch 'master' of https://github.com/VOREStation/VOREStation into making-of-shadekin

This commit is contained in:
Heroman3003
2019-10-29 09:33:48 +10:00
1698 changed files with 269984 additions and 473924 deletions

View File

@@ -756,3 +756,10 @@ proc/dd_sortedTextList(list/incoming)
. = list()
for(var/i in L)
. |= i
#define listequal(A, B) (A.len == B.len && !length(A^B))
/proc/popleft(list/L)
if(L.len)
. = L[1]
L.Cut(1,2)

View File

@@ -0,0 +1,43 @@
/proc/get_turf_pixel(atom/movable/AM)
if(!istype(AM))
return
//Find AM's matrix so we can use it's X/Y pixel shifts
var/matrix/M = matrix(AM.transform)
var/pixel_x_offset = AM.pixel_x + M.get_x_shift()
var/pixel_y_offset = AM.pixel_y + M.get_y_shift()
//Irregular objects
if(AM.bound_height != world.icon_size || AM.bound_width != world.icon_size)
var/icon/AMicon = icon(AM.icon, AM.icon_state)
pixel_x_offset += ((AMicon.Width()/world.icon_size)-1)*(world.icon_size*0.5)
pixel_y_offset += ((AMicon.Height()/world.icon_size)-1)*(world.icon_size*0.5)
qdel(AMicon)
//DY and DX
var/rough_x = round(round(pixel_x_offset,world.icon_size)/world.icon_size)
var/rough_y = round(round(pixel_y_offset,world.icon_size)/world.icon_size)
//Find coordinates
var/turf/T = get_turf(AM) //use AM's turfs, as it's coords are the same as AM's AND AM's coords are lost if it is inside another atom
var/final_x = T.x + rough_x
var/final_y = T.y + rough_y
if(final_x || final_y)
return locate(final_x, final_y, T.z)
// Walks up the loc tree until it finds a holder of the given holder_type
/proc/get_holder_of_type(atom/A, holder_type)
if(!istype(A)) return
for(A, A && !istype(A, holder_type), A=A.loc);
return A
/atom/movable/proc/throw_at_random(var/include_own_turf, var/maxrange, var/speed)
var/list/turfs = trange(maxrange, src)
if(!maxrange)
maxrange = 1
if(!include_own_turf)
turfs -= get_turf(src)
src.throw_at(pick(turfs), maxrange, speed, src)

View File

@@ -11,6 +11,8 @@ var/global/list/positive_traits = list() // Positive custom species traits, inde
var/global/list/traits_costs = list() // Just path = cost list, saves time in char setup
var/global/list/all_traits = list() // All of 'em at once (same instances)
var/global/list/sensorpreflist = list("Off", "Binary", "Vitals", "Tracking", "No Preference") //TFF 5/8/19 - Suit Sensors global list
var/global/list/custom_species_bases = list() // Species that can be used for a Custom Species icon base
//stores numeric player size options indexed by name
@@ -40,40 +42,8 @@ var/global/list/item_vore_blacklist = list(
/obj/item/weapon/disk/nuclear,
/obj/item/clothing/suit/storage/hooded/wintercoat/roiz)
var/global/list/digestion_sounds = list(
'sound/vore/digest1.ogg',
'sound/vore/digest2.ogg',
'sound/vore/digest3.ogg',
'sound/vore/digest4.ogg',
'sound/vore/digest5.ogg',
'sound/vore/digest6.ogg',
'sound/vore/digest7.ogg',
'sound/vore/digest8.ogg',
'sound/vore/digest9.ogg',
'sound/vore/digest10.ogg',
'sound/vore/digest11.ogg',
'sound/vore/digest12.ogg')
var/global/list/death_sounds = list(
'sound/vore/death1.ogg',
'sound/vore/death2.ogg',
'sound/vore/death3.ogg',
'sound/vore/death4.ogg',
'sound/vore/death5.ogg',
'sound/vore/death6.ogg',
'sound/vore/death7.ogg',
'sound/vore/death8.ogg',
'sound/vore/death9.ogg',
'sound/vore/death10.ogg')
var/global/list/hunger_sounds = list(
'sound/vore/growl1.ogg',
'sound/vore/growl2.ogg',
'sound/vore/growl3.ogg',
'sound/vore/growl4.ogg',
'sound/vore/growl5.ogg')
var/global/list/vore_sounds = list(
//Classic Vore sounds
var/global/list/classic_vore_sounds = list(
"Gulp" = 'sound/vore/gulp.ogg',
"Insert" = 'sound/vore/insert.ogg',
"Insertion1" = 'sound/vore/insertion1.ogg',
@@ -84,15 +54,55 @@ var/global/list/vore_sounds = list(
"Squish2" = 'sound/vore/squish2.ogg',
"Squish3" = 'sound/vore/squish3.ogg',
"Squish4" = 'sound/vore/squish4.ogg',
"Rustle (cloth)" = 'sound/effects/rustle5.ogg',
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
"None" = null)
var/global/list/struggle_sounds = list(
"Squish1" = 'sound/vore/squish1.ogg',
"Squish2" = 'sound/vore/squish2.ogg',
"Squish3" = 'sound/vore/squish3.ogg',
"Squish4" = 'sound/vore/squish4.ogg')
var/global/list/classic_release_sounds = list(
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
"Splatter" = 'sound/effects/splat.ogg',
"None" = null
)
//Poojy's Fancy Sounds
var/global/list/fancy_vore_sounds = list(
"Gulp" = 'sound/vore/sunesound/pred/swallow_01.ogg',
"Swallow" = 'sound/vore/sunesound/pred/swallow_02.ogg',
"Insertion1" = 'sound/vore/sunesound/pred/insertion_01.ogg',
"Insertion2" = 'sound/vore/sunesound/pred/insertion_02.ogg',
"Tauric Swallow" = 'sound/vore/sunesound/pred/taurswallow.ogg',
"Stomach Move" = 'sound/vore/sunesound/pred/stomachmove.ogg',
"Schlorp" = 'sound/vore/sunesound/pred/schlorp.ogg',
"Squish1" = 'sound/vore/sunesound/pred/squish_01.ogg',
"Squish2" = 'sound/vore/sunesound/pred/squish_02.ogg',
"Squish3" = 'sound/vore/sunesound/pred/squish_03.ogg',
"Squish4" = 'sound/vore/sunesound/pred/squish_04.ogg',
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
"None" = null
)
var/global/list/fancy_release_sounds = list(
"Rustle (cloth)" = 'sound/effects/rustle1.ogg',
"Rustle 2 (cloth)" = 'sound/effects/rustle2.ogg',
"Rustle 3 (cloth)" = 'sound/effects/rustle3.ogg',
"Rustle 4 (cloth)" = 'sound/effects/rustle4.ogg',
"Rustle 5 (cloth)" = 'sound/effects/rustle5.ogg',
"Stomach Move" = 'sound/vore/sunesound/pred/stomachmove.ogg',
"Pred Escape" = 'sound/vore/sunesound/pred/escape.ogg',
"Splatter" = 'sound/effects/splat.ogg',
"None" = null
)
var/global/list/global_vore_egg_types = list(
"Unathi" = UNATHI_EGG,
@@ -121,6 +131,8 @@ var/global/list/tf_vore_egg_types = list(
"Xenomorph" = /obj/structure/closet/secure_closet/egg/xenomorph)
var/global/list/edible_trash = list(/obj/item/broken_device,
/obj/item/clothing/accessory/collar, //TFF 10/7/19 - add option to nom collars,
/obj/item/device/communicator, //TFF 19/9/19 - add option to nom communicators and commwatches,
/obj/item/clothing/mask,
/obj/item/clothing/glasses,
/obj/item/clothing/gloves,

View File

@@ -42,4 +42,18 @@
for(var/x_pixel = 1 to I.Width())
if (I.GetPixel(x_pixel, y_pixel))
return y_pixel - 1
return null
return null
//Standard behaviour is to cut pixels from the main icon that are covered by pixels from the mask icon unless passed mask_ready, see below.
/proc/get_icon_difference(var/icon/main, var/icon/mask, var/mask_ready)
/*You should skip prep if the mask is already sprited properly. This significantly improves performance by eliminating most of the realtime icon work.
e.g. A 'ready' mask is a mask where the part you want cut out is missing (no pixels, 0 alpha) from the sprite, and everything else is solid white.*/
if(istype(main) && istype(mask))
if(!mask_ready) //Prep the mask if we're using a regular old sprite and not a special-made mask.
mask.Blend(rgb(255,255,255), ICON_SUBTRACT) //Make all pixels on the mask as black as possible.
mask.Opaque(rgb(255,255,255)) //Make the transparent pixels (background) white.
mask.BecomeAlphaMask() //Make all the black pixels vanish (fully transparent), leaving only the white background pixels.
main.AddAlphaMask(mask) //Make the pixels in the main icon that are in the transparent zone of the mask icon also vanish (fully transparent).
return main

View File

@@ -61,8 +61,8 @@
/proc/log_access_in(client/new_client)
if (config.log_access)
var/message = "[key_name(new_client)] - IP:[new_client.address] - CID:[new_client.computer_id] - BYOND v[new_client.byond_version]"
WRITE_LOG(diary, "ACCESS IN: [message]")
var/message = "[key_name(new_client)] - IP:[new_client.address] - CID:[new_client.computer_id] - BYOND v[new_client.byond_version]"
WRITE_LOG(diary, "ACCESS IN: [message]") //VOREStation Edit
/proc/log_access_out(mob/last_mob)
if (config.log_access)
@@ -73,26 +73,46 @@
if (config.log_say)
WRITE_LOG(diary, "SAY: [speaker.simple_info_line()]: [html_decode(text)]")
//Log the message to in-game dialogue logs, as well.
if(speaker.client)
speaker.dialogue_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>SAY:</u> - <span style=\"color:#32cd32\">[text]</span>"
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>SAY:</u> - <span style=\"color:#32cd32\">[text]</span>"
/proc/log_ooc(text, client/user)
if (config.log_ooc)
WRITE_LOG(diary, "OOC: [user.simple_info_line()]: [html_decode(text)]")
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[user]</b>) <u>OOC:</u> - <span style=\"color:blue\"><b>[text]</b></span>"
/proc/log_aooc(text, client/user)
if (config.log_ooc)
WRITE_LOG(diary, "AOOC: [user.simple_info_line()]: [html_decode(text)]")
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[user]</b>) <u>AOOC:</u> - <span style=\"color:red\"><b>[text]</b></span>"
/proc/log_looc(text, client/user)
if (config.log_ooc)
WRITE_LOG(diary, "LOOC: [user.simple_info_line()]: [html_decode(text)]")
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[user]</b>) <u>LOOC:</u> - <span style=\"color:orange\"><b>[text]</b></span>"
/proc/log_whisper(text, mob/speaker)
if (config.log_whisper)
WRITE_LOG(diary, "WHISPER: [speaker.simple_info_line()]: [html_decode(text)]")
if(speaker.client)
speaker.dialogue_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>SAY:</u> - <span style=\"color:gray\"><i>[text]</i></span>"
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>SAY:</u> - <span style=\"color:gray\"><i>[text]</i></span>"
/proc/log_emote(text, mob/speaker)
if (config.log_emote)
WRITE_LOG(diary, "EMOTE: [speaker.simple_info_line()]: [html_decode(text)]")
if(speaker.client)
speaker.dialogue_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>EMOTE:</u> - <span style=\"color:#CCBADC\">[text]</span>"
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>EMOTE:</u> - <span style=\"color:#CCBADC\">[text]</span>"
/proc/log_attack(attacker, defender, message)
if (config.log_attack)
WRITE_LOG(diary, "ATTACK: [attacker] against [defender]: [message]")
@@ -113,6 +133,10 @@
if (config.log_say)
WRITE_LOG(diary, "DEADCHAT: [speaker.simple_info_line()]: [html_decode(text)]")
speaker.dialogue_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>DEADSAY:</u> - <span style=\"color:green\">[text]</span>"
GLOB.round_text_log += "<font size=1><span style=\"color:#7e668c\"><b>([time_stamp()])</b> (<b>[src]/[speaker.client]</b>) <u>DEADSAY:</u> - [text]</span></font>"
/proc/log_ghostemote(text, mob/speaker)
if (config.log_emote)
WRITE_LOG(diary, "DEADEMOTE: [speaker.simple_info_line()]: [html_decode(text)]")
@@ -125,6 +149,10 @@
if (config.log_pda)
WRITE_LOG(diary, "PDA: [speaker.simple_info_line()]: [html_decode(text)]")
speaker.dialogue_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>MSG:</u> - <span style=\"color:[COLOR_GREEN]\">[text]</span>"
GLOB.round_text_log += "<b>([time_stamp()])</b> (<b>[speaker]/[speaker.client]</b>) <u>MSG:</u> - <span style=\"color:[COLOR_GREEN]\">[text]</span>"
/proc/log_to_dd(text)
world.log << text //this comes before the config check because it can't possibly runtime
if(config.log_world_output)
@@ -222,7 +250,7 @@
if(include_link && is_special_character(M) && highlight_special_characters)
name = "<font color='#FFA500'>[name]</font>" //Orange
. += "/([name])"
return .

View File

@@ -235,6 +235,12 @@ Proc for attack log creation, because really why not
var/atom/original_loc = user.loc
var/obj/mecha/M = null
if(istype(user.loc, /obj/mecha))
original_loc = get_turf(original_loc)
M = user.loc
var/holding = user.get_active_hand()
var/datum/progressbar/progbar
@@ -253,7 +259,12 @@ Proc for attack log creation, because really why not
. = FALSE
break
if(user.loc != original_loc && !ignore_movement)
if(M)
if(user.loc != M || (M.loc != original_loc && !ignore_movement)) // Mech coooooode.
. = FALSE
break
else if(user.loc != original_loc && !ignore_movement)
. = FALSE
break

View File

@@ -84,7 +84,6 @@
// 0 .. 9
if(48 to 57) //Numbers
if(!last_char_group) continue //suppress at start of string
if(!allow_numbers) continue // If allow_numbers is 0, then don't do this.
output += ascii2text(ascii_char)
number_of_alphanumeric++
@@ -331,6 +330,55 @@ proc/TextPreview(var/string,var/len=40)
/proc/strip_improper(var/text)
return replacetext(replacetext(text, "\proper", ""), "\improper", "")
/proc/pencode2html(t)
t = replacetext(t, "\n", "<BR>")
t = replacetext(t, "\[center\]", "<center>")
t = replacetext(t, "\[/center\]", "</center>")
t = replacetext(t, "\[br\]", "<BR>")
t = replacetext(t, "\[b\]", "<B>")
t = replacetext(t, "\[/b\]", "</B>")
t = replacetext(t, "\[i\]", "<I>")
t = replacetext(t, "\[/i\]", "</I>")
t = replacetext(t, "\[u\]", "<U>")
t = replacetext(t, "\[/u\]", "</U>")
t = replacetext(t, "\[time\]", "[stationtime2text()]")
t = replacetext(t, "\[date\]", "[stationdate2text()]")
t = replacetext(t, "\[large\]", "<font size=\"4\">")
t = replacetext(t, "\[/large\]", "</font>")
t = replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
t = replacetext(t, "\[h1\]", "<H1>")
t = replacetext(t, "\[/h1\]", "</H1>")
t = replacetext(t, "\[h2\]", "<H2>")
t = replacetext(t, "\[/h2\]", "</H2>")
t = replacetext(t, "\[h3\]", "<H3>")
t = replacetext(t, "\[/h3\]", "</H3>")
t = replacetext(t, "\[*\]", "<li>")
t = replacetext(t, "\[hr\]", "<HR>")
t = replacetext(t, "\[small\]", "<font size = \"1\">")
t = replacetext(t, "\[/small\]", "</font>")
t = replacetext(t, "\[list\]", "<ul>")
t = replacetext(t, "\[/list\]", "</ul>")
t = replacetext(t, "\[table\]", "<table border=1 cellspacing=0 cellpadding=3 style='border: 1px solid black;'>")
t = replacetext(t, "\[/table\]", "</td></tr></table>")
t = replacetext(t, "\[grid\]", "<table>")
t = replacetext(t, "\[/grid\]", "</td></tr></table>")
t = replacetext(t, "\[row\]", "</td><tr>")
t = replacetext(t, "\[cell\]", "<td>")
t = replacetext(t, "\[logo\]", "<img src = ntlogo.png>")
t = replacetext(t, "\[redlogo\]", "<img src = redntlogo.png>")
t = replacetext(t, "\[sglogo\]", "<img src = sglogo.png>")
t = replacetext(t, "\[editorbr\]", "")
return t
// Random password generator
/proc/GenerateKey()
//Feel free to move to Helpers.
var/newKey
newKey += pick("the", "if", "of", "as", "in", "a", "you", "from", "to", "an", "too", "little", "snow", "dead", "drunk", "rosebud", "duck", "al", "le")
newKey += pick("diamond", "beer", "mushroom", "assistant", "clown", "captain", "twinkie", "security", "nuke", "small", "big", "escape", "yellow", "gloves", "monkey", "engine", "nuclear", "ai")
newKey += pick("1", "2", "3", "4", "5", "6", "7", "8", "9", "0")
return newKey
//Used for applying byonds text macros to strings that are loaded at runtime
/proc/apply_text_macros(string)
var/next_backslash = findtext(string, "\\")