Merge pull request #12390 from Ghommie/Ghommie-cit800
Porting brain trauma updates: Curse of madness, cloning traumas, random brain trauma event.
This commit is contained in:
@@ -412,6 +412,8 @@
|
||||
give_guns(humanc)
|
||||
if(GLOB.summon_magic_triggered)
|
||||
give_magic(humanc)
|
||||
if(GLOB.curse_of_madness_triggered)
|
||||
give_madness(humanc, GLOB.curse_of_madness_triggered)
|
||||
|
||||
GLOB.joined_player_list += character.ckey
|
||||
GLOB.latejoiners += character
|
||||
|
||||
@@ -100,3 +100,9 @@
|
||||
client.mouse_pointer_icon = M.mouse_pointer
|
||||
if (client && ranged_ability && ranged_ability.ranged_mousepointer)
|
||||
client.mouse_pointer_icon = ranged_ability.ranged_mousepointer
|
||||
|
||||
/mob/living/brain/proc/get_traumas()
|
||||
. = list()
|
||||
if(istype(loc, /obj/item/organ/brain))
|
||||
var/obj/item/organ/brain/B = loc
|
||||
. = B.traumas
|
||||
|
||||
@@ -265,46 +265,3 @@
|
||||
if(update)
|
||||
update_damage_overlays()
|
||||
update_stamina()
|
||||
|
||||
/* TO_REMOVE
|
||||
/mob/living/carbon/getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
. = 0
|
||||
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(B)
|
||||
. = B.get_brain_damage()
|
||||
|
||||
//Some sources of brain damage shouldn't be deadly
|
||||
/mob/living/carbon/adjustOrganLoss(ORGAN_SLOT_BRAIN, amount, maximum = BRAIN_DAMAGE_DEATH)
|
||||
if(status_flags & GODMODE)
|
||||
return FALSE
|
||||
var/prev_brainloss = getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(!B)
|
||||
return
|
||||
B.adjust_brain_damage(amount, maximum)
|
||||
if(amount <= 0) //cut this early
|
||||
return
|
||||
var/brainloss = getOrganLoss(ORGAN_SLOT_BRAIN)
|
||||
if(brainloss > BRAIN_DAMAGE_MILD)
|
||||
if(prob(amount * ((2 * (100 + brainloss - BRAIN_DAMAGE_MILD)) / 100))) //Base chance is the hit damage; for every point of damage past the threshold the chance is increased by 2%
|
||||
gain_trauma_type(BRAIN_TRAUMA_MILD)
|
||||
if(brainloss > BRAIN_DAMAGE_SEVERE)
|
||||
if(prob(amount * ((2 * (100 + brainloss - BRAIN_DAMAGE_SEVERE)) / 100))) //Base chance is the hit damage; for every point of damage past the threshold the chance is increased by 2%
|
||||
if(prob(20))
|
||||
gain_trauma_type(BRAIN_TRAUMA_SPECIAL)
|
||||
else
|
||||
gain_trauma_type(BRAIN_TRAUMA_SEVERE)
|
||||
|
||||
if(prev_brainloss < BRAIN_DAMAGE_MILD && brainloss >= BRAIN_DAMAGE_MILD)
|
||||
to_chat(src, "<span class='warning'>You feel lightheaded.</span>")
|
||||
else if(prev_brainloss < BRAIN_DAMAGE_SEVERE && brainloss >= BRAIN_DAMAGE_SEVERE)
|
||||
to_chat(src, "<span class='warning'>You feel less in control of your thoughts.</span>")
|
||||
else if(prev_brainloss < (BRAIN_DAMAGE_DEATH - 20) && brainloss >= (BRAIN_DAMAGE_DEATH - 20))
|
||||
to_chat(src, "<span class='warning'>You can feel your mind flickering on and off...</span>")
|
||||
|
||||
/mob/living/carbon/setBrainLoss(amount)
|
||||
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(B)
|
||||
var/adjusted_amount = amount - B.get_brain_damage()
|
||||
B.adjust_brain_damage(adjusted_amount, null)
|
||||
*/
|
||||
|
||||
@@ -349,7 +349,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
/mob/proc/reagent_check(datum/reagent/R) // utilized in the species code
|
||||
return 1
|
||||
|
||||
/proc/notify_ghosts(message, ghost_sound, enter_link, atom/source, mutable_appearance/alert_overlay, action = NOTIFY_JUMP, flashwindow = TRUE, ignore_mapload = TRUE, ignore_key, ignore_dnr_observers = FALSE) //Easy notification of ghosts.
|
||||
/proc/notify_ghosts(message, ghost_sound, enter_link, atom/source, mutable_appearance/alert_overlay, action = NOTIFY_JUMP, flashwindow = TRUE, ignore_mapload = TRUE, ignore_key, ignore_dnr_observers = FALSE, header) //Easy notification of ghosts.
|
||||
if(ignore_mapload && SSatoms.initialized != INITIALIZATION_INNEW_REGULAR) //don't notify for objects created during a map load
|
||||
return
|
||||
for(var/mob/dead/observer/O in GLOB.player_list)
|
||||
@@ -366,6 +366,8 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
if(A)
|
||||
if(O.client.prefs && O.client.prefs.UI_style)
|
||||
A.icon = ui_style2icon(O.client.prefs.UI_style)
|
||||
if (header)
|
||||
A.name = header
|
||||
A.desc = message
|
||||
A.action = action
|
||||
A.target = source
|
||||
|
||||
Reference in New Issue
Block a user