mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +01:00
Merge branch 'master' into BREATHE
This commit is contained in:
@@ -286,6 +286,11 @@ INITIALIZE_IMMEDIATE(/mob/abstract/new_player)
|
||||
if (jobban_isbanned(src,rank))
|
||||
return FALSE
|
||||
|
||||
if(job.blacklisted_species) // check for restricted species
|
||||
var/datum/species/S = all_species[client.prefs.species]
|
||||
if(S.name in job.blacklisted_species)
|
||||
return FALSE
|
||||
|
||||
var/datum/faction/faction = SSjobs.name_factions[client.prefs.faction] || SSjobs.default_faction
|
||||
if (!(job.type in faction.allowed_role_types))
|
||||
return FALSE
|
||||
|
||||
@@ -78,7 +78,9 @@
|
||||
drop_l_hand()
|
||||
|
||||
if(healths)
|
||||
healths.icon_state = "health7"
|
||||
healths.overlays.Cut() // This is specific to humans but the relevant code is here; shouldn't mess with other mobs.
|
||||
if("health7" in icon_states(healths.icon))
|
||||
healths.icon_state = "health7"
|
||||
|
||||
timeofdeath = world.time
|
||||
if (isanimal(src))
|
||||
|
||||
@@ -249,7 +249,7 @@
|
||||
if(copytext(heardword,1, 1) in punctuation)
|
||||
heardword = copytext(heardword,2)
|
||||
if(copytext(heardword,-1) in punctuation)
|
||||
heardword = copytext(heardword,1,lentext(heardword))
|
||||
heardword = copytext(heardword,1,length(heardword))
|
||||
heard = "<span class = 'game_say'>...You hear something about...[heardword]</span>"
|
||||
|
||||
else
|
||||
|
||||
@@ -47,6 +47,11 @@
|
||||
var/echo = 0 //if it's an echo nymph, which has unique properties
|
||||
var/detached = FALSE
|
||||
|
||||
var/datum/reagents/metabolism/ingested
|
||||
|
||||
/mob/living/carbon/alien/diona/get_ingested_reagents()
|
||||
return ingested
|
||||
|
||||
/mob/living/carbon/alien/diona/proc/cleanupTransfer()
|
||||
if(!kept_clean)
|
||||
for(var/mob/living/carbon/alien/diona/D in birds_of_feather)
|
||||
@@ -257,7 +262,6 @@
|
||||
verbs.Remove(/mob/living/carbon/alien/diona/proc/grow)
|
||||
verbs.Remove(/mob/living/carbon/alien/diona/proc/merge)
|
||||
verbs.Remove(/mob/living/carbon/proc/absorb_nymph)
|
||||
verbs.Remove(/mob/living/proc/devour)
|
||||
verbs.Remove(/mob/living/carbon/alien/diona/proc/sample)
|
||||
else
|
||||
if (!(/mob/living/carbon/alien/diona/proc/merge in verbs) && !detached)
|
||||
@@ -269,9 +273,6 @@
|
||||
if (!(/mob/living/carbon/alien/diona/proc/grow in verbs))
|
||||
verbs.Add(/mob/living/carbon/alien/diona/proc/grow)
|
||||
|
||||
if (!(/mob/living/proc/devour in verbs))
|
||||
verbs.Add(/mob/living/proc/devour)
|
||||
|
||||
if (!(/mob/living/proc/ventcrawl in verbs))
|
||||
verbs.Add(/mob/living/proc/ventcrawl)
|
||||
|
||||
|
||||
@@ -16,95 +16,6 @@
|
||||
/obj/item/organ/internal/brain/xeno/gain_trauma()
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/brain/proc/clear_screen()
|
||||
if (brainmob && brainmob.client)
|
||||
brainmob.client.screen.Cut()
|
||||
|
||||
/obj/item/organ/internal/brain/Destroy()
|
||||
if(brainmob)
|
||||
qdel(brainmob)
|
||||
brainmob = null
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/brain/proc/transfer_identity(var/mob/living/carbon/H)
|
||||
brainmob = new(src)
|
||||
brainmob.name = H.real_name
|
||||
brainmob.real_name = H.real_name
|
||||
brainmob.dna = H.dna.Clone()
|
||||
brainmob.timeofhostdeath = H.timeofdeath
|
||||
if(H.mind)
|
||||
H.mind.transfer_to(brainmob)
|
||||
|
||||
to_chat(brainmob, "<span class='notice'>You feel slightly disoriented. That's normal when you're just a [initial(src.name)].</span>")
|
||||
callHook("debrain", list(brainmob))
|
||||
|
||||
/obj/item/organ/internal/brain/examine(mob/user) // -- TLE
|
||||
..(user)
|
||||
if(brainmob && brainmob.client)//if thar be a brain inside... the brain.
|
||||
to_chat(user, "You can feel the small spark of life still left in this one.")
|
||||
else
|
||||
to_chat(user, "This one seems particularly lifeless. Perhaps it will regain some of its luster later..")
|
||||
|
||||
/obj/item/organ/internal/brain/removed(var/mob/living/user)
|
||||
|
||||
for(var/X in traumas)
|
||||
var/datum/brain_trauma/BT = X
|
||||
BT.on_lose(TRUE)
|
||||
BT.owner = null
|
||||
|
||||
var/mob/living/simple_animal/borer/borer = owner.has_brain_worms()
|
||||
|
||||
if(borer)
|
||||
borer.detatch() //Should remove borer if the brain is removed - RR
|
||||
|
||||
var/obj/item/organ/internal/brain/B = src
|
||||
if(istype(B) && istype(owner))
|
||||
B.transfer_identity(owner)
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/brain/replaced(var/mob/living/target)
|
||||
|
||||
if(target.key)
|
||||
target.ghostize()
|
||||
|
||||
if(brainmob)
|
||||
if(brainmob.mind)
|
||||
brainmob.mind.transfer_to(target)
|
||||
else
|
||||
target.key = brainmob.key
|
||||
|
||||
for(var/X in traumas)
|
||||
var/datum/brain_trauma/BT = X
|
||||
BT.owner = owner
|
||||
BT.on_gain()
|
||||
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/brain/proc/lobotomize(mob/user as mob)
|
||||
lobotomized = 1
|
||||
|
||||
if(owner)
|
||||
to_chat(owner, "<span class='danger'>As part of your brain is drilled out, you feel your past self, your memories, your very being slip away...</span>")
|
||||
to_chat(owner, "<b>Your brain has been surgically altered to remove your memory recall. Your ability to recall your former life has been surgically removed from your brain, and while your brain is in this state you remember nothing that ever came before this moment.</b>")
|
||||
|
||||
else if(brainmob)
|
||||
to_chat(brainmob, "<span class='danger'>As part of your brain is drilled out, you feel your past self, your memories, your very being slip away...</span>")
|
||||
to_chat(brainmob, "<b>Your brain has been surgically altered to remove your memory recall. Your ability to recall your former life has been surgically removed from your brain, and while your brain is in this state you remember nothing that ever came before this moment.</b>")
|
||||
|
||||
return
|
||||
|
||||
/obj/item/organ/internal/brain/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/surgicaldrill))
|
||||
if(!can_lobotomize)
|
||||
return
|
||||
if(!lobotomized)
|
||||
user.visible_message("<span class='danger'>[user] drills [src] deftly with [W] into the brain!</span>")
|
||||
lobotomize(user)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The brain has already been operated on!</span>")
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/brain/slime
|
||||
name = "slime core"
|
||||
desc = "A complex, organic knot of jelly and crystalline particles."
|
||||
@@ -120,49 +31,3 @@
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "scroll"
|
||||
can_lobotomize = 0
|
||||
|
||||
|
||||
////////////////////////////////////TRAUMAS////////////////////////////////////////
|
||||
|
||||
/obj/item/organ/internal/brain/proc/has_trauma_type(brain_trauma_type, consider_permanent = FALSE)
|
||||
for(var/X in traumas)
|
||||
var/datum/brain_trauma/BT = X
|
||||
if(istype(BT, brain_trauma_type) && (consider_permanent || !BT.permanent))
|
||||
return BT
|
||||
|
||||
|
||||
//Add a specific trauma
|
||||
/obj/item/organ/internal/brain/proc/gain_trauma(datum/brain_trauma/trauma, permanent = FALSE, list/arguments)
|
||||
var/trauma_type
|
||||
if(ispath(trauma))
|
||||
trauma_type = trauma
|
||||
traumas += new trauma_type(arglist(list(src, permanent) + arguments))
|
||||
else
|
||||
traumas += trauma
|
||||
trauma.permanent = permanent
|
||||
|
||||
//Add a random trauma of a certain subtype
|
||||
/obj/item/organ/internal/brain/proc/gain_trauma_type(brain_trauma_type = /datum/brain_trauma, permanent = FALSE)
|
||||
var/list/datum/brain_trauma/possible_traumas = list()
|
||||
for(var/T in subtypesof(brain_trauma_type))
|
||||
var/datum/brain_trauma/BT = T
|
||||
if(initial(BT.can_gain))
|
||||
possible_traumas += BT
|
||||
|
||||
var/trauma_type = pick(possible_traumas)
|
||||
traumas += new trauma_type(src, permanent)
|
||||
|
||||
//Cure a random trauma of a certain subtype
|
||||
/obj/item/organ/internal/brain/proc/cure_trauma_type(brain_trauma_type, cure_permanent = FALSE)
|
||||
var/datum/brain_trauma/trauma = has_trauma_type(brain_trauma_type)
|
||||
if(trauma && (cure_permanent || !trauma.permanent))
|
||||
qdel(trauma)
|
||||
|
||||
/obj/item/organ/internal/brain/proc/cure_all_traumas(cure_permanent = FALSE, cure_type = "")
|
||||
for(var/X in traumas)
|
||||
var/datum/brain_trauma/trauma = X
|
||||
if(trauma.cure_type == cure_type || cure_type == CURE_ADMIN)
|
||||
if(cure_permanent || !trauma.permanent)
|
||||
qdel(trauma)
|
||||
if(cure_type != CURE_ADMIN)
|
||||
break
|
||||
@@ -28,7 +28,7 @@
|
||||
bloodstr.clear_reagents()
|
||||
touching.clear_reagents()
|
||||
var/datum/reagents/R = get_ingested_reagents()
|
||||
if(istype(R))
|
||||
if(istype(R))
|
||||
R.clear_reagents()
|
||||
breathing.clear_reagents()
|
||||
..()
|
||||
@@ -51,7 +51,7 @@
|
||||
germ_level++
|
||||
|
||||
/mob/living/carbon/relaymove(var/mob/living/user, direction)
|
||||
if((user in src.stomach_contents) && istype(user))
|
||||
if((user in contents) && istype(user))
|
||||
if(user.last_special <= world.time)
|
||||
user.last_special = world.time + 50
|
||||
src.visible_message("<span class='danger'>You hear something rumbling inside [src]'s stomach...</span>")
|
||||
@@ -71,19 +71,12 @@
|
||||
playsound(user.loc, 'sound/effects/attackblob.ogg', 50, 1)
|
||||
|
||||
if(prob(src.getBruteLoss() - 50))
|
||||
for(var/atom/movable/A in stomach_contents)
|
||||
A.forceMove(loc)
|
||||
LAZYREMOVE(stomach_contents, A)
|
||||
src.gib()
|
||||
|
||||
/mob/living/carbon/gib()
|
||||
for(var/mob/M in src)
|
||||
if(M in src.stomach_contents)
|
||||
LAZYREMOVE(src.stomach_contents, M)
|
||||
M.forceMove(src.loc)
|
||||
for(var/mob/N in viewers(src, null))
|
||||
if(N.client)
|
||||
N.show_message(text("<span class='danger'>[M] bursts out of [src]!</span>"), 2)
|
||||
for(var/mob/M in contents)
|
||||
M.dropInto(loc)
|
||||
visible_message("<span class='danger'>\The [M] bursts out of \the [src]!</span>")
|
||||
..()
|
||||
|
||||
/mob/living/carbon/attack_hand(mob/M as mob)
|
||||
@@ -212,11 +205,6 @@
|
||||
var/list/status = list()
|
||||
var/brutedamage = org.brute_dam
|
||||
var/burndamage = org.burn_dam
|
||||
if(getHalLoss() > 0)
|
||||
if(prob(30))
|
||||
brutedamage += getHalLoss()
|
||||
if(prob(30))
|
||||
burndamage += getHalLoss()
|
||||
switch(brutedamage)
|
||||
if(1 to 20)
|
||||
status += "bruised"
|
||||
@@ -246,9 +234,9 @@
|
||||
if(!org.is_usable())
|
||||
status += "dangling uselessly"
|
||||
if(status.len)
|
||||
src.show_message("My [org.name] is <span class='warning'> [english_list(status)].</span>",1)
|
||||
src.show_message("My [org.name] is <span class='warning'>[english_list(status)].</span>",1)
|
||||
else
|
||||
src.show_message("My [org.name] is <span class='notice'> OK.</span>",1)
|
||||
src.show_message("My [org.name] is <span class='notice'>OK.</span>",1)
|
||||
|
||||
if((isskeleton(H)) && (!H.w_uniform) && (!H.wear_suit))
|
||||
H.play_xylophone()
|
||||
|
||||
@@ -61,4 +61,35 @@
|
||||
|
||||
else
|
||||
to_chat(src, "You do not have enough chemicals stored to reproduce.")
|
||||
return
|
||||
return
|
||||
|
||||
/**
|
||||
* Attempt to devour victim
|
||||
*
|
||||
* Returns TRUE on success, FALSE on failure
|
||||
*/
|
||||
/mob/living/carbon/proc/devour(atom/movable/victim)
|
||||
var/can_eat = can_devour(victim)
|
||||
if(!can_eat)
|
||||
return FALSE
|
||||
|
||||
var/eat_speed = 100
|
||||
if(can_eat == DEVOUR_FAST)
|
||||
eat_speed = 30
|
||||
src.visible_message("<span class='danger'>\The [src] is attempting to devour \the [victim] whole!</span>")
|
||||
var/mob/target = victim
|
||||
if(isobj(victim))
|
||||
target = src
|
||||
if(!do_mob(src,target,eat_speed))
|
||||
return FALSE
|
||||
src.visible_message("<span class='danger'>\The [src] devours \the [victim] whole!</span>")
|
||||
if(ismob(victim))
|
||||
admin_attack_log(src, victim, "Devoured.", "Was devoured by.", "devoured")
|
||||
else
|
||||
src.drop_from_inventory(victim)
|
||||
move_to_stomach(victim)
|
||||
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/proc/move_to_stomach(atom/movable/victim)
|
||||
return
|
||||
|
||||
@@ -164,7 +164,7 @@ var/list/diona_banned_languages = list(
|
||||
//Next up, damage healing. Diona are only vulnerable to four of the six damage types
|
||||
//Oxyloss doesn't apply because they don't breathe, and are thus immune to aquiring it in any way
|
||||
//Brain damage is irrelevant because they have no brain.
|
||||
if (health < 100)
|
||||
if (health < (species ? species.total_health : 200))
|
||||
CL = getBruteLoss()
|
||||
|
||||
if (CL > 0)
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
verbs += /mob/living/carbon/human/proc/diona_split_nymph
|
||||
verbs += /mob/living/carbon/human/proc/diona_detach_nymph
|
||||
verbs += /mob/living/carbon/human/proc/pause_regen_process
|
||||
verbs += /mob/living/proc/devour
|
||||
|
||||
spawn(10)
|
||||
//This is delayed after a gestalt is spawned, to allow nymphs to be added to it before extras are created
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
msg += ", a <b><font color='[species.examine_color || species.flesh_color]'>[species.name]</font></b>"
|
||||
msg += "!\n"
|
||||
|
||||
if (species && species.has_organ[BP_IPCTAG] && internal_organs_by_name[BP_IPCTAG])
|
||||
if (should_have_organ(BP_IPCTAG) && internal_organs_by_name[BP_IPCTAG])
|
||||
msg += "[T.He] [T.is] wearing a tag designating them as Integrated Positronic Chassis <b>[src.real_name]</b>.\n"
|
||||
|
||||
//uniform
|
||||
@@ -366,7 +366,7 @@
|
||||
|
||||
msg += "*---------*</span>"
|
||||
if (pose)
|
||||
if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 )
|
||||
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
|
||||
pose = addtext(pose,".") //Makes sure all emotes end with a period.
|
||||
msg += "\n[T.He] [pose]"
|
||||
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
if(mind)
|
||||
mind.name = real_name
|
||||
|
||||
// Randomize nutrition and hydration. Defines are in __defines/mobs.dm
|
||||
if(max_nutrition > 0)
|
||||
nutrition = rand(CREW_MINIMUM_NUTRITION*100, CREW_MAXIMUM_NUTRITION*100) * max_nutrition * 0.01
|
||||
if(max_hydration > 0)
|
||||
hydration = rand(CREW_MINIMUM_HYDRATION*100, CREW_MAXIMUM_HYDRATION*100) * max_hydration * 0.01
|
||||
|
||||
hud_list[HEALTH_HUD] = new /image/hud_overlay('icons/mob/hud_med.dmi', src, "100")
|
||||
hud_list[STATUS_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
hud_list[ID_HUD] = new /image/hud_overlay('icons/hud/hud_security.dmi', src, "hudunknown")
|
||||
@@ -959,7 +965,7 @@
|
||||
|
||||
playsound(get_turf(src), 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
/mob/living/carbon/human/vomit(var/timevomit = 1, var/level = 3, var/deliberate = FALSE)
|
||||
/mob/living/carbon/human/proc/vomit(var/timevomit = 1, var/level = 3, var/deliberate = FALSE)
|
||||
|
||||
set waitfor = 0
|
||||
|
||||
@@ -1703,32 +1709,32 @@
|
||||
/mob/living/carbon/human/proc/get_traumas()
|
||||
. = list()
|
||||
var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN]
|
||||
if(B && species && species.has_organ[BP_BRAIN] && !isipc(src))
|
||||
if(B && should_have_organ(BP_BRAIN) && !isipc(src))
|
||||
. = B.traumas
|
||||
|
||||
/mob/living/carbon/human/proc/has_trauma_type(brain_trauma_type, consider_permanent = FALSE)
|
||||
var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN]
|
||||
if(B && species && species.has_organ[BP_BRAIN] && !isipc(src))
|
||||
if(B && should_have_organ(BP_BRAIN) && !isipc(src))
|
||||
. = B.has_trauma_type(brain_trauma_type, consider_permanent)
|
||||
|
||||
/mob/living/carbon/human/proc/gain_trauma(datum/brain_trauma/trauma, permanent = FALSE, list/arguments)
|
||||
var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN]
|
||||
if(B && species && species.has_organ[BP_BRAIN] && !isipc(src))
|
||||
if(B && should_have_organ(BP_BRAIN) && !isipc(src))
|
||||
. = B.gain_trauma(trauma, permanent, arguments)
|
||||
|
||||
/mob/living/carbon/human/proc/gain_trauma_type(brain_trauma_type = /datum/brain_trauma, permanent = FALSE)
|
||||
var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN]
|
||||
if(B && species && species.has_organ[BP_BRAIN] && !isipc(src))
|
||||
if(B && should_have_organ(BP_BRAIN) && !isipc(src))
|
||||
. = B.gain_trauma_type(brain_trauma_type, permanent)
|
||||
|
||||
/mob/living/carbon/human/proc/cure_trauma_type(brain_trauma_type, cure_permanent = FALSE)
|
||||
var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN]
|
||||
if(B && species && species.has_organ[BP_BRAIN] && !isipc(src))
|
||||
if(B && should_have_organ(BP_BRAIN) && !isipc(src))
|
||||
. = B.cure_trauma_type(brain_trauma_type, cure_permanent)
|
||||
|
||||
/mob/living/carbon/human/proc/cure_all_traumas(cure_permanent = FALSE, cure_type = "")
|
||||
var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN]
|
||||
if(B && species && species.has_organ[BP_BRAIN] && !isipc(src))
|
||||
if(B && should_have_organ(BP_BRAIN) && !isipc(src))
|
||||
. = B.cure_all_traumas(cure_permanent, cure_type)
|
||||
|
||||
/mob/living/carbon/human/get_metabolism(metabolism)
|
||||
@@ -1785,6 +1791,11 @@
|
||||
var/obj/item/organ/internal/heart/heart = internal_organs_by_name[BP_HEART]
|
||||
return heart ? heart.pulse : PULSE_NONE
|
||||
|
||||
/mob/living/carbon/human/move_to_stomach(atom/movable/victim)
|
||||
var/obj/item/organ/internal/stomach/stomach = internal_organs_by_name[BP_STOMACH]
|
||||
if(istype(stomach))
|
||||
victim.forceMove(stomach)
|
||||
|
||||
/mob/living/carbon/human/need_breathe()
|
||||
if(!(mNobreath in mutations) && species.breathing_organ && species.has_organ[species.breathing_organ])
|
||||
return 1
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
visible_message("<span class='danger'>[H] has punched [src]!</span>")
|
||||
|
||||
apply_damage(damage, HALLOSS, affecting, armor_block)
|
||||
apply_damage(damage, PAIN, affecting, armor_block)
|
||||
if(damage >= 9)
|
||||
visible_message("<span class='danger'>[H] has weakened [src]!</span>")
|
||||
apply_effect(4, WEAKEN, armor_block)
|
||||
@@ -327,7 +327,7 @@
|
||||
real_damage += G.punch_force
|
||||
hit_dam_type = G.punch_damtype
|
||||
if(H.pulling_punches)
|
||||
hit_dam_type = HALLOSS
|
||||
hit_dam_type = PAIN
|
||||
|
||||
if(G.sharp)
|
||||
is_sharp = 1
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
stat = CONSCIOUS
|
||||
return
|
||||
|
||||
update_health_display()
|
||||
|
||||
health = maxHealth - getBrainLoss()
|
||||
|
||||
//TODO: fix husking
|
||||
@@ -386,7 +384,7 @@ This function restores all organs.
|
||||
|
||||
/mob/living/carbon/human/proc/get_organ(var/zone)
|
||||
if(!zone) zone = BP_CHEST
|
||||
if (zone in list( BP_EYES, "mouth" ))
|
||||
if (zone in list( BP_EYES, BP_MOUTH ))
|
||||
zone = BP_HEAD
|
||||
return organs_by_name[zone]
|
||||
|
||||
@@ -400,7 +398,7 @@ This function restores all organs.
|
||||
|
||||
//Handle other types of damage
|
||||
if(damagetype != BRUTE && damagetype != BURN)
|
||||
if(!stat && damagetype == HALLOSS && (can_feel_pain()))
|
||||
if(!stat && damagetype == PAIN && (can_feel_pain()))
|
||||
if ((damage > 25 && prob(20)) || (damage > 50 && prob(60)))
|
||||
emote("scream")
|
||||
|
||||
@@ -465,4 +463,8 @@ This function restores all organs.
|
||||
|
||||
if(stat == UNCONSCIOUS)
|
||||
traumatic_shock *= 0.6
|
||||
return max(0,traumatic_shock)
|
||||
return max(0,traumatic_shock)
|
||||
|
||||
/mob/living/carbon/human/remove_blood_simple(var/blood)
|
||||
if(should_have_organ(BP_HEART))
|
||||
vessel.remove_reagent("blood", blood)
|
||||
|
||||
@@ -272,7 +272,7 @@ emp_act
|
||||
if(effective_force > 10 || effective_force >= 5 && prob(33))
|
||||
forcesay(hit_appends) //forcesay checks stat already
|
||||
|
||||
if((I.damtype == BRUTE || I.damtype == HALLOSS) && prob(25 + (effective_force * 2)))
|
||||
if((I.damtype == BRUTE || I.damtype == PAIN) && prob(25 + (effective_force * 2)))
|
||||
if(!stat)
|
||||
if(headcheck(hit_zone))
|
||||
//Harder to score a stun but if you do it lasts a bit longer
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
var/health_deficiency = (100 - health)
|
||||
if(health_deficiency >= 40) tally += (health_deficiency / 25)
|
||||
|
||||
if (can_feel_pain())
|
||||
var/halloss = getHalLoss()
|
||||
if(halloss >= 10)
|
||||
tally += (halloss / 10) //halloss shouldn't slow you down if you can't even feel it
|
||||
if(can_feel_pain())
|
||||
if(get_shock() >= 10) tally += (get_shock() / 10) //pain shouldn't slow you down if you can't even feel it
|
||||
|
||||
for(var/obj/item/I in list(wear_suit, w_uniform, back, gloves, head))
|
||||
tally += I.slowdown
|
||||
|
||||
@@ -206,3 +206,28 @@
|
||||
if(!istype(heart) || !heart.is_working())
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/proc/get_brain_status()
|
||||
var/brain_result
|
||||
if(should_have_organ(BP_BRAIN))
|
||||
var/obj/item/organ/internal/brain/brain = internal_organs_by_name[BP_BRAIN]
|
||||
if(!brain || stat == DEAD || (status_flags & FAKEDEATH))
|
||||
brain_result = 0
|
||||
else if(stat != DEAD)
|
||||
brain_result = round(max(0,(1 - brain.damage/brain.max_damage)*100))
|
||||
else
|
||||
brain_result = -1
|
||||
|
||||
switch(brain_result)
|
||||
if(0)
|
||||
brain_result = "<span class='bad'>none, patient is braindead</span>"
|
||||
if(-1)
|
||||
brain_result = "<span class='average'>ERROR - Nonstandard biology</span>"
|
||||
else
|
||||
if(brain_result <= 50)
|
||||
brain_result = "<span class='bad'>[brain_result]%</span>"
|
||||
else if(brain_result <= 80)
|
||||
brain_result = "<span class='average'>[brain_result]%</span>"
|
||||
else
|
||||
brain_result = "[brain_result]%"
|
||||
return brain_result
|
||||
|
||||
@@ -314,20 +314,6 @@ mob/living/carbon/human/proc/change_monitor()
|
||||
else if(prob(50))
|
||||
to_chat(H,"<span class='warning'>Your mind buzzes...</span>")
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/regurgitate()
|
||||
set name = "Regurgitate"
|
||||
set desc = "Empties the contents of your stomach"
|
||||
set category = "Abilities"
|
||||
|
||||
if(LAZYLEN(stomach_contents))
|
||||
for(var/mob/M in src)
|
||||
if(M in stomach_contents)
|
||||
LAZYREMOVE(stomach_contents, M)
|
||||
M.forceMove(loc)
|
||||
src.visible_message(span("danger", "\The [src] hurls out the contents of their stomach!"))
|
||||
return
|
||||
|
||||
/mob/living/carbon/human/proc/psychic_whisper(mob/M as mob in oview())
|
||||
set name = "Psychic Whisper"
|
||||
set desc = "Whisper silently to someone over a distance."
|
||||
|
||||
@@ -222,40 +222,6 @@
|
||||
speech_problem_flag = 1
|
||||
if (prob(10))
|
||||
stuttering = max(10, stuttering)
|
||||
// No. -- cib
|
||||
/*if (getBrainLoss() >= 60 && stat != 2)
|
||||
if (prob(3))
|
||||
switch(pick(1,2,3))
|
||||
if(1)
|
||||
say(pick("IM A PONY NEEEEEEIIIIIIIIIGH", "without oxigen blob don't evoluate?", "CAPTAINS A COMDOM", "[pick("", "that meatball traitor")] [pick("joerge", "george", "gorge", "gdoruge")] [pick("mellens", "melons", "mwrlins")] is grifing me HAL;P!!!", "can u give me [pick("telikesis","halk","eppilapse")]?", "THe saiyans screwed", "Bi is THE BEST OF BOTH WORLDS>", "I WANNA PET TEH monkeyS", "stop grifing me!!!!", "SOTP IT#"))
|
||||
if(2)
|
||||
say(pick("FUS RO DAH","fucking 4rries!", "stat me", ">my face", "roll it easy!", "waaaaaagh!!!", "red wonz go fasta", "FOR TEH EMPRAH", "lol2cat", "dem dwarfs man, dem dwarfs", "SPESS MAHREENS", "hwee did eet fhor khayosss", "lifelike texture ;_;", "luv can bloooom", "PACKETS!!!"))
|
||||
if(3)
|
||||
emote("drool")
|
||||
*/
|
||||
|
||||
if(stat != DEAD)
|
||||
var/rn = rand(0, 200)
|
||||
var/bloss = getBrainLoss()
|
||||
if(bloss >= 5)
|
||||
if(0 <= rn && rn <= 3)
|
||||
custom_pain("Your head feels numb and painful.")
|
||||
if(bloss >= 15)
|
||||
if(4 <= rn && rn <= 6) if(eye_blurry <= 0)
|
||||
to_chat(src, "<span class='warning'>It becomes hard to see for some reason.</span>")
|
||||
eye_blurry = 10
|
||||
if(bloss >= 35)
|
||||
if(7 <= rn && rn <= 9) if(get_active_hand())
|
||||
to_chat(src, "<span class='danger'>Your hand won't respond properly, you drop what you're holding!</span>")
|
||||
drop_item()
|
||||
if(bloss >= 45)
|
||||
if(10 <= rn && rn <= 12)
|
||||
if(prob(50))
|
||||
to_chat(src, "<span class='danger'>You suddenly black out!</span>")
|
||||
Paralyse(10)
|
||||
else if(!lying)
|
||||
to_chat(src, "<span class='danger'>Your legs won't respond properly, you fall down!</span>")
|
||||
Weaken(10)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_stasis_bag()
|
||||
// Handle side effects from stasis bag
|
||||
@@ -878,10 +844,9 @@
|
||||
if(!..())
|
||||
return
|
||||
|
||||
if(stat == UNCONSCIOUS)
|
||||
//Critical damage passage overlay
|
||||
if(health < maxHealth/2)
|
||||
var/ovr = "passage0"
|
||||
if(stat != DEAD)
|
||||
if(stat == UNCONSCIOUS && health < maxHealth/2)
|
||||
var/ovr
|
||||
switch(health - maxHealth/2)
|
||||
if(-20 to -10)
|
||||
ovr = "passage1"
|
||||
@@ -908,22 +873,9 @@
|
||||
damageoverlay.cut_overlay(last_brute_overlay)
|
||||
damageoverlay.add_overlay(ovr)
|
||||
last_brute_overlay = ovr
|
||||
else
|
||||
//Oxygen damage overlay
|
||||
update_oxy_overlay()
|
||||
|
||||
// Vampire frenzy overlay.
|
||||
if (mind.vampire)
|
||||
if (mind.vampire.status & VAMP_FRENZIED)
|
||||
if (!last_frenzy_state)
|
||||
damageoverlay.add_overlay("frenzyoverlay")
|
||||
last_frenzy_state = TRUE
|
||||
else if (last_frenzy_state)
|
||||
damageoverlay.cut_overlay("frenzyoverlay")
|
||||
last_frenzy_state = FALSE
|
||||
else if (last_frenzy_state)
|
||||
damageoverlay.cut_overlay("frenzyoverlay")
|
||||
last_frenzy_state = FALSE
|
||||
else
|
||||
//Oxygen damage overlay
|
||||
update_oxy_overlay()
|
||||
|
||||
//Fire and Brute damage overlay (BSSR)
|
||||
var/hurtdamage = src.getBruteLoss() + src.getFireLoss() + damageoverlaytemp
|
||||
@@ -948,11 +900,43 @@
|
||||
damageoverlay.cut_overlay(last_brute_overlay)
|
||||
damageoverlay.add_overlay(ovr)
|
||||
last_brute_overlay = ovr
|
||||
else if (last_brute_overlay)
|
||||
damageoverlay.cut_overlay(last_brute_overlay)
|
||||
last_brute_overlay = null
|
||||
|
||||
update_health_display()
|
||||
if(healths)
|
||||
healths.overlays.Cut()
|
||||
if (chem_effects[CE_PAINKILLER] > 100)
|
||||
healths.icon_state = "health_numb"
|
||||
else
|
||||
// Generate a by-limb health display.
|
||||
healths.icon_state = "blank"
|
||||
|
||||
var/no_damage = 1
|
||||
var/trauma_val = 0 // Used in calculating softcrit/hardcrit indicators.
|
||||
if(can_feel_pain())
|
||||
trauma_val = max(shock_stage,get_shock())/(species.total_health-100)
|
||||
// Collect and apply the images all at once to avoid appearance churn.
|
||||
var/list/health_images = list()
|
||||
for(var/obj/item/organ/external/E in organs)
|
||||
if(no_damage && (E.brute_dam || E.burn_dam))
|
||||
no_damage = 0
|
||||
health_images += E.get_damage_hud_image()
|
||||
|
||||
// Apply a fire overlay if we're burning.
|
||||
if(on_fire)
|
||||
health_images += image('icons/mob/screen1_health.dmi',"burning")
|
||||
|
||||
// Show a general pain/crit indicator if needed.
|
||||
if(is_asystole())
|
||||
health_images += image('icons/mob/screen1_health.dmi',"hardcrit")
|
||||
else if(trauma_val)
|
||||
if(can_feel_pain())
|
||||
if(trauma_val > 0.7)
|
||||
health_images += image('icons/mob/screen1_health.dmi',"softcrit")
|
||||
if(trauma_val >= 1)
|
||||
health_images += image('icons/mob/screen1_health.dmi',"hardcrit")
|
||||
else if(no_damage)
|
||||
health_images += image('icons/mob/screen1_health.dmi',"fullhealth")
|
||||
|
||||
healths.overlays += health_images
|
||||
|
||||
//Update hunger and thirst UI less often, its not important
|
||||
if((life_tick % 3 == 0))
|
||||
@@ -1170,6 +1154,8 @@
|
||||
holder.icon_state = "0" // X_X
|
||||
else if(is_asystole())
|
||||
holder.icon_state = "flatline"
|
||||
else if(isFBP(src))
|
||||
holder.icon_state = "2"
|
||||
else
|
||||
holder.icon_state = "[pulse()]"
|
||||
hud_list[HEALTH_HUD] = holder
|
||||
@@ -1362,7 +1348,7 @@
|
||||
if (!exhaust_threshold) // Also quit if there's no exhaust threshold specified, because division by 0 is amazing.
|
||||
return
|
||||
|
||||
if (failed_last_breath || (getOxyLoss() + getHalLoss()) > exhaust_threshold)//Can't catch our breath if we're suffocating
|
||||
if (failed_last_breath || (getOxyLoss() + get_shock()) > exhaust_threshold)//Can't catch our breath if we're suffocating
|
||||
flash_pain()
|
||||
return
|
||||
|
||||
@@ -1379,7 +1365,7 @@
|
||||
if (stamina != max_stamina)
|
||||
//Any suffocation damage slows stamina regen.
|
||||
//This includes oxyloss from low blood levels
|
||||
var/regen = stamina_recovery * (1 - min(((getOxyLoss()) / exhaust_threshold) + ((getHalLoss()) / exhaust_threshold), 1))
|
||||
var/regen = stamina_recovery * (1 - min(((getOxyLoss()) / exhaust_threshold) + ((get_shock()) / exhaust_threshold), 1))
|
||||
if (regen > 0)
|
||||
stamina = min(max_stamina, stamina+regen)
|
||||
adjustNutritionLoss(stamina_recovery*0.09)
|
||||
@@ -1387,42 +1373,6 @@
|
||||
if (client)
|
||||
hud_used.move_intent.update_move_icon(src)
|
||||
|
||||
/mob/living/carbon/human/proc/update_health_display()
|
||||
if(!healths)
|
||||
return
|
||||
|
||||
var/new_state
|
||||
if (stat == DEAD)
|
||||
new_state = "health7"
|
||||
else if (analgesic > 100)
|
||||
new_state = "health_numb"
|
||||
else
|
||||
switch(hal_screwyhud)
|
||||
if(1)
|
||||
new_state = "health6"
|
||||
if(2)
|
||||
new_state = "health7"
|
||||
else
|
||||
//switch(health - halloss)
|
||||
switch(health - get_shock())
|
||||
if(100 to INFINITY)
|
||||
new_state = "health0"
|
||||
if(80 to 100)
|
||||
new_state = "health1"
|
||||
if(60 to 80)
|
||||
new_state = "health2"
|
||||
if(40 to 60)
|
||||
new_state = "health3"
|
||||
if(20 to 40)
|
||||
new_state = "health4"
|
||||
if(0 to 20)
|
||||
new_state = "health5"
|
||||
else
|
||||
new_state = "health6"
|
||||
|
||||
if (healths.icon_state != new_state)
|
||||
healths.icon_state = new_state
|
||||
|
||||
/mob/living/carbon/human/proc/update_oxy_overlay()
|
||||
var/new_oxy
|
||||
if(getOxyLoss())
|
||||
|
||||
@@ -147,16 +147,6 @@
|
||||
if(parent[3])
|
||||
speech_problem_flag = 1
|
||||
|
||||
var/braindam = getBrainLoss()
|
||||
if(braindam >= 60)
|
||||
speech_problem_flag = 1
|
||||
if(prob(braindam/4))
|
||||
message = get_stuttered_message(message)
|
||||
verb = pick("stammers", "stutters")
|
||||
if(prob(braindam))
|
||||
message = uppertext(message)
|
||||
verb = "yells loudly"
|
||||
|
||||
var/list/returns[4]
|
||||
returns[1] = message
|
||||
returns[2] = verb
|
||||
|
||||
@@ -82,6 +82,11 @@
|
||||
|
||||
hud_type = /datum/hud_data/construct
|
||||
|
||||
/datum/species/skeleton/handle_death_check(var/mob/living/carbon/human/H)
|
||||
if(H.get_total_health() <= config.health_threshold_dead)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/apparition/Initialize(mapload)
|
||||
. = ..(mapload, "Apparition")
|
||||
|
||||
@@ -168,7 +173,8 @@
|
||||
|
||||
has_organ = list(
|
||||
"zombie" = /obj/item/organ/internal/parasite/zombie,
|
||||
BP_BRAIN = /obj/item/organ/internal/brain
|
||||
BP_BRAIN = /obj/item/organ/internal/brain,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach
|
||||
)
|
||||
|
||||
virus_immune = 1
|
||||
@@ -195,11 +201,11 @@
|
||||
sprint_speed_factor = 0.3
|
||||
exhaust_threshold = 0 //No oxyloss, so zero threshold
|
||||
|
||||
inherent_verbs = list(/mob/living/carbon/human/proc/darkness_eyes, /mob/living/proc/devour)
|
||||
inherent_verbs = list(/mob/living/carbon/human/proc/darkness_eyes)
|
||||
|
||||
allowed_eat_types = TYPE_ORGANIC | TYPE_HUMANOID
|
||||
|
||||
gluttonous = TRUE
|
||||
gluttonous = 1
|
||||
|
||||
/datum/species/zombie/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
H.mutations.Add(CLUMSY)
|
||||
@@ -270,7 +276,6 @@
|
||||
/mob/living/carbon/human/proc/commune,
|
||||
/mob/living/carbon/human/proc/sonar_ping,
|
||||
/mob/living/carbon/human/proc/darkness_eyes,
|
||||
/mob/living/proc/devour
|
||||
)
|
||||
|
||||
flesh_color = "#8CD7A3"
|
||||
@@ -278,9 +283,4 @@
|
||||
|
||||
remains_type = /obj/effect/decal/remains/xeno
|
||||
|
||||
has_organ = list(
|
||||
"zombie" = /obj/item/organ/internal/parasite/zombie,
|
||||
/obj/item/organ/internal/brain/skrell
|
||||
)
|
||||
|
||||
default_h_style = "Skrell Short Tentacles"
|
||||
@@ -36,7 +36,7 @@
|
||||
cold_level_3 = 0
|
||||
|
||||
eyes = "vox_eyes_s"
|
||||
gluttonous = TRUE
|
||||
gluttonous = 2
|
||||
virus_immune = 1
|
||||
|
||||
breath_type = "nitrogen"
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
var/grab_mod = 1 // How easy it is to grab the species. Higher is harder to grab.
|
||||
var/metabolism_mod = 1 // Reagent metabolism modifier
|
||||
var/bleed_mod = 1 // How fast this species bleeds.
|
||||
var/blood_volume = DEFAULT_BLOOD_SPECIES // Blood volume.
|
||||
var/blood_volume = DEFAULT_BLOOD_AMOUNT // Blood volume.
|
||||
|
||||
var/vision_flags = DEFAULT_SIGHT // Same flags as glasses.
|
||||
var/inherent_eye_protection // If set, this species has this level of inherent eye protection.
|
||||
@@ -138,6 +138,7 @@
|
||||
// HUD data vars.
|
||||
var/datum/hud_data/hud
|
||||
var/hud_type
|
||||
var/health_hud_intensity = 1
|
||||
|
||||
// Body/form vars.
|
||||
var/list/inherent_verbs // Species-specific verbs.
|
||||
@@ -213,7 +214,7 @@
|
||||
|
||||
var/list/allowed_citizenships = list(CITIZENSHIP_BIESEL, CITIZENSHIP_SOL, CITIZENSHIP_FRONTIER, CITIZENSHIP_ELYRA, CITIZENSHIP_ERIDANI, CITIZENSHIP_DOMINIA)
|
||||
var/list/allowed_religions = list(RELIGION_NONE, RELIGION_OTHER, RELIGION_CHRISTIANITY, RELIGION_ISLAM, RELIGION_JUDAISM, RELIGION_HINDU, RELIGION_BUDDHISM, RELIGION_MOROZ, RELIGION_TRINARY, RELIGION_SCARAB)
|
||||
|
||||
var/default_citizenship = CITIZENSHIP_BIESEL
|
||||
var/zombie_type //What zombie species they become
|
||||
var/list/character_color_presets
|
||||
|
||||
@@ -516,10 +517,10 @@
|
||||
|
||||
H.adjustHalLoss(remainder*0.25)
|
||||
H.updatehealth()
|
||||
if((H.getHalLoss() >= 10) && prob(H.getHalLoss() *2))
|
||||
if((H.get_shock() >= 10) && prob(H.get_shock() *2))
|
||||
H.flash_pain()
|
||||
|
||||
if ((H.getHalLoss() + H.getOxyLoss()) >= (exhaust_threshold * 0.8))
|
||||
if ((H.get_shock() + H.getOxyLoss()) >= (exhaust_threshold * 0.8))
|
||||
H.m_intent = "walk"
|
||||
H.hud_used.move_intent.update_move_icon(H)
|
||||
to_chat(H, span("danger", "You're too exhausted to run anymore!"))
|
||||
@@ -574,4 +575,4 @@
|
||||
return FALSE
|
||||
|
||||
/datum/species/proc/get_digestion_product()
|
||||
return /datum/reagent/nutriment
|
||||
return "nutriment"
|
||||
@@ -38,7 +38,7 @@
|
||||
return 0
|
||||
|
||||
switch(zone)
|
||||
if(BP_HEAD, "mouth", BP_EYES)
|
||||
if(BP_HEAD, BP_MOUTH, BP_EYES)
|
||||
// ----- HEAD ----- //
|
||||
switch(attack_damage)
|
||||
if(1 to 2)
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
light_power = 0.5
|
||||
meat_type = /obj/item/stack/material/steel
|
||||
unarmed_types = list(
|
||||
/datum/unarmed_attack/punch,
|
||||
/datum/unarmed_attack/stomp,
|
||||
/datum/unarmed_attack/punch,
|
||||
/datum/unarmed_attack/stomp,
|
||||
/datum/unarmed_attack/kick)
|
||||
rarity_value = 2
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
max_hydration_factor = -1
|
||||
|
||||
allowed_citizenships = list(CITIZENSHIP_NONE, CITIZENSHIP_BIESEL, CITIZENSHIP_FRONTIER, CITIZENSHIP_ERIDANI)
|
||||
default_citizenship = CITIZENSHIP_NONE
|
||||
|
||||
// Special snowflake machine vars.
|
||||
var/sprint_temperature_factor = 1.15
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
|
||||
allowed_citizenships = list(CITIZENSHIP_JARGON, CITIZENSHIP_BIESEL, CITIZENSHIP_SOL, CITIZENSHIP_FRONTIER, CITIZENSHIP_ELYRA, CITIZENSHIP_ERIDANI, CITIZENSHIP_DOMINIA)
|
||||
allowed_religions = list(RELIGION_QEBLAK, RELIGION_WEISHII, RELIGION_NONE, RELIGION_OTHER, RELIGION_CHRISTIANITY, RELIGION_ISLAM, RELIGION_MOROZ)
|
||||
default_citizenship = CITIZENSHIP_JARGON
|
||||
|
||||
zombie_type = "Skrell Zombie"
|
||||
|
||||
|
||||
@@ -67,7 +67,8 @@
|
||||
|
||||
default_h_style = "Tajaran Ears"
|
||||
|
||||
allowed_citizenships = list(CITIZENSHIP_PRA, CITIZENSHIP_BIESEL, CITIZENSHIP_FRONTIER, CITIZENSHIP_ELYRA, CITIZENSHIP_ERIDANI, CITIZENSHIP_DOMINIA)
|
||||
allowed_citizenships = list(CITIZENSHIP_PRA, CITIZENSHIP_DPRA, CITIZENSHIP_NKA)
|
||||
default_citizenship = CITIZENSHIP_PRA
|
||||
allowed_religions = list(RELIGION_TWINSUNS, RELIGION_MATAKE, RELIGION_RASKARA, RELIGION_NONE, RELIGION_OTHER, RELIGION_CHRISTIANITY, RELIGION_ISLAM, RELIGION_MOROZ)
|
||||
|
||||
zombie_type = "Tajara Zombie"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
)
|
||||
primitive_form = "Stok"
|
||||
darksight = 3
|
||||
gluttonous = 1
|
||||
gluttonous = 2
|
||||
slowdown = 0.5
|
||||
brute_mod = 0.8
|
||||
grab_mod = 0.75
|
||||
@@ -55,8 +55,6 @@
|
||||
heat_level_3 = 1100 //Default 1000
|
||||
|
||||
inherent_verbs = list(
|
||||
/mob/living/proc/devour,
|
||||
/mob/living/carbon/human/proc/regurgitate,
|
||||
/mob/living/carbon/human/proc/tongue_flick
|
||||
)
|
||||
|
||||
@@ -87,6 +85,7 @@
|
||||
|
||||
allowed_citizenships = list(CITIZENSHIP_IZWESKI, CITIZENSHIP_DOMINIA, CITIZENSHIP_BIESEL, CITIZENSHIP_SOL, CITIZENSHIP_FRONTIER, CITIZENSHIP_ELYRA, CITIZENSHIP_ERIDANI)
|
||||
allowed_religions = list(RELIGION_THAKH, RELIGION_SKAKH, RELIGION_AUTAKH, RELIGION_MOROZ, RELIGION_NONE, RELIGION_OTHER, RELIGION_CHRISTIANITY, RELIGION_ISLAM)
|
||||
default_citizenship = CITIZENSHIP_IZWESKI
|
||||
|
||||
zombie_type = "Unathi Zombie"
|
||||
|
||||
|
||||
@@ -52,8 +52,6 @@
|
||||
heat_level_3 = 1000 //Default 1000
|
||||
|
||||
inherent_verbs = list(
|
||||
/mob/living/proc/devour,
|
||||
/mob/living/carbon/human/proc/regurgitate,
|
||||
/mob/living/carbon/human/proc/detach_limb,
|
||||
/mob/living/carbon/human/proc/attach_limb,
|
||||
/mob/living/carbon/human/proc/self_diagnostics,
|
||||
|
||||
@@ -119,6 +119,7 @@
|
||||
|
||||
allowed_citizenships = list(CITIZENSHIP_ZORA, CITIZENSHIP_IZWESKI, CITIZENSHIP_BIESEL, CITIZENSHIP_ERIDANI, CITIZENSHIP_JARGON)
|
||||
allowed_religions = list(RELIGION_HIVEPANTHEON, RELIGION_PREIMMINENNCE, RELIGION_PILOTDREAM, RELIGION_NONE, RELIGION_OTHER)
|
||||
default_citizenship = CITIZENSHIP_ZORA
|
||||
|
||||
/datum/species/bug/before_equip(var/mob/living/carbon/human/H)
|
||||
. = ..()
|
||||
|
||||
@@ -56,7 +56,7 @@ var/global/list/sparring_attack_cache = list()
|
||||
|
||||
if(attack_damage >= 5 && armour < 100 && !(target == user) && stun_chance <= attack_damage * 5) // 25% standard chance
|
||||
switch(zone) // strong punches can have effects depending on where they hit
|
||||
if(BP_HEAD, "mouth", BP_EYES)
|
||||
if(BP_HEAD, BP_MOUTH, BP_EYES)
|
||||
// Induce blurriness
|
||||
if(pain_message)
|
||||
target.visible_message("<span class='danger'>[target] looks momentarily disoriented.</span>", "<span class='danger'>You see stars.</span>")
|
||||
@@ -91,7 +91,7 @@ var/global/list/sparring_attack_cache = list()
|
||||
if(!target.lying)
|
||||
if(pain_message)
|
||||
target.visible_message("<span class='warning'>[target] gives way slightly.</span>")
|
||||
target.apply_effect(attack_damage*3, AGONY, armour)
|
||||
target.apply_effect(attack_damage*3, PAIN, armour)
|
||||
else if(attack_damage >= 5 && !(target == user) && (stun_chance + attack_damage * 5 >= 100) && armour < 100) // Chance to get the usual throwdown as well (25% standard chance)
|
||||
if(!target.lying)
|
||||
target.visible_message("<span class='danger'>[target] [pick("slumps", "falls", "drops")] down to the ground!</span>")
|
||||
@@ -128,7 +128,7 @@ var/global/list/sparring_attack_cache = list()
|
||||
|
||||
if (user.wear_mask && istype(user.wear_mask, /obj/item/clothing/mask/muzzle))
|
||||
return 0
|
||||
if (user == target && (zone == BP_HEAD || zone == BP_EYES || zone == "mouth"))
|
||||
if (user == target && (zone == BP_HEAD || zone == BP_EYES || zone == BP_MOUTH))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -156,7 +156,7 @@ var/global/list/sparring_attack_cache = list()
|
||||
|
||||
if(!target.lying)
|
||||
switch(zone)
|
||||
if(BP_HEAD, "mouth", BP_EYES)
|
||||
if(BP_HEAD, BP_MOUTH, BP_EYES)
|
||||
// ----- HEAD ----- //
|
||||
switch(attack_damage)
|
||||
if(1 to 2)
|
||||
@@ -280,7 +280,7 @@ var/global/list/sparring_attack_cache = list()
|
||||
if(5) user.visible_message("<span class='danger'>[pick("[user] landed a powerful stomp on", "[user] stomped down hard on", "[user] slammed \his [shoes ? copytext(shoes.name, 1, -1) : "foot"] down hard onto")] [target]'s [organ]!</span>") //Devastated lol. No. We want to say that the stomp was powerful or forceful, not that it /wrought devastation/
|
||||
|
||||
/datum/unarmed_attack/light_strike
|
||||
damage_type = HALLOSS
|
||||
damage_type = PAIN
|
||||
attack_noun = list("tap","light strike")
|
||||
attack_verb = list("tapped", "lightly struck")
|
||||
damage = 2
|
||||
|
||||
@@ -431,7 +431,7 @@ There are several things that need to be remembered:
|
||||
standing.underlays += "telekinesishead[fat]_s"
|
||||
add_image = 1
|
||||
*/
|
||||
if(LASER)
|
||||
if(LASER_EYES)
|
||||
standing.overlays += "lasereyes_s"
|
||||
add_image = 1
|
||||
if(add_image)
|
||||
|
||||
@@ -58,11 +58,8 @@
|
||||
var/list/handle_r = handle_speech_problems(message)
|
||||
message = handle_r[1]
|
||||
verb = handle_r[2]
|
||||
if(verb == "yells loudly")
|
||||
verb = "slurs emphatically"
|
||||
else
|
||||
var/adverb = pick("quietly", "softly")
|
||||
verb = "[verb] [adverb]"
|
||||
var/adverb = pick("quietly", "softly")
|
||||
verb = "[verb] [adverb]"
|
||||
|
||||
speech_problem_flag = handle_r[3]
|
||||
|
||||
|
||||
@@ -60,6 +60,10 @@
|
||||
|
||||
var/core_removal_stage = 0 //For removing cores.
|
||||
var/toxloss = 0
|
||||
var/datum/reagents/metabolism/ingested
|
||||
|
||||
/mob/living/carbon/slime/get_ingested_reagents()
|
||||
return ingested
|
||||
|
||||
/mob/living/carbon/slime/Initialize(mapload, colour = "grey")
|
||||
. = ..()
|
||||
|
||||
@@ -91,4 +91,4 @@ calculate text size per text.
|
||||
return "[temp_text][temp_text ? " " : ""][english_list(out, "something indescribable")]."
|
||||
|
||||
/mob/living/carbon/proc/get_fullness()
|
||||
return nutrition + (reagents.get_reagent_amount(/datum/reagent/nutriment) * 25)
|
||||
return nutrition + (reagents.get_reagent_amount("nutriment") * 25)
|
||||
@@ -22,7 +22,7 @@
|
||||
adjustOxyLoss(damage * BLOCKED_MULT(blocked))
|
||||
if(CLONE)
|
||||
adjustCloneLoss(damage * BLOCKED_MULT(blocked))
|
||||
if(HALLOSS)
|
||||
if(PAIN)
|
||||
adjustHalLoss(damage * BLOCKED_MULT(blocked))
|
||||
flash_weak_pain()
|
||||
updatehealth()
|
||||
@@ -36,7 +36,7 @@
|
||||
if(tox) apply_damage(tox, TOX, def_zone, blocked)
|
||||
if(oxy) apply_damage(oxy, OXY, def_zone, blocked)
|
||||
if(clone) apply_damage(clone, CLONE, def_zone, blocked)
|
||||
if(halloss) apply_damage(halloss, HALLOSS, def_zone, blocked)
|
||||
if(halloss) apply_damage(halloss, PAIN, def_zone, blocked)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
Weaken(effect * BLOCKED_MULT(blocked))
|
||||
if(PARALYZE)
|
||||
Paralyse(effect * BLOCKED_MULT(blocked))
|
||||
if(AGONY)
|
||||
if(PAIN)
|
||||
adjustHalLoss(effect * BLOCKED_MULT(blocked)) //Changed this to use the wrapper function, it shouldn't directly alter the value
|
||||
if(IRRADIATE)
|
||||
var/rad_protection = blocked ? getarmor(null, "rad")/100 : 0
|
||||
@@ -77,7 +77,7 @@
|
||||
if(stutter) apply_effect(stutter, STUTTER, blocked)
|
||||
if(eyeblur) apply_effect(eyeblur, EYE_BLUR, blocked)
|
||||
if(drowsy) apply_effect(drowsy, DROWSY, blocked)
|
||||
if(agony) apply_effect(agony, AGONY, blocked)
|
||||
if(agony) apply_effect(agony, PAIN, blocked)
|
||||
if(incinerate) apply_effect(incinerate, INCINERATE, blocked)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -1,310 +0,0 @@
|
||||
//This file contains variables and helper functions for mobs that can eat other mobs
|
||||
|
||||
//There are two ways to eat a mob:
|
||||
//Swallowing whole can only be done if the mob is sufficiently small
|
||||
//It will place the mob inside you, and slowly digest it,
|
||||
//Digesting deals brute+fire damage to the victim and adds protein to your stomach based on the damage dealt.
|
||||
//Mob will be deleted from your contents when fully digested.
|
||||
//Mob is fully digested when it has taken fire+brute damage equal to its max health plus 50% (calculated after death)
|
||||
|
||||
//Devouring eats the mob piece by piece. Taking a bite periodically
|
||||
//Each bite deals genetic damage, and drains blood.
|
||||
//Adds protein to your stomach based on quantities.
|
||||
//Mob is fully digested when it has taken genetic damage equal to its max health. This continues past death if necessary
|
||||
//Devouring is interrupted if you or the mob move away from each other, or if the eater gets disabled.
|
||||
|
||||
#define PPM 9 //Protein per meat, used for calculating the quantity of protein in an animal
|
||||
|
||||
/mob/living
|
||||
var/mob/living/devouring // The mob we're currently eating, if any.
|
||||
|
||||
/mob/living/proc/attempt_devour(var/mob/living/victim, var/eat_types, var/mouth_size = null)
|
||||
|
||||
//This function will attempt to eat the victim,
|
||||
//either by swallowing them if they're small enough, or starting to devour them otherwise
|
||||
//If a mouth_size is passed in, it will be used instead of this mob's size, for determining whether the victim is small enough to swallow
|
||||
//This function is the main gateway to devouring, and will have all the safety checks
|
||||
if (!victim)
|
||||
return 0
|
||||
|
||||
face_atom(victim)
|
||||
|
||||
if (victim == src)
|
||||
to_chat(src, "<span class='warning'>You can't eat yourself!</span>")
|
||||
return 0
|
||||
|
||||
if (devouring == victim)
|
||||
to_chat(src, span("notice","You stop eating [victim]."))
|
||||
devouring = null
|
||||
return
|
||||
|
||||
if (ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/obj/item/blocked = H.check_mouth_coverage()
|
||||
if(blocked)
|
||||
to_chat(src, "<span class='warning'>\The [blocked] is in the way!</span>")
|
||||
return
|
||||
|
||||
//This check is exploit prevention.
|
||||
//Nymphs have seperate mechanics for gaining biomass from other diona
|
||||
//This check prevents the exploit of almost-devouring a nymph, and then absorbing it to gain double biomass
|
||||
if (victim.is_diona() && src.is_diona())
|
||||
to_chat(src, "<span class='warning'>You can't eat other diona!</span>")
|
||||
return 0
|
||||
|
||||
if (!src.Adjacent(victim))
|
||||
to_chat(src, "<span class='warning'>That creature is too far away, move closer!</span>")
|
||||
return 0
|
||||
|
||||
if (!is_valid_for_devour(victim, eat_types))
|
||||
to_chat(src, "<span class='warning'>You can't eat that type of creature!</span>")
|
||||
return 0
|
||||
|
||||
if (!victim.mob_size || !src.mob_size)
|
||||
to_chat(src, "<span class='danger'>Error, no mob size defined for [victim.type]! You have encountered a bug, report it on github </span>")
|
||||
return 0
|
||||
|
||||
if (!mouth_size)
|
||||
mouth_size = src.mob_size
|
||||
|
||||
if (victim.mob_size <= mouth_size)
|
||||
swallow(victim, mouth_size)
|
||||
else
|
||||
devour_gradual(victim,mouth_size)
|
||||
|
||||
/mob/living/proc/swallow(var/mob/living/victim, var/mouth_size)
|
||||
set waitfor = FALSE
|
||||
//This function will move the victim inside the eater's contents.. There they will be digested over time
|
||||
|
||||
var/swallow_time = max(3 + (victim.mob_size * victim.mob_size) - mouth_size, 3)
|
||||
src.visible_message("[src] starts swallowing \the [victim]!","You start swallowing \the [victim], this will take approximately [swallow_time] seconds.")
|
||||
var/turf/ourloc = src.loc
|
||||
var/turf/victimloc = victim.loc
|
||||
devouring = victim
|
||||
if (do_mob(src, victim, swallow_time*10, extra_checks = CALLBACK(src, .proc/devouring_equals, victim)))
|
||||
victim.forceMove(src)
|
||||
LAZYADD(stomach_contents, victim)
|
||||
else if (victimloc != victim.loc)
|
||||
to_chat(src, "[victim] moved away, you need to keep it still. Try grabbing, stunning or killing it first.")
|
||||
else if (ourloc != src.loc)
|
||||
to_chat(src, "You moved! Can't eat if you move away from the victim")
|
||||
else if (devouring)
|
||||
to_chat(src, "Swallowing failed!")//reason unknown, maybe the eater got stunned?)
|
||||
|
||||
devouring = null
|
||||
|
||||
/mob/living/proc/devour_gradual(var/mob/living/victim, var/mouth_size)
|
||||
set waitfor = FALSE
|
||||
//This function will start consuming the victim by taking bites out of them.
|
||||
//Victim or attacker moving will interrupt it
|
||||
//A bite will be taken every 4 seconds
|
||||
devouring = victim
|
||||
var/bite_delay = 4
|
||||
var/bite_size = mouth_size * 0.5
|
||||
var/num_bites_needed = (victim.mob_size*victim.mob_size)/bite_size//total bites needed to eat it from full health
|
||||
var/PEPB = 1/num_bites_needed//Percentage eaten per bite
|
||||
var/turf/ourloc = src.loc
|
||||
var/turf/victimloc = victim.loc
|
||||
var/messes = 0//number of bloodstains we've placed
|
||||
var/datum/reagents/vessel = victim.get_vessel(1)
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(!victim.composition_reagent_quantity)
|
||||
victim.calculate_composition()
|
||||
|
||||
var/victim_maxhealth = victim.maxHealth//We cache this here incase we need to edit it, for example, for humans and anything else that doesn't die until negative health
|
||||
|
||||
//Now, incase we're resuming an earlier feeding session on the same creature
|
||||
//We calculate the actual bites needed to fully eat it based on how eaten it already is
|
||||
if (victim.getCloneLoss())
|
||||
var/percentageDamaged = victim.getCloneLoss() / victim_maxhealth
|
||||
var/percentageRemaining = 1 - percentageDamaged
|
||||
num_bites_needed = percentageRemaining / PEPB
|
||||
|
||||
var/time_needed_seconds = num_bites_needed*bite_delay//in seconds for now
|
||||
var/time_needed_minutes
|
||||
var/time_needed_string
|
||||
if (time_needed_seconds > 60)
|
||||
time_needed_minutes = round((time_needed_seconds/60))
|
||||
time_needed_seconds = time_needed_seconds % 60
|
||||
time_needed_string = "[time_needed_minutes] minutes and [time_needed_seconds] seconds"
|
||||
else
|
||||
time_needed_string = "[time_needed_seconds] seconds"
|
||||
|
||||
|
||||
|
||||
|
||||
src.visible_message("<span class='danger'>[src] starts devouring [victim]</span>","<span class='danger'>You start devouring [victim], this will take approximately [time_needed_string]. You and the victim must remain still to continue, but you can interrupt feeding anytime and leave with what you've already eaten.</span>")
|
||||
|
||||
for (var/i = 0 to num_bites_needed)
|
||||
if(do_mob(src, victim, bite_delay*10, extra_checks = CALLBACK(src, .proc/devouring_equals, victim)))
|
||||
face_atom(victim)
|
||||
victim.apply_damage(victim_maxhealth*PEPB,HALLOSS)
|
||||
victim.apply_damage(victim_maxhealth*PEPB*5,CLONE)
|
||||
var/obj/item/organ/internal/stomach/S = H.internal_organs_by_name[BP_STOMACH]
|
||||
if(S)
|
||||
S.ingested.add_reagent(victim.composition_reagent, victim.composition_reagent_quantity*PEPB)
|
||||
visible_message("<span class='danger'>[src] bites a chunk out of [victim]</span>","<span class='danger'>[bitemessage(victim)]</span>")
|
||||
if (messes < victim.mob_size - 1 && prob(50))
|
||||
handle_devour_mess(src, victim, vessel)
|
||||
if (victim.getCloneLoss() >= victim_maxhealth)
|
||||
visible_message("[src] finishes devouring [victim].","You finish devouring [victim].")
|
||||
handle_devour_mess(src, victim, vessel, 1)
|
||||
qdel(victim)
|
||||
devouring = null
|
||||
break
|
||||
else
|
||||
devouring = null
|
||||
if(H.nutrition >= H.max_nutrition - 60)
|
||||
to_chat(src, "<span class='danger'>You can't eat anymore!</span>")
|
||||
if (victim && victimloc != victim.loc)
|
||||
to_chat(src, "<span class='danger'>[victim] moved away, you need to keep it still. Try grabbing, stunning or killing it first.</span>")
|
||||
else if (ourloc != src.loc)
|
||||
to_chat(src, "<span class='danger'>You moved! Devouring cancelled.</span>")
|
||||
else
|
||||
to_chat(src, "Devouring cancelled.")//reason unknown, maybe the eater got stunned?)
|
||||
//This can also happen if you start devouring something else
|
||||
break
|
||||
|
||||
/mob/living/proc/devouring_equals(target)
|
||||
return target && devouring == target
|
||||
|
||||
//this function gradually digests things inside the mob's contents.
|
||||
//It is called from life.dm. Any creatures that don't want to digest their contents simply don't call it
|
||||
/mob/living/proc/handle_stomach()
|
||||
if (stomach_contents)
|
||||
for(var/thing in stomach_contents)
|
||||
var/mob/living/M = thing
|
||||
if(M.loc != src)//if something somehow escaped the stomach, then we remove it
|
||||
LAZYREMOVE(stomach_contents, M)
|
||||
continue
|
||||
|
||||
if(!M.composition_reagent_quantity)
|
||||
M.calculate_composition()
|
||||
|
||||
var/dmg_factor = 2*log(M.mob_size) // log(n) is natural log in BYOND.
|
||||
if (dmg_factor <= 0)
|
||||
dmg_factor = 0.5
|
||||
|
||||
M.adjustBruteLoss(round(dmg_factor * 0.33, 0.1) || 0.1)
|
||||
M.adjustFireLoss(round(dmg_factor * 0.66, 0.1) || 0.1)
|
||||
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/obj/item/organ/internal/stomach/S = H.internal_organs_by_name[BP_STOMACH]
|
||||
if(S)
|
||||
S.ingested.add_reagent(M.composition_reagent, M.composition_reagent_quantity * dmg_factor)
|
||||
|
||||
if (M.stat == DEAD && !stomach_contents[M]) // If the mob has died, poke the consuming mob about it.
|
||||
to_chat(src, "Your stomach feels a little more relaxed as \the [M] finally stops fighting.")
|
||||
stomach_contents[M] = TRUE // So the message doesn't play more than once.
|
||||
continue
|
||||
|
||||
var/damage_dealt = (M.getFireLoss() * 0.66) + (M.getBruteLoss() * 0.33)
|
||||
if (stomach_contents[M] && (damage_dealt >= M.maxHealth * 1.5)) //If we've consumed all of it (plus a bit), then digestion is finished.
|
||||
LAZYREMOVE(stomach_contents, M)
|
||||
to_chat(src, "Your stomach feels a little more empty as you finish digesting \the [M].")
|
||||
qdel(M)
|
||||
|
||||
//Helpers
|
||||
/proc/bitemessage(var/mob/living/victim)
|
||||
return pick(
|
||||
"You take a bite out of \the [victim].",
|
||||
"You rip a chunk off of \the [victim].",
|
||||
"You consume a piece of \the [victim].",
|
||||
"You feast upon your prey.",
|
||||
"You chow down on \the [victim].",
|
||||
"You gobble \the [victim]'s flesh.")
|
||||
|
||||
/proc/handle_devour_mess(var/mob/user, var/mob/living/victim, var/datum/reagents/vessel, var/finish = 0)
|
||||
//The maximum number of blood placements is equal to the mob size of the victim
|
||||
//We will use one blood placement on each of the following, in this order
|
||||
//Bloodying the victim's tile
|
||||
//Bloodying the attacker, if possible
|
||||
//Bloodying the attacker's tile
|
||||
//After that, we will allocate the remaining blood placements to random tiles around the victim and attacker, until either all are used or victim is dead
|
||||
var/datum/reagent/blood/B = vessel.get_master_reagent()
|
||||
|
||||
if (!turf_hasblood(get_turf(victim)))
|
||||
devour_add_blood(victim, get_turf(victim), vessel)
|
||||
return 1
|
||||
|
||||
else if (istype(user, /mob/living/carbon/human) && !user.blood_DNA)
|
||||
//if this blood isn't already in the list, add it
|
||||
user.blood_DNA = list(B.data["blood_DNA"])
|
||||
user.blood_color = B.data["blood_color"]
|
||||
user.update_inv_gloves() //handles bloody hands overlays and updating
|
||||
user.verbs += /mob/living/carbon/human/proc/bloody_doodle
|
||||
return 1
|
||||
|
||||
else if (!turf_hasblood(get_turf(user)))
|
||||
devour_add_blood(victim, get_turf(user), vessel)
|
||||
return 1
|
||||
|
||||
if (finish)
|
||||
//A bigger victim makes more gibs
|
||||
if (victim.mob_size >= 3)
|
||||
new /obj/effect/decal/cleanable/blood/gibs(get_turf(victim))
|
||||
if (victim.mob_size >= 5)
|
||||
new /obj/effect/decal/cleanable/blood/gibs(get_turf(victim))
|
||||
if (victim.mob_size >= 7)
|
||||
new /obj/effect/decal/cleanable/blood/gibs(get_turf(victim))
|
||||
if (victim.mob_size >= 9)
|
||||
new /obj/effect/decal/cleanable/blood/gibs(get_turf(victim))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/devour_add_blood(var/mob/living/M, var/turf/location, var/datum/reagents/vessel)
|
||||
for(var/datum/reagent/blood/source in vessel.reagent_list)
|
||||
var/obj/effect/decal/cleanable/blood/B = new /obj/effect/decal/cleanable/blood(location)
|
||||
|
||||
// Update appearance.
|
||||
if(source.data["blood_colour"])
|
||||
B.basecolor = source.data["blood_colour"]
|
||||
B.update_icon()
|
||||
|
||||
// Update blood information.
|
||||
if(source.data["blood_DNA"])
|
||||
B.blood_DNA = list()
|
||||
if(source.data["blood_type"])
|
||||
B.blood_DNA[source.data["blood_DNA"]] = source.data["blood_type"]
|
||||
else
|
||||
B.blood_DNA[source.data["blood_DNA"]] = "O+"
|
||||
|
||||
// Update virus information.
|
||||
if(source.data["virus2"])
|
||||
B.virus2 = virus_copylist(source.data["virus2"])
|
||||
|
||||
B.fluorescent = 0
|
||||
B.invisibility = 0
|
||||
|
||||
/proc/turf_hasblood(var/turf/test)
|
||||
for (var/obj/effect/decal/cleanable/blood/b in test)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/is_valid_for_devour(var/mob/living/test, var/eat_types)
|
||||
//eat_types must contain all types that the mob has. For example we need both humanoid and synthetic to eat an IPC.
|
||||
var/test_types = test.find_type()
|
||||
. = (eat_types & test_types) == test_types
|
||||
|
||||
/mob/living/proc/calculate_composition()
|
||||
if (!composition_reagent)//if no reagent has been set, then we'll set one
|
||||
var/type = find_type(src)
|
||||
if (type & TYPE_SYNTHETIC)
|
||||
src.composition_reagent = "iron"
|
||||
else
|
||||
src.composition_reagent = "protein"
|
||||
|
||||
//if the mob is a simple animal with a defined meat quantity
|
||||
if (istype(src, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/SA = src
|
||||
if (SA.meat_amount)
|
||||
src.composition_reagent_quantity = SA.meat_amount*2*PPM
|
||||
|
||||
//The quantity of protein is based on the meat_amount, but multiplied by 2
|
||||
|
||||
var/size_reagent = (src.mob_size * src.mob_size) * 3//The quantity of protein is set to 3x mob size squared
|
||||
if (size_reagent > src.composition_reagent_quantity)//We take the larger of the two
|
||||
src.composition_reagent_quantity = size_reagent
|
||||
|
||||
#undef PPM
|
||||
@@ -37,9 +37,6 @@
|
||||
//Check if we're on fire
|
||||
handle_fire()
|
||||
|
||||
//stuff in the stomach
|
||||
handle_stomach()
|
||||
|
||||
update_pulling()
|
||||
|
||||
for(var/obj/item/grab/G in src)
|
||||
@@ -78,10 +75,6 @@
|
||||
/mob/living/proc/handle_environment(var/datum/gas_mixture/environment)
|
||||
return
|
||||
|
||||
// Defined in devour.dm
|
||||
// /mob/living/proc/handle_stomach()
|
||||
// return
|
||||
|
||||
/mob/living/proc/update_pulling()
|
||||
if(pulling)
|
||||
if(incapacitated())
|
||||
|
||||
@@ -370,7 +370,7 @@ default behaviour is:
|
||||
/mob/living/proc/get_organ_target()
|
||||
var/mob/shooter = src
|
||||
var/t = shooter:zone_sel.selecting
|
||||
if ((t in list( BP_EYES, "mouth" )))
|
||||
if ((t in list( BP_EYES, BP_MOUTH )))
|
||||
t = BP_HEAD
|
||||
var/obj/item/organ/external/def_zone = ran_zone(t)
|
||||
return def_zone
|
||||
@@ -801,10 +801,13 @@ default behaviour is:
|
||||
return 1
|
||||
|
||||
/mob/living/Destroy()
|
||||
for (var/thing in stomach_contents)
|
||||
qdel(thing)
|
||||
stomach_contents = null
|
||||
QDEL_NULL(ingested)
|
||||
if(loc)
|
||||
for(var/mob/M in contents)
|
||||
M.dropInto(loc)
|
||||
else
|
||||
for(var/mob/M in contents)
|
||||
qdel(M)
|
||||
QDEL_NULL(reagents)
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -812,4 +815,32 @@ default behaviour is:
|
||||
return FALSE
|
||||
|
||||
/mob/living/proc/get_digestion_product()
|
||||
return null
|
||||
return null
|
||||
|
||||
|
||||
/proc/is_valid_for_devour(var/mob/living/test, var/eat_types)
|
||||
//eat_types must contain all types that the mob has. For example we need both humanoid and synthetic to eat an IPC.
|
||||
var/test_types = test.find_type()
|
||||
. = (eat_types & test_types) == test_types
|
||||
|
||||
#define PPM 9 //Protein per meat, used for calculating the quantity of protein in an animal
|
||||
/mob/living/proc/calculate_composition()
|
||||
if (!composition_reagent)//if no reagent has been set, then we'll set one
|
||||
var/type = find_type(src)
|
||||
if (type & TYPE_SYNTHETIC)
|
||||
src.composition_reagent = "iron"
|
||||
else
|
||||
src.composition_reagent = "protein"
|
||||
|
||||
//if the mob is a simple animal with a defined meat quantity
|
||||
if (istype(src, /mob/living/simple_animal))
|
||||
var/mob/living/simple_animal/SA = src
|
||||
if (SA.meat_amount)
|
||||
src.composition_reagent_quantity = SA.meat_amount*2*PPM
|
||||
|
||||
//The quantity of protein is based on the meat_amount, but multiplied by 2
|
||||
|
||||
var/size_reagent = (src.mob_size * src.mob_size) * 3//The quantity of protein is set to 3x mob size squared
|
||||
if (size_reagent > src.composition_reagent_quantity)//We take the larger of the two
|
||||
src.composition_reagent_quantity = size_reagent
|
||||
#undef PPM
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone)
|
||||
/mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone, var/used_weapon = null)
|
||||
|
||||
//Being hit while using a cloaking device
|
||||
var/obj/item/cloaking_device/C = locate(/obj/item/cloaking_device) in src
|
||||
@@ -96,7 +96,7 @@
|
||||
proj_edge = 0
|
||||
|
||||
if(!P.nodamage)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, 0, P, sharp=proj_sharp, edge=proj_edge, damage_flags = P.damage_flags)
|
||||
apply_damage(P.damage, P.damage_type, def_zone, absorb, 0, P, sharp=proj_sharp, edge=proj_edge, damage_flags = P.damage_flags, used_weapon = "\the [P.shot_from] [P.name]")
|
||||
P.on_hit(src, absorb, def_zone)
|
||||
return absorb
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
apply_effect(EYE_BLUR, stun_amount)
|
||||
|
||||
if (agony_amount)
|
||||
apply_damage(agony_amount, HALLOSS, def_zone, 0, used_weapon)
|
||||
apply_damage(agony_amount, PAIN, def_zone, 0, used_weapon)
|
||||
apply_effect(STUTTER, agony_amount/10)
|
||||
apply_effect(EYE_BLUR, agony_amount/10)
|
||||
|
||||
|
||||
@@ -37,12 +37,10 @@
|
||||
var/failed_last_breath = 0 //This is used to determine if the mob failed a breath. If they did fail a brath, they will attempt to breathe each tick, otherwise just once per 4 ticks.
|
||||
var/possession_candidate // Can be possessed by ghosts if unplayed.
|
||||
|
||||
var/list/stomach_contents //This is moved here from carbon defines
|
||||
var/composition_reagent
|
||||
var/composition_reagent_quantity
|
||||
var/mouth_size = 2//how large of a creature it can swallow at once, and how big of a bite it can take out of larger things
|
||||
var/eat_types = 0//This is a bitfield which must be initialised in New(). The valid values for it are in devour.dm
|
||||
var/datum/reagents/metabolism/ingested = null
|
||||
var/underdoor //Used for mobs that can walk through maintenance hatches - drones, pais, and spiderbots
|
||||
var/life_tick = 0 // The amount of life ticks that have processed on this mob.
|
||||
|
||||
|
||||
@@ -13,30 +13,6 @@
|
||||
layer = MOB_LAYER
|
||||
to_chat(src, text("<span class='notice'>You have stopped hiding.</span>"))
|
||||
|
||||
/mob/living/proc/devour()
|
||||
set category = "Abilities"
|
||||
set name = "Devour Creature"
|
||||
set desc = "Attempt to eat a nearby creature, swallowing it whole if small enough, or eating it piece by piece otherwise"
|
||||
var/list/choices = list()
|
||||
|
||||
for(var/mob/living/C in view(1,src))
|
||||
|
||||
if((!(src.Adjacent(C)) || C == src)) continue//cant steal nymphs right out of other gestalts
|
||||
|
||||
if (C.is_diona() == DIONA_NYMPH)
|
||||
var/mob/living/carbon/alien/diona/D = C
|
||||
if (D.gestalt)
|
||||
continue
|
||||
|
||||
if (C in src) // Just no.
|
||||
continue
|
||||
|
||||
choices += C
|
||||
|
||||
var/mob/living/L = input(src,"Which creature do you wish to consume?") in null|choices
|
||||
|
||||
attempt_devour(L, eat_types, mouth_size)
|
||||
|
||||
/mob/living/verb/set_walk_speed()
|
||||
set category = "IC"
|
||||
set name = "Adjust walk speed"
|
||||
|
||||
@@ -212,7 +212,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
if (malf && !(mind in malf.current_antagonists))
|
||||
show_laws()
|
||||
to_chat(src, "<b>These laws may be changed by other players, or by you being the traitor.</b>")
|
||||
to_chat(src, "<b>These laws may be changed by other players, or by you if you are malfunctioning.</b>")
|
||||
|
||||
job = "AI"
|
||||
setup_icon()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
if(print_flavor_text()) msg += "\n[print_flavor_text()]\n"
|
||||
|
||||
if (pose)
|
||||
if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 )
|
||||
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
|
||||
pose = addtext(pose,".") //Makes sure all emotes end with a period.
|
||||
msg += "\nIt [pose]"
|
||||
|
||||
|
||||
@@ -77,9 +77,9 @@
|
||||
// ARMOUR
|
||||
// Protects the cyborg from damage. Usually first module to be hit
|
||||
// No power usage
|
||||
/datum/robot_component/armour
|
||||
/datum/robot_component/armor
|
||||
name = "armour plating"
|
||||
external_type = /obj/item/robot_parts/robot_component/armour
|
||||
external_type = /obj/item/robot_parts/robot_component/armor
|
||||
max_damage = 60
|
||||
|
||||
// JETPACK
|
||||
@@ -232,7 +232,7 @@
|
||||
components["diagnosis unit"] = new/datum/robot_component/diagnosis_unit(src)
|
||||
components["camera"] = new/datum/robot_component/camera(src)
|
||||
components["comms"] = new/datum/robot_component/binary_communication(src)
|
||||
components["armour"] = new/datum/robot_component/armour(src)
|
||||
components["armour"] = new/datum/robot_component/armor(src)
|
||||
components["jetpack"] = new/datum/robot_component/jetpack(src)
|
||||
components["surge"] = new/datum/robot_component/surge(src)
|
||||
jetpackComponent = components["jetpack"]
|
||||
@@ -297,8 +297,8 @@
|
||||
icon_state = "motor"
|
||||
icon_state_broken = "motor_broken"
|
||||
|
||||
/obj/item/robot_parts/robot_component/armour
|
||||
name = "armour plating"
|
||||
/obj/item/robot_parts/robot_component/armor
|
||||
name = "armor plating"
|
||||
icon_state = "armor"
|
||||
icon_state_broken = "armor_broken"
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
for(var/obj/W in T)
|
||||
//Different classes of items give different commodities.
|
||||
if(istype(W,/obj/item/cigbutt))
|
||||
if(istype(W,/obj/item/trash/cigbutt))
|
||||
if(plastic)
|
||||
plastic.add_charge(500)
|
||||
else if (istype(W, /obj/item/flame/match))
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
if(print_flavor_text()) msg += "\n[print_flavor_text()]\n"
|
||||
|
||||
if (pose)
|
||||
if( findtext(pose,".",lentext(pose)) == 0 && findtext(pose,"!",lentext(pose)) == 0 && findtext(pose,"?",lentext(pose)) == 0 )
|
||||
if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 )
|
||||
pose = addtext(pose,".") //Makes sure all emotes end with a period.
|
||||
msg += "\nIt [pose]"
|
||||
|
||||
|
||||
@@ -240,9 +240,9 @@
|
||||
)
|
||||
|
||||
/obj/item/gripper/chemistry //A gripper designed for chemistry, to allow borgs to work efficiently in the lab
|
||||
name = "chemistry gripper"
|
||||
name = "medical gripper"
|
||||
icon_state = "gripper-sci"
|
||||
desc = "A specialised grasping tool designed for working in chemistry and pharmaceutical labs"
|
||||
desc = "A specialised grasping tool designed for working in medical treatment facilities and pharmaceutical labs."
|
||||
|
||||
can_hold = list(
|
||||
/obj/item/reagent_containers/glass,
|
||||
@@ -253,7 +253,10 @@
|
||||
/obj/item/storage/pill_bottle,
|
||||
/obj/item/hand_labeler,
|
||||
/obj/item/paper,
|
||||
/obj/item/stack/material/phoron
|
||||
/obj/item/stack/material/phoron,
|
||||
/obj/item/reagent_containers/blood,
|
||||
/obj/item/reagent_containers/food/drinks/sillycup,
|
||||
/obj/item/reagent_containers/food/drinks/medcup
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
var/sight_mode = 0
|
||||
var/custom_name = ""
|
||||
var/custom_sprite = 0 //Due to all the sprites involved, a var for our custom borgs may be best
|
||||
var/crisis //Admin-settable for combat module use.
|
||||
var/crisis = 0 //Admin-settable for combat module use.
|
||||
var/crisis_override = 0
|
||||
var/malfAImodule = 0
|
||||
var/integrated_light_power = 4
|
||||
@@ -293,7 +293,7 @@
|
||||
return
|
||||
var/list/modules = list()
|
||||
modules.Add(robot_module_types)
|
||||
if((crisis_override && security_level == SEC_LEVEL_RED) || security_level == SEC_LEVEL_DELTA) //no fun allowed anymore.
|
||||
if((crisis_override && security_level == SEC_LEVEL_RED) || security_level == SEC_LEVEL_DELTA || crisis == 1) //no fun allowed anymore.
|
||||
to_chat(src, "<span class='warning'>Crisis mode active. Combat module available.</span>")
|
||||
modules+="Combat"
|
||||
modtype = input("Please, select a module!", "Robot", null, null) as null|anything in modules
|
||||
@@ -393,7 +393,7 @@
|
||||
return dat
|
||||
|
||||
/mob/living/silicon/robot/proc/toggle_overclock()
|
||||
set category = "Robot Commands"
|
||||
set category = "Syndicate"
|
||||
set name = "Toggle Overclock"
|
||||
set desc = "Enable an overclocking of your systems, greatly increasing the power available to your modules."
|
||||
|
||||
@@ -791,18 +791,19 @@
|
||||
return ..(user,Floor(damage/2),attack_message)
|
||||
|
||||
/mob/living/silicon/robot/proc/allowed(mob/M)
|
||||
//check if it doesn't require any access at all
|
||||
// Check if the borg doesn't require any access at all
|
||||
if(check_access(null))
|
||||
return 1
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
//if they are holding or wearing a card that has access, that works
|
||||
if(check_access(H.get_active_hand()) || check_access(H.wear_id))
|
||||
return 1
|
||||
else if(istype(M, /mob/living/silicon/robot))
|
||||
// Borgs should be handled a bit differently, since their IDs are not really IDs
|
||||
if(istype(M, /mob/living/silicon/robot))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(check_access(R.get_active_hand()) || istype(R.get_active_hand(), /obj/item/card/robot))
|
||||
return 1
|
||||
else if(istype(M, /mob/living))
|
||||
var/id = M.GetIdCard()
|
||||
// Check if the ID card the user has (if any) has access
|
||||
if(id)
|
||||
return check_access(id)
|
||||
return 0
|
||||
|
||||
/mob/living/silicon/robot/proc/check_access(obj/item/card/id/I)
|
||||
@@ -1037,7 +1038,7 @@
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/ResetSecurityCodes()
|
||||
set category = "Robot Commands"
|
||||
set category = "Syndicate"
|
||||
set name = "Reset Identity Codes"
|
||||
set desc = "Scrambles your security and identification codes and resets your current buffers. Unlocks you and but permenantly severs you from your AI and the robotics console and will deactivate your camera system."
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
to_chat(src, "<span class='warning'>Your shield absorbs some of the impact!</span>")
|
||||
|
||||
if(!emp)
|
||||
var/datum/robot_component/armour/A = get_armour()
|
||||
var/datum/robot_component/armor/A = get_armour()
|
||||
if(A)
|
||||
A.take_damage(brute,burn,sharp,edge)
|
||||
return
|
||||
@@ -136,7 +136,7 @@
|
||||
burn -= absorb_burn
|
||||
to_chat(src, "<span class='warning'>Your shield absorbs some of the impact!</span>")
|
||||
|
||||
var/datum/robot_component/armour/A = get_armour()
|
||||
var/datum/robot_component/armor/A = get_armour()
|
||||
if(A)
|
||||
A.take_damage(brute,burn,sharp)
|
||||
return
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
/obj/item/projectile/beam/hivebot
|
||||
name = "electrical discharge"
|
||||
damage = 10
|
||||
damage_type = HALLOSS
|
||||
damage_type = PAIN
|
||||
taser_effect = 1
|
||||
agony = 40
|
||||
armor_penetration = 40
|
||||
|
||||
@@ -339,6 +339,11 @@ mob/living/simple_animal/hostile/hitby(atom/movable/AM as mob|obj,var/speed = TH
|
||||
//////////////////////////////
|
||||
|
||||
/mob/living/simple_animal/hostile/proc/validator_living(var/mob/living/L, var/atom/current)
|
||||
if(ismech(L))
|
||||
var/mob/living/heavy_vehicle/M = L
|
||||
if(!M.pilots?.len)
|
||||
return FALSE
|
||||
|
||||
if((L.faction == src.faction) && !attack_same)
|
||||
return FALSE
|
||||
if(L in friends)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
if(O.force)
|
||||
if(prob(80))
|
||||
var/damage = O.force
|
||||
if (O.damtype == HALLOSS)
|
||||
if (O.damtype == PAIN)
|
||||
damage = 0
|
||||
health -= damage
|
||||
visible_message("<span class='danger'>[src] has been attacked with the [O] by [user].</span>")
|
||||
|
||||
@@ -455,7 +455,7 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
|
||||
if(O.force > resistance)
|
||||
var/damage = O.force
|
||||
if (O.damtype == HALLOSS)
|
||||
if (O.damtype == PAIN)
|
||||
damage = 0
|
||||
if(supernatural && istype(O,/obj/item/nullrod))
|
||||
damage *= 2
|
||||
@@ -773,4 +773,4 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj)
|
||||
adjustFireLoss(rand(3, 5))
|
||||
|
||||
/mob/living/simple_animal/get_digestion_product()
|
||||
return /datum/reagent/nutriment
|
||||
return "nutriment"
|
||||
@@ -424,7 +424,7 @@
|
||||
/mob/proc/print_flavor_text()
|
||||
if (flavor_text && flavor_text != "")
|
||||
var/msg = replacetext(flavor_text, "\n", " ")
|
||||
if(lentext(msg) <= 40)
|
||||
if(length(msg) <= 40)
|
||||
return "<span class='notice'>[msg]</span>"
|
||||
else
|
||||
return "<span class='notice'>[copytext_preserve_html(msg, 1, 37)]... <a href='byond://?src=\ref[src];flavor_more=1'>More...</a></span>"
|
||||
@@ -1300,7 +1300,7 @@ mob/proc/yank_out_object()
|
||||
/client/verb/body_toggle_head()
|
||||
set name = "body-toggle-head"
|
||||
set hidden = 1
|
||||
toggle_zone_sel(list(BP_HEAD,BP_EYES,"mouth"))
|
||||
toggle_zone_sel(list(BP_HEAD,BP_EYES,BP_MOUTH))
|
||||
|
||||
/client/verb/body_r_arm()
|
||||
set name = "body-r-arm"
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
last_hit_zone = target_zone
|
||||
|
||||
switch(target_zone)
|
||||
if("mouth")
|
||||
if(BP_MOUTH)
|
||||
if(announce)
|
||||
user.visible_message("<span class='warning'>\The [user] covers [target]'s face!</span>")
|
||||
if(target.silent < 3)
|
||||
|
||||
@@ -147,12 +147,7 @@
|
||||
|
||||
/obj/item/grab/proc/devour(mob/target, mob/user)
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/can_eat
|
||||
if(istype(H) && H.species.gluttonous)
|
||||
can_eat = 1
|
||||
|
||||
if(can_eat)
|
||||
H.attempt_devour(target, H.eat_types, H.mouth_size)
|
||||
H.devour(target)
|
||||
|
||||
|
||||
/obj/item/grab/proc/hair_pull(mob/living/carbon/human/target, mob/attacker, var/target_zone)
|
||||
@@ -169,20 +164,20 @@
|
||||
visible_message("<span class='notice'>[assailant] tried to grab [target] but they have no hair!</span>")
|
||||
if(1)
|
||||
visible_message("<span class='danger'>[assailant] tugs [target]'s [hairchatname] before releasing their grip!</span>")
|
||||
target.apply_damage(5, HALLOSS)
|
||||
target.apply_damage(5, PAIN)
|
||||
if(2)
|
||||
visible_message("<span class='danger'>[assailant] tugs [target]'s [hairchatname]!</span>")
|
||||
target.apply_damage(5, HALLOSS)
|
||||
target.apply_damage(5, PAIN)
|
||||
src.state = GRAB_PASSIVE
|
||||
|
||||
if(3)
|
||||
visible_message("<span class='danger'>[assailant] tugs [target]'s [hairchatname]!</span>")
|
||||
target.apply_damage(10, HALLOSS)
|
||||
target.apply_damage(10, PAIN)
|
||||
src.state = GRAB_PASSIVE
|
||||
|
||||
if(4)
|
||||
visible_message("<span class='danger'>[assailant] violently tugs [target]'s [hairchatname], ripping out a clump!</span>")
|
||||
target.apply_damage(15, HALLOSS)
|
||||
target.apply_damage(15, PAIN)
|
||||
src.state = GRAB_PASSIVE
|
||||
|
||||
if(5)
|
||||
@@ -191,7 +186,7 @@
|
||||
src.state = GRAB_PASSIVE
|
||||
else
|
||||
visible_message("<span class='danger'>[assailant] violently tugs [target]'s [hairchatname]!</span>")
|
||||
target.apply_damage(10, HALLOSS)
|
||||
target.apply_damage(10, PAIN)
|
||||
src.state = GRAB_AGGRESSIVE
|
||||
|
||||
if(6)
|
||||
@@ -201,5 +196,5 @@
|
||||
playsound(target.loc, 'sound/misc/slip.ogg', 50, 1, -3)
|
||||
else
|
||||
visible_message("<span class='danger'>[assailant] violently tugs [target]'s [hairchatname]!</span>")
|
||||
target.apply_damage(15, HALLOSS)
|
||||
target.apply_damage(15, PAIN)
|
||||
src.state = GRAB_AGGRESSIVE
|
||||
@@ -248,7 +248,7 @@ var/list/global/organ_rel_size = list(
|
||||
switch(zone)
|
||||
if(BP_EYES)
|
||||
zone = BP_HEAD
|
||||
if("mouth")
|
||||
if(BP_MOUTH)
|
||||
zone = BP_HEAD
|
||||
return zone
|
||||
|
||||
@@ -334,8 +334,8 @@ var/list/global/organ_rel_size = list(
|
||||
|
||||
proc/slur(phrase, strength = 100)
|
||||
phrase = html_decode(phrase)
|
||||
var/leng=lentext(phrase)
|
||||
var/counter=lentext(phrase)
|
||||
var/leng=length(phrase)
|
||||
var/counter=length(phrase)
|
||||
var/newphrase=""
|
||||
var/newletter=""
|
||||
while(counter>=1)
|
||||
@@ -710,46 +710,6 @@ proc/is_blind(A)
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/proc/vomit()
|
||||
var/canVomit = FALSE
|
||||
|
||||
if(nutrition > 0)
|
||||
canVomit = TRUE
|
||||
|
||||
if(canVomit)
|
||||
Stun(4)
|
||||
var/list/vomitCandidate = typecacheof(/obj/machinery/disposal) + typecacheof(/obj/structure/sink) + typecacheof(/obj/structure/toilet)
|
||||
var/obj/vomitReceptacle
|
||||
for(var/obj/vessel in view(1, src))
|
||||
if (!is_type_in_typecache(vessel, vomitCandidate))
|
||||
continue
|
||||
if(!vessel.Adjacent(src))
|
||||
continue
|
||||
vomitReceptacle = vessel
|
||||
break
|
||||
|
||||
if(vomitReceptacle)
|
||||
src.visible_message(span("warning", "[src] vomits into \the [vomitReceptacle]!"), span("warning", "You vomit into \the [vomitReceptacle]!"))
|
||||
playsound(vomitReceptacle, 'sound/effects/splat.ogg', 50, 1)
|
||||
else
|
||||
src.visible_message("<span class='warning'>[src] vomits!</span>","<span class='warning'>You vomit!</span>")
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
var/turf/location = loc
|
||||
if(!vomitReceptacle)
|
||||
if (istype(location, /turf/simulated))
|
||||
location.add_vomit_floor(src, 1)
|
||||
adjustNutritionLoss(60)
|
||||
adjustHydrationLoss(30)
|
||||
if (intoxication)//The pain and system shock of vomiting, sobers you up a little
|
||||
intoxication *= 0.9
|
||||
|
||||
if (istype(src, /mob/living/carbon/human))
|
||||
ingested.trans_to_turf(location,30)//Vomiting empties the stomach, transferring 30u reagents to the floor where you vomited
|
||||
else if (prob(50))
|
||||
src.visible_message("<span class='warning'>[src] retches, attempting to vomit!</span>","<span class='warning'>You gag and collapse as you feel the urge to vomit, but there's nothing in your stomach!</span>")
|
||||
Weaken(4)
|
||||
|
||||
/mob/living/carbon/human/proc/delayed_vomit()
|
||||
if(!check_has_mouth())
|
||||
return
|
||||
@@ -1269,4 +1229,7 @@ proc/is_blind(A)
|
||||
result[1] = asight
|
||||
result[2] = ainvis
|
||||
|
||||
return result
|
||||
return result
|
||||
|
||||
/mob/proc/remove_blood_simple(var/blood)
|
||||
return
|
||||
@@ -168,10 +168,9 @@
|
||||
O.cell.maxcharge = 7500
|
||||
O.cell.charge = 7500
|
||||
|
||||
|
||||
O.gender = gender
|
||||
O.invisibility = 0
|
||||
|
||||
|
||||
if(mind) //TODO
|
||||
mind.transfer_to(O)
|
||||
if(O.mind.assigned_role == "Cyborg")
|
||||
|
||||
Reference in New Issue
Block a user