Adds minor roundstart traits! (ala CDDA, etc.)

This commit is contained in:
Ashe Higgs
2018-03-01 19:39:44 -05:00
committed by CitadelStationBot
parent 3690cf3309
commit 0a449af83e
36 changed files with 825 additions and 52 deletions
@@ -379,6 +379,10 @@
if(SSshuttle.emergency.timeLeft(1) > initial(SSshuttle.emergencyCallTime)*0.5)
SSticker.mode.make_antag_chance(humanc)
for(var/V in character.roundstart_traits)
var/datum/trait/T = V
T.on_spawn() //so latejoins still get their correct traits
log_manifest(character.mind.key,character.mind,character,latejoin = TRUE)
/mob/dead/new_player/proc/AddEmploymentContract(mob/living/carbon/human/employee)
@@ -6,8 +6,14 @@
var/t_him = p_them()
var/t_has = p_have()
var/t_is = p_are()
var/obscure_name
var/msg = "<span class='info'>*---------*\nThis is <EM>[name]</EM>!\n"
if(isliving(user))
var/mob/living/L = user
if(L.has_trait(TRAIT_PROSOPAGNOSIA))
obscure_name = TRUE
var/msg = "<span class='info'>*---------*\nThis is <EM>[!obscure_name ? name : "Unknown"]</EM>!\n"
var/list/obscured = check_obscured_slots()
var/skipface = (wear_mask && (wear_mask.flags_inv & HIDEFACE)) || (head && (head.flags_inv & HIDEFACE))
@@ -269,6 +275,7 @@
if(digitalcamo)
msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly inhuman manner.\n"
var/traitstring = get_trait_string()
if(ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/cyberimp/eyes/hud/CIH = H.getorgan(/obj/item/organ/cyberimp/eyes/hud)
@@ -296,6 +303,10 @@
R = find_record("name", perpname, GLOB.data_core.medical)
if(R)
msg += "<a href='?src=[REF(src)];hud=m;evaluation=1'>\[Medical evaluation\]</a><br>"
if(traitstring)
msg += "<span class='info'>Detected physiological traits:<br></span>"
msg += "<span class='info'>[traitstring]</span><br>"
if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(CIH, /obj/item/organ/cyberimp/eyes/hud/security))
@@ -312,9 +323,14 @@
msg += "<a href='?src=[REF(src)];hud=s;add_crime=1'>\[Add crime\]</a> "
msg += "<a href='?src=[REF(src)];hud=s;view_comment=1'>\[View comment log\]</a> "
msg += "<a href='?src=[REF(src)];hud=s;add_comment=1'>\[Add comment\]</a>\n"
<<<<<<< HEAD
if(print_flavor_text() && get_visible_name() != "Unknown")//Are we sure we know who this is? Don't show flavor text unless we can recognize them. Prevents certain metagaming with impersonation.
msg += "[print_flavor_text()]\n"
=======
else if(isobserver(user) && traitstring)
msg += "<span class='info'><b>Traits:</b> [traitstring]</span><br>"
>>>>>>> ab9e2e8... Adds minor roundstart traits! (ala CDDA, etc.) (#35440)
msg += "*---------*</span>"
to_chat(user, msg)
@@ -655,24 +655,33 @@
if(prob(30))
burndamage += rand(30,40)
if(brutedamage > 0)
status = "bruised"
if(brutedamage > 20)
status = "battered"
if(brutedamage > 40)
status = "mangled"
if(brutedamage > 0 && burndamage > 0)
status += " and "
if(burndamage > 40)
status += "peeling away"
if(has_trait(TRAIT_SELF_AWARE))
status = "[brutedamage] brute damage and [burndamage] burn damage"
if(!brutedamage && !burndamage)
status = "no damage"
else if(burndamage > 10)
status += "blistered"
else if(burndamage > 0)
status += "numb"
if(status == "")
status = "OK"
to_chat(src, "\t <span class='[status == "OK" ? "notice" : "warning"]'>Your [LB.name] is [status].</span>")
else
if(brutedamage > 0)
status = "bruised"
if(brutedamage > 20)
status = "battered"
if(brutedamage > 40)
status = "mangled"
if(brutedamage > 0 && burndamage > 0)
status += " and "
if(burndamage > 40)
status += "peeling away"
else if(burndamage > 10)
status += "blistered"
else if(burndamage > 0)
status += "numb"
if(status == "")
status = "OK"
var/no_damage
if(status == "OK" || status == "no damage")
no_damage = TRUE
to_chat(src, "\t <span class='[no_damage ? "notice" : "warning"]'>Your [LB.name] [has_trait(TRAIT_SELF_AWARE) ? "has" : "is"] [status].</span>")
for(var/obj/item/I in LB.embedded_objects)
to_chat(src, "\t <a href='?src=[REF(src)];embedded_object=[REF(I)];embedded_limb=[REF(LB)]' class='warning'>There is \a [I] embedded in your [LB.name]!</a>")
@@ -687,6 +696,23 @@
to_chat(src, "<span class='info'>You're completely exhausted.</span>")
else
to_chat(src, "<span class='info'>You feel fatigued.</span>")
if(has_trait(TRAIT_SELF_AWARE))
if(toxloss)
if(toxloss > 10)
to_chat(src, "<span class='danger'>You feel sick.</span>")
else if(toxloss > 20)
to_chat(src, "<span class='danger'>You feel nauseous.</span>")
else if(toxloss > 40)
to_chat(src, "<span class='danger'>You feel very unwell!</span>")
if(oxyloss)
if(oxyloss > 10)
to_chat(src, "<span class='danger'>You feel lightheaded.</span>")
else if(oxyloss > 20)
to_chat(src, "<span class='danger'>Your thinking is clouded and distant.</span>")
else if(oxyloss > 30)
to_chat(src, "<span class='danger'>You're choking!</span>")
if(roundstart_traits.len)
to_chat(src, "<span class='notice'>You have these traits: [get_trait_string()].</span>")
else
if(wear_suit)
wear_suit.add_fingerprint(M)
@@ -9,6 +9,13 @@
/mob/living/carbon/human/Unconscious(amount, updating = 1, ignore_canunconscious = 0)
amount = dna.species.spec_stun(src,amount)
if(has_trait(TRAIT_HEAVY_SLEEPER))
amount *= rand(1.25, 1.3)
return ..()
/mob/living/carbon/human/Sleeping(amount, updating = 1, ignore_sleepimmune = 0)
if(has_trait(TRAIT_HEAVY_SLEEPER))
amount *= rand(1.25, 1.3)
return ..()
/mob/living/carbon/human/cure_husk(list/sources)
@@ -34,6 +34,8 @@
var/list/status_traits = list()
var/list/roundstart_traits = list()
var/list/surgeries = list() //a list of surgery datums. generally empty, they're added when the player wants them.
var/now_pushing = null //used by living/Collide() and living/PushAM() to prevent potential infinite loop.
+23 -1
View File
@@ -146,10 +146,23 @@
else
status_traits[trait] |= list(source)
/mob/living/proc/remove_trait(trait, list/sources)
/mob/living/proc/add_trait_datum(trait) //separate proc due to the way these ones are handled
if(has_trait(trait))
return
if(!SStraits || !SStraits.traits[trait])
return
var/datum/trait/T = SStraits.traits[trait]
new T (src)
return TRUE
/mob/living/proc/remove_trait(trait, list/sources, force)
if(!status_traits[trait])
return
if(locate(ROUNDSTART_TRAIT) in status_traits[trait] && !force) //mob traits applied through roundstart cannot normally be removed
return
if(!sources) // No defined source cures the trait entirely.
status_traits -= trait
return
@@ -167,6 +180,12 @@
if(!LAZYLEN(status_traits[trait]))
status_traits -= trait
/mob/living/proc/remove_trait_datum(trait)
var/datum/trait/T = roundstart_traits[trait]
if(T)
qdel(T)
return TRUE
/mob/living/proc/has_trait(trait, list/sources)
if(!status_traits[trait])
return FALSE
@@ -181,6 +200,9 @@
if(LAZYLEN(status_traits[trait]))
return TRUE
/mob/living/proc/has_trait_datum(trait)
return roundstart_traits[trait]
/mob/living/proc/remove_all_traits()
status_traits = list()
+1 -1
View File
@@ -9,7 +9,7 @@
/mob/living/carbon/get_taste_sensitivity()
var/obj/item/organ/tongue/tongue = getorganslot(ORGAN_SLOT_TONGUE)
if(istype(tongue))
if(istype(tongue) && !has_trait(TRAIT_AGEUSIA))
. = tongue.taste_sensitivity
else
. = 101 // can't taste anything without a tongue