Merge branch 'master' into upstream-merge-36442

This commit is contained in:
LetterJay
2018-04-01 19:50:37 -05:00
committed by GitHub
132 changed files with 1560 additions and 536 deletions
+5 -3
View File
@@ -71,14 +71,16 @@
if(!owner.can_hear() || world.time < next_scare) //words can't trigger you if you can't hear them *taps head*
return message
for(var/word in trigger_words)
if(findtext(raw_message, word))
var/reg = regex(@"[^\l][REGEX_QUOTE(word)]*s[^\l]")
if(findtext(raw_message, reg))
addtimer(CALLBACK(src, .proc/freak_out, null, word), 10) //to react AFTER the chat message
break
return message
/datum/brain_trauma/mild/phobia/on_say(message)
for(var/word in trigger_words)
if(findtext(message, word))
var/reg = regex(@"[^\l][REGEX_QUOTE(word)]*s[^\l]")
if(findtext(message, reg))
to_chat(owner, "<span class='warning'>You can't bring yourself to say the word \"[word]\"!</span>")
return ""
return message
@@ -114,4 +116,4 @@
owner.dizziness += 10
owner.confused += 10
owner.Jitter(10)
owner.stuttering += 10
owner.stuttering += 10
+1 -1
View File
@@ -173,7 +173,7 @@
var/datum/callback_select/CS = new(count, savereturns)
for (var/i in 1 to count)
CS.invoke_callback(i, callbacks[i], callback_args[i], savereturns)
while(CS.pendingcount)
sleep(resolution*world.tick_lag)
return CS.finished
+243
View File
@@ -0,0 +1,243 @@
#define LOCKON_AIMING_MAX_CURSOR_RADIUS 7
#define LOCKON_IGNORE_RESULT "ignore_my_result"
#define LOCKON_RANGING_BREAK_CHECK if(current_ranging_id != this_id){return LOCKON_IGNORE_RESULT}
/datum/component/lockon_aiming
dupe_mode = COMPONENT_DUPE_ALLOWED
var/lock_icon = 'icons/mob/blob.dmi'
var/lock_icon_state = "marker"
var/mutable_appearance/lock_appearance
var/list/image/lock_images
var/list/target_typecache
var/list/immune_weakrefs //list(weakref = TRUE)
var/mob_stat_check = TRUE //if a potential target is a mob make sure it's conscious!
var/lock_amount = 1
var/lock_cursor_range = 5
var/list/locked_weakrefs
var/update_disabled = FALSE
var/current_ranging_id = 0
var/list/last_location
var/datum/callback/on_lock
var/datum/callback/can_target_callback
/datum/component/lockon_aiming/Initialize(range, list/typecache, amount, list/immune, datum/callback/when_locked, icon, icon_state, datum/callback/target_callback)
if(!ismob(parent))
. = COMPONENT_INCOMPATIBLE
CRASH("Lockon aiming component attempted to be added to a non mob!")
if(target_callback)
can_target_callback = target_callback
else
can_target_callback = CALLBACK(src, .proc/can_target)
if(range)
lock_cursor_range = range
if(typecache)
target_typecache = typecache
if(amount)
lock_amount = amount
immune_weakrefs = list(WEAKREF(parent) = TRUE) //Manually take this out if you want..
if(immune)
for(var/i in immune)
if(isweakref(i))
immune_weakrefs[i] = TRUE
else if(isatom(i))
immune_weakrefs[WEAKREF(i)] = TRUE
if(when_locked)
on_lock = when_locked
if(icon)
lock_icon = icon
if(icon_state)
lock_icon_state = icon_state
generate_lock_visuals()
var/mob/M = parent
LAZYOR(M.mousemove_intercept_objects, src)
START_PROCESSING(SSfastprocess, src)
/datum/component/lockon_aiming/Destroy()
var/mob/M = parent
clear_visuals()
LAZYREMOVE(M.mousemove_intercept_objects, src)
STOP_PROCESSING(SSfastprocess, src)
return ..()
/datum/component/lockon_aiming/proc/show_visuals()
LAZYINITLIST(lock_images)
var/mob/M = parent
if(!M.client)
return
for(var/i in locked_weakrefs)
var/datum/weakref/R = i
var/atom/A = R.resolve()
if(!A)
continue //It'll be cleared by processing.
var/image/I = new
I.appearance = lock_appearance
I.loc = A
M.client.images |= I
lock_images |= I
/datum/component/lockon_aiming/proc/clear_visuals()
var/mob/M = parent
if(!M.client)
return
if(!lock_images)
return
for(var/i in lock_images)
M.client.images -= i
qdel(i)
lock_images.Cut()
/datum/component/lockon_aiming/proc/refresh_visuals()
clear_visuals()
show_visuals()
/datum/component/lockon_aiming/proc/generate_lock_visuals()
lock_appearance = mutable_appearance(icon = lock_icon, icon_state = lock_icon_state, layer = FLOAT_LAYER)
/datum/component/lockon_aiming/proc/unlock_all(refresh_vis = TRUE)
LAZYCLEARLIST(locked_weakrefs)
if(refresh_vis)
refresh_visuals()
/datum/component/lockon_aiming/proc/unlock(atom/A, refresh_vis = TRUE)
if(!A.weak_reference)
return
LAZYREMOVE(locked_weakrefs, A.weak_reference)
if(refresh_vis)
refresh_visuals()
/datum/component/lockon_aiming/proc/lock(atom/A, refresh_vis = TRUE)
LAZYOR(locked_weakrefs, WEAKREF(A))
if(refresh_vis)
refresh_visuals()
/datum/component/lockon_aiming/proc/add_immune_atom(atom/A)
var/datum/weakref/R = WEAKREF(A)
if(immune_weakrefs && (immune_weakrefs[R]))
return
LAZYSET(immune_weakrefs, R, TRUE)
/datum/component/lockon_aiming/proc/remove_immune_atom(atom/A)
if(!A.weak_reference || !immune_weakrefs) //if A doesn't have a weakref how did it get on the immunity list?
return
LAZYREMOVE(immune_weakrefs, A.weak_reference)
/datum/component/lockon_aiming/onMouseMove(object,location,control,params)
var/mob/M = parent
if(!istype(M) || !M.client)
return
var/datum/position/P = mouse_absolute_datum_map_position_from_client(M.client)
if(!P)
return
var/turf/T = P.return_turf()
LAZYINITLIST(last_location)
if(length(last_location) == 3 && last_location[1] == T.x && last_location[2] == T.y && last_location[3] == T.z)
return //Same turf, don't bother.
if(last_location)
last_location.Cut()
else
last_location = list()
last_location.len = 3
last_location[1] = T.x
last_location[2] = T.y
last_location[3] = T.z
autolock()
/datum/component/lockon_aiming/process()
if(update_disabled)
return
if(!last_location)
return
var/changed = FALSE
for(var/i in locked_weakrefs)
var/datum/weakref/R = i
if(istype(R))
var/atom/thing = R.resolve()
if(!istype(thing) || (get_dist(thing, locate(last_location[1], last_location[2], last_location[3])) > lock_cursor_range))
unlock(R)
changed = TRUE
else
unlock(R)
changed = TRUE
if(changed)
autolock()
/datum/component/lockon_aiming/proc/autolock()
var/mob/M = parent
if(!M.client)
return FALSE
var/datum/position/current = mouse_absolute_datum_map_position_from_client(M.client)
var/turf/target = current.return_turf()
var/list/atom/targets = get_nearest(target, target_typecache, lock_amount, lock_cursor_range)
if(targets == LOCKON_IGNORE_RESULT)
return
unlock_all(FALSE)
for(var/i in targets)
if(immune_weakrefs[WEAKREF(i)])
continue
lock(i, FALSE)
refresh_visuals()
on_lock.Invoke(locked_weakrefs)
/datum/component/lockon_aiming/proc/can_target(atom/A)
var/mob/M = A
return is_type_in_typecache(A, target_typecache) && !(ismob(A) && mob_stat_check && M.stat != CONSCIOUS) && !immune_weakrefs[WEAKREF(A)]
/datum/component/lockon_aiming/proc/get_nearest(turf/T, list/typecache, amount, range)
current_ranging_id++
var/this_id = current_ranging_id
var/list/L = list()
var/turf/center = get_turf(T)
if(amount < 1 || range < 0 || !istype(center) || !islist(typecache))
return
if(range == 0)
return typecache_filter_list(T.contents + T, typecache)
var/x = 0
var/y = 0
var/cd = 0
while(cd <= range)
x = center.x - cd + 1
y = center.y + cd
LOCKON_RANGING_BREAK_CHECK
for(x in x to center.x + cd)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
y = center.y + cd - 1
x = center.x + cd
for(y in center.y - cd to y)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
y = center.y - cd
x = center.x + cd - 1
for(x in center.x - cd to x)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
y = center.y - cd + 1
x = center.x - cd
for(y in y to center.y + cd)
T = locate(x, y, center.z)
if(T)
L |= special_list_filter(T.contents, can_target_callback)
if(L.len >= amount)
L.Cut(amount+1)
return L
LOCKON_RANGING_BREAK_CHECK
cd++
CHECK_TICK
/datum/component/lockon_aiming/OnTransfer(datum/new_parent)
CRASH("Warning: Lockon aiming component transfer attempted, but transfer behavior is not implemented!")
+1 -1
View File
@@ -68,7 +68,7 @@
var/datum/mood_event/event = mood_events[i]
msg += event.description
else
msg += "<span class='nicegreen'>Nothing special has happend to me lately!<span>\n"
msg += "<span class='nicegreen'>Nothing special has happened to me lately!<span>\n"
to_chat(owner, msg)
/datum/component/mood/proc/update_mood() //Called whenever a mood event is added or removed
+9 -5
View File
@@ -199,6 +199,7 @@
/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H, client/C)
set waitfor = FALSE
var/static/list/show_directions = list(SOUTH, WEST)
if(H.mind && (H.mind.assigned_role != H.mind.special_role))
var/assignment
if(H.mind.assigned_role)
@@ -212,11 +213,14 @@
var/id = num2hex(record_id_num++,6)
if(!C)
C = H.client
var/image = get_id_photo(H, C)
var/image = get_id_photo(H, C, show_directions)
var/obj/item/photo/photo_front = new()
var/obj/item/photo/photo_side = new()
photo_front.photocreate(null, icon(image, dir = SOUTH))
photo_side.photocreate(null, icon(image, dir = WEST))
for(var/D in show_directions)
if(D == SOUTH)
photo_front.photocreate(null, icon(image, dir = D))
if(D == WEST || D == EAST)
photo_side.photocreate(null, icon(image, dir = D))
//These records should ~really~ be merged or something
//General Record
@@ -279,11 +283,11 @@
locked += L
return
/datum/datacore/proc/get_id_photo(mob/living/carbon/human/H, client/C)
/datum/datacore/proc/get_id_photo(mob/living/carbon/human/H, client/C, show_directions = list(SOUTH))
var/datum/job/J = SSjob.GetJob(H.mind.assigned_role)
var/datum/preferences/P
if(!C)
C = H.client
if(C)
P = C.prefs
return get_flat_human_icon(null, J, P, DUMMY_HUMAN_SLOT_MANIFEST)
return get_flat_human_icon(null, J, P, DUMMY_HUMAN_SLOT_MANIFEST, show_directions)
@@ -2,10 +2,10 @@
//////////////////////////////////////
Facial Hypertrichosis
Very very Noticable.
Decreases resistance slightly.
Decreases stage speed.
Reduced transmittability
No change to stealth.
Increases resistance.
Increases speed.
Slighlty increases transmittability
Intense Level.
BONUS
@@ -18,10 +18,10 @@ BONUS
name = "Facial Hypertrichosis"
desc = "The virus increases hair production significantly, causing rapid beard growth."
stealth = -3
resistance = -1
stage_speed = -3
transmittable = -1
stealth = 0
resistance = 3
stage_speed = 2
transmittable = 1
level = 4
severity = 1
symptom_delay_min = 18
@@ -48,4 +48,4 @@ BONUS
to_chat(H, "<span class='warning'>You feel manly!</span>")
if(!(H.facial_hair_style == "Dwarf Beard") && !(H.facial_hair_style == "Very Long Beard"))
H.facial_hair_style = pick("Dwarf Beard", "Very Long Beard")
H.update_hair()
H.update_hair()
@@ -4,7 +4,7 @@ Alopecia
Not Noticeable.
Increases resistance slightly.
Reduces stage speed slightly.
Increases stage speed.
Transmittable.
Intense Level.
@@ -19,8 +19,8 @@ BONUS
desc = "The virus causes rapid shedding of head and body hair."
stealth = 0
resistance = 1
stage_speed = -1
transmittable = 3
stage_speed = 2
transmittable = 2
level = 4
severity = 1
base_message_chance = 50
@@ -52,4 +52,4 @@ BONUS
H.hair_style = "Bald"
else
H.hair_style = "Balding Hair"
H.update_hair()
H.update_hair()
+16 -16
View File
@@ -2,10 +2,10 @@
//////////////////////////////////////
Vitiligo
Extremely Noticable.
Decreases resistance slightly.
Reduces stage speed slightly.
Reduces transmission.
Hidden.
No change to resistance.
Increases stage speed.
Slightly increases transmittability.
Critical Level.
BONUS
@@ -18,10 +18,10 @@ BONUS
name = "Vitiligo"
desc = "The virus destroys skin pigment cells, causing rapid loss of pigmentation in the host."
stealth = -3
resistance = -1
stage_speed = -1
transmittable = -2
stealth = 2
resistance = 0
stage_speed = 3
transmittable = 1
level = 5
severity = 1
symptom_delay_min = 25
@@ -47,10 +47,10 @@ BONUS
//////////////////////////////////////
Revitiligo
Extremely Noticable.
Decreases resistance slightly.
Reduces stage speed slightly.
Reduces transmission.
Slightly noticable.
Increases resistance.
Increases stage speed slightly.
Increases transmission.
Critical Level.
BONUS
@@ -63,10 +63,10 @@ BONUS
name = "Revitiligo"
desc = "The virus causes increased production of skin pigment cells, making the host's skin grow darker over time."
stealth = -3
resistance = -1
stage_speed = -1
transmittable = -2
stealth = -1
resistance = 3
stage_speed = 1
transmittable = 2
level = 5
severity = 1
symptom_delay_min = 7
@@ -105,6 +105,14 @@
mood_change = -3
timeout = 3000
/datum/mood_event/nyctophobia
description = "<span class='warning'>It sure is dark around here...</span>\n"
mood_change = -3
/datum/mood_event/family_heirloom_missing
description = "<span class='warning'>I'm missing my family heirloom...</span>\n"
mood_change = -4
//These are unused so far but I want to remember them to use them later
/datum/mood_event/cloned_corpse
description = "<span class='boldwarning'>I recently saw my own corpse...</span>\n"
@@ -56,3 +56,7 @@
description = "<span class='nicegreen'>I have seen the truth, praise the almighty one!</span>\n"
mood_change = 40 //maybe being a cultist isnt that bad after all
hidden = TRUE
/datum/mood_event/family_heirloom
description = "<span class='nicegreen'>My family heirloom is safe with me.</span>\n"
mood_change = 1
+13 -13
View File
@@ -9,6 +9,19 @@
#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) {new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED)}
#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) {new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT)}
/proc/point_midpoint_points(datum/point/a, datum/point/b) //Obviously will not support multiZ calculations! Same for the two below.
var/datum/point/P = new
P.x = a.x + (b.x - a.x) / 2
P.y = a.y + (b.y - a.y) / 2
P.z = a.z
return P
/proc/pixel_length_between_points(datum/point/a, datum/point/b)
return sqrt(((b.x - a.x) ** 2) + ((b.y - a.y) ** 2))
/proc/angle_between_points(datum/point/a, datum/point/b)
return ATAN2((b.y - a.y), (b.x - a.x))
/datum/position //For positions with map x/y/z and pixel x/y so you don't have to return lists. Could use addition/subtraction in the future I guess.
var/x = 0
var/y = 0
@@ -53,19 +66,6 @@
/datum/position/proc/return_point()
return new /datum/point(src)
/proc/point_midpoint_points(datum/point/a, datum/point/b) //Obviously will not support multiZ calculations! Same for the two below.
var/datum/point/P = new
P.x = a.x + (b.x - a.x) / 2
P.y = a.y + (b.y - a.y) / 2
P.z = a.z
return P
/proc/pixel_length_between_points(datum/point/a, datum/point/b)
return sqrt(((b.x - a.x) ** 2) + ((b.y - a.y) ** 2))
/proc/angle_between_points(datum/point/a, datum/point/b)
return ATAN2((b.y - a.y), (b.x - a.x))
/datum/point //A precise point on the map in absolute pixel locations based on world.icon_size. Pixels are FROM THE EDGE OF THE MAP!
var/x = 0
var/y = 0
+25 -23
View File
@@ -11,6 +11,23 @@
/datum/trait/apathetic
name = "Apathetic"
desc = "You just don't care as much as other people. That's nice to have in a place like this, I guess."
value = 1
/datum/trait/apathetic/add()
GET_COMPONENT_FROM(mood, /datum/component/mood, trait_holder)
if(mood)
mood.mood_modifier = 0.8
/datum/trait/apathetic/remove()
GET_COMPONENT_FROM(mood, /datum/component/mood, trait_holder)
if(mood)
mood.mood_modifier = 1 //Change this once/if species get their own mood modifiers.
/datum/trait/freerunning
name = "Freerunning"
desc = "You're great at quick moves! You can climb tables more quickly."
@@ -21,6 +38,14 @@
/datum/trait/jolly
name = "Jolly"
desc = "You sometimes just feel happy, for no reason at all."
value = 1
mob_trait = TRAIT_JOLLY
/datum/trait/light_step
name = "Light Step"
desc = "You walk with a gentle step, making stepping on sharp objects quieter and less painful."
@@ -81,26 +106,3 @@
mob_trait = TRAIT_VORACIOUS
gain_text = "<span class='notice'>You feel HONGRY.</span>"
lose_text = "<span class='danger'>You no longer feel HONGRY.</span>"
/datum/trait/jolly
name = "Jolly"
desc = "You sometimes just feel happy, for no reason at all."
value = 1
mob_trait = TRAIT_JOLLY
/datum/trait/apathetic
name = "Apathetic"
desc = "You just don't care as much as other people, that's nice to have in a place like this, I guess."
value = 1
/datum/trait/apathetic/add()
GET_COMPONENT_FROM(mood, /datum/component/mood, trait_holder)
if(mood)
mood.mood_modifier = 0.8
/datum/trait/apathetic/remove()
GET_COMPONENT_FROM(mood, /datum/component/mood, trait_holder)
if(mood)
mood.mood_modifier = 1 //Change this once/if species get their own mood modifiers.
+107 -12
View File
@@ -1,5 +1,82 @@
//predominantly negative traits
/datum/trait/depression
name = "Depression"
desc = "You sometimes just hate life."
mob_trait = TRAIT_DEPRESSION
value = -1
gain_text = "<span class='danger'>You start feeling depressed.</span>"
lose_text = "<span class='notice'>You no longer feel depressed.</span>" //if only it were that easy!
medical_record_text = "Patient has a severe mood disorder causing them to experience sudden moments of sadness."
/datum/trait/family_heirloom
name = "Family Heirloom"
desc = "You are the current owner of an heirloom. passed down for generations. You have to keep it safe!"
value = -1
var/obj/item/heirloom
var/where_text
/datum/trait/family_heirloom/on_spawn()
var/mob/living/carbon/human/H = trait_holder
var/obj/item/heirloom_type
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS]) //on april fools, pick from any item in the game
var/list/heirlooms = subtypesof(/obj/item)
for(var/V in heirlooms)
var/obj/item/I = V
if((!initial(I.icon_state)) || (!initial(I.item_state)) || (initial(I.flags_1) & ABSTRACT_1))
heirlooms -= V
heirloom_type = pick(heirlooms)
else
switch(trait_holder.mind.assigned_role)
if("Clown")
heirloom_type = /obj/item/bikehorn/golden
if("Mime")
heirloom_type = /obj/item/reagent_containers/food/snacks/baguette
if("Lawyer")
heirloom_type = /obj/item/gavelhammer
if("Janitor")
heirloom_type = /obj/item/mop
if("Security Officer")
heirloom_type = /obj/item/book/manual/wiki/security_space_law
if("Scientist")
heirloom_type = /obj/item/toy/plush/slimeplushie
if("Assistant")
heirloom_type = /obj/item/storage/toolbox/mechanical/old/heirloom
if(!heirloom_type)
heirloom_type = pick(
/obj/item/toy/cards/deck,
/obj/item/lighter,
/obj/item/dice/d20)
heirloom = new heirloom_type(get_turf(trait_holder))
var/list/slots = list(
"in your backpack" = slot_in_backpack,
"in your left pocket" = slot_l_store,
"in your right pocket" = slot_r_store
)
var/where = H.equip_in_one_of_slots(heirloom, slots)
if(!where)
where = "at your feet"
if(where == "in your backpack")
var/obj/item/storage/B = H.back
B.orient2hud(trait_holder)
B.show_to(trait_holder)
where_text = "<span class='boldnotice'>There is a precious family [heirloom.name] [where], passed down from generation to generation. Keep it safe!</span>"
/datum/trait/family_heirloom/post_add()
to_chat(trait_holder, where_text)
var/list/family_name = splittext(trait_holder.real_name, " ")
heirloom.name = "\improper [family_name[family_name.len]] family [heirloom.name]"
/datum/trait/family_heirloom/process()
if(heirloom in trait_holder.GetAllContents())
trait_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "family_heirloom_missing")
trait_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "family_heirloom", /datum/mood_event/family_heirloom)
else
trait_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "family_heirloom")
trait_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "family_heirloom_missing", /datum/mood_event/family_heirloom_missing)
/datum/trait/heavy_sleeper
@@ -44,6 +121,27 @@
/datum/trait/nyctophobia
name = "Nyctophobia"
desc = "As far as you can remember, you've always been afraid of the dark. While in the dark without a light source, you instinctually act careful, and constantly feel a sense of dread."
value = -1
/datum/trait/nyctophobia/on_process()
var/mob/living/carbon/human/H = trait_holder
if(H.dna.species.id in list("shadow", "nightmare"))
return //we're tied with the dark, so we don't get scared of it; don't cleanse outright to avoid cheese
var/turf/T = get_turf(trait_holder)
var/lums = T.get_lumcount()
if(lums <= 0.2)
if(trait_holder.m_intent == MOVE_INTENT_RUN)
to_chat(trait_holder, "<span class='warning'>Easy, easy, take it slow... you're in the dark...</span>")
trait_holder.toggle_move_intent()
trait_holder.SendSignal(COMSIG_ADD_MOOD_EVENT, "nyctophobia", /datum/mood_event/nyctophobia)
else
trait_holder.SendSignal(COMSIG_CLEAR_MOOD_EVENT, "nyctophobia")
/datum/trait/nonviolent
name = "Pacifist"
desc = "The thought of violence makes you sick. So much so, in fact, that you can't hurt anyone."
@@ -156,21 +254,18 @@
var/dumb_thing = TRUE
/datum/trait/social_anxiety/on_process()
var/nearby_people = 0
for(var/mob/living/carbon/human/H in view(5, trait_holder))
if(H.client)
nearby_people++
var/mob/living/carbon/human/H = trait_holder
if(prob(5))
if(prob(2 + nearby_people))
H.stuttering = max(3, H.stuttering)
else if(prob(1) && !H.silent)
else if(prob(min(3, nearby_people)) && !H.silent)
to_chat(H, "<span class='danger'>You retreat into yourself. You <i>really</i> don't feel up to talking.</span>")
H.silent = max(10, H.silent)
else if(prob(0.5) && dumb_thing)
to_chat(H, "<span class='danger'>You think of a dumb thing you said a long time ago and scream internally.</span>")
to_chat(H, "<span class='userdanger'>You think of a dumb thing you said a long time ago and scream internally.</span>")
dumb_thing = FALSE //only once per life
/datum/trait/depression
name = "Depression"
desc = "You sometimes just hate life."
mob_trait = TRAIT_DEPRESSION
value = -1
gain_text = "<span class='danger'>You start feeling depressed.</span>"
lose_text = "<span class='notice'>You no longer feel depressed.</span>" //if only it were that easy!
medical_record_text = "Patient has a severe mood disorder causing them to experience sudden moments of sadness."
if(prob(1))
new/obj/item/reagent_containers/food/snacks/pastatomato(get_turf(H)) //now that's what I call spaghetti code
+19
View File
@@ -31,3 +31,22 @@
var/datum/species/species = H.dna.species
species.liked_food = initial(species.liked_food)
species.disliked_food = initial(species.disliked_food)
/datum/trait/monochromatic
name = "Monochromacy"
desc = "You suffer from full colorblindness, and perceive nearly the entire world in blacks and whites."
value = 0
medical_record_text = "Patient is afflicted with almost complete color blindness."
/datum/trait/monochromatic/add()
trait_holder.add_client_colour(/datum/client_colour/monochrome)
/datum/trait/monochromatic/post_add()
if(trait_holder.mind.assigned_role == "Detective")
to_chat(trait_holder, "<span class='boldannounce'>Mmm. Nothing's ever clear on this station. It's all shades of gray...</span>")
trait_holder.playsound_local(trait_holder, 'sound/ambience/ambidet1.ogg', 50, FALSE)
/datum/trait/monochromatic/remove()
trait_holder.remove_client_colour(/datum/client_colour/monochrome)
+3
View File
@@ -6,6 +6,9 @@
input.weak_reference = new /datum/weakref(input)
return input.weak_reference
/datum/proc/create_weakref() //Forced creation for admin proccalls
return WEAKREF(src)
/datum/weakref
var/reference