Merge remote-tracking branch 'upstream/master' into peacekeeper-borgs

This commit is contained in:
Fox-McCloud
2017-08-16 22:08:07 -04:00
921 changed files with 15263 additions and 20414 deletions
+1 -1
View File
@@ -657,7 +657,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return FALSE
/mob/dead/observer/incapacitated()
/mob/dead/observer/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, ignore_lying = FALSE)
return TRUE
//this is a mob verb instead of atom for performance reasons
+1 -1
View File
@@ -16,7 +16,7 @@
animation.master = src
// flick("gibbed-m", animation)
gibs(loc, viruses, dna)
gibs(loc, dna)
dead_mob_list -= src
if(client)
respawnable_list += src
+1
View File
@@ -168,6 +168,7 @@
/mob/proc/hear_sleep(var/message)
var/heard = ""
if(prob(15))
message = strip_html_properly(message)
var/list/punctuation = list(",", "!", ".", ";", "?")
var/list/messages = splittext(message, " ")
var/R = rand(1, messages.len)
+4
View File
@@ -91,6 +91,10 @@
desc = "It's a small maintenance robot."
icon_state = "drone"
/obj/item/weapon/holder/drone/emagged
name = "maintenance drone"
icon_state = "drone-emagged"
/obj/item/weapon/holder/pai
name = "pAI"
desc = "It's a little robot."
+14
View File
@@ -6,11 +6,22 @@
if(hand) return l_hand
else return r_hand
/mob/proc/is_in_active_hand(obj/item/I)
var/obj/item/item_to_test = get_active_hand()
return item_to_test && item_to_test.is_equivalent(I)
//Returns the thing in our inactive hand
/mob/proc/get_inactive_hand()
if(hand) return r_hand
else return l_hand
/mob/proc/is_in_inactive_hand(obj/item/I)
var/obj/item/item_to_test = get_inactive_hand()
return item_to_test && item_to_test.is_equivalent(I)
//Returns if a certain item can be equipped to a certain slot.
// Currently invalid for two-handed items - call obj/item/mob_can_equip() instead.
/mob/proc/can_equip(obj/item/I, slot, disable_warning = 0)
@@ -119,6 +130,9 @@
else if(I == l_hand)
l_hand = null
update_inv_l_hand()
else if(I in tkgrabbed_objects)
var/obj/item/tk_grab/tkgrab = tkgrabbed_objects[I]
unEquip(tkgrab, force)
if(I)
if(client)
+29 -2
View File
@@ -96,6 +96,9 @@
return (copytext(message, length(message)) == "!") ? 2 : 1
/datum/language/proc/broadcast(mob/living/speaker, message, speaker_mask)
if(!check_can_speak(speaker))
return FALSE
log_say("[key_name(speaker)]: ([name]) [message]")
if(!speaker_mask)
@@ -114,6 +117,9 @@
/datum/language/proc/check_special_condition(mob/other, mob/living/speaker)
return TRUE
/datum/language/proc/check_can_speak(mob/living/speaker)
return TRUE
/datum/language/proc/get_spoken_verb(msg_end)
switch(msg_end)
if("!")
@@ -292,8 +298,29 @@
/datum/language/grey/broadcast(mob/living/speaker, message, speaker_mask)
..(speaker,message,speaker.real_name)
/datum/language/grey/check_can_speak(mob/living/speaker)
if(ishuman(speaker))
var/mob/living/carbon/human/S = speaker
var/obj/item/organ/external/rhand = S.get_organ("r_hand")
var/obj/item/organ/external/lhand = S.get_organ("l_hand")
if((!rhand || !rhand.is_usable()) && (!lhand || !lhand.is_usable()))
to_chat(speaker,"<span class='warning'>You can't communicate without the ability to use your hands!</span>")
return FALSE
if(speaker.incapacitated(ignore_lying = 1))
to_chat(speaker,"<span class='warning'>You can't communicate while unable to move your hands to your head!</span>")
return FALSE
var/their = "their"
if(speaker.gender == "female")
their = "her"
if(speaker.gender == "male")
their = "his"
speaker.visible_message("<span class='notice'>[speaker] touches [their] fingers to [their] temple.</span>") //If placed in grey/broadcast, it will happen regardless of the success of the action.
return TRUE
/datum/language/grey/check_special_condition(mob/living/carbon/human/other, mob/living/carbon/human/speaker)
if(other in range(7, speaker))
if(atoms_share_level(other, speaker))
return TRUE
return FALSE
@@ -639,7 +666,7 @@
if(L == default_language)
. += "<b>[L.name] (:[L.key])</b> - default - <a href='byond://?src=[UID()];default_lang=reset'>reset</a><br>[L.desc]<br><br>"
else
. += "<b>[L.name] (:[L.key])</b> - <a href='byond://?src=[UID()];default_lang=[L]'>set default</a><br>[L.desc]<br><br>"
. += "<b>[L.name] (:[L.key])</b> - <a href=\"byond://?src=[UID()];default_lang=[L]\">set default</a><br>[L.desc]<br><br>"
/mob/verb/check_languages()
set name = "Check Known Languages"
@@ -153,14 +153,10 @@
return has_fine_manipulation
/mob/living/carbon/alien/Stat()
..()
statpanel("Status")
stat(null, "Intent: [a_intent]")
stat(null, "Move Mode: [m_intent]")
..()
show_stat_emergency_shuttle_eta()
/mob/living/carbon/alien/SetStunned(amount, updating = 1, force = 0)
@@ -273,7 +269,7 @@ Des: Removes all infected images from the alien.
if(T.footstep_sounds["xeno"])
var/S = pick(T.footstep_sounds["xeno"])
if(S)
if(m_intent == "run")
if(m_intent == MOVE_INTENT_RUN)
if(!(step_count % 2)) //every other turf makes a sound
return 0
@@ -281,7 +277,7 @@ Des: Removes all infected images from the alien.
range -= 0.666 //-(7 - 2) = (-5) = -5 | -5 - (0.666) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
var/volume = 5
if(m_intent == "walk")
if(m_intent == MOVE_INTENT_WALK)
return 0 //silent when walking
if(buckled || lying || throwing)
@@ -294,3 +290,9 @@ Des: Removes all infected images from the alien.
playsound(T, S, volume, 1, range)
return 1
return 0
/mob/living/carbon/alien/getTrail()
if(getBruteLoss() < 200)
return pick("xltrails_1", "xltrails_2")
else
return pick("xttrails_1", "xttrails_2")
@@ -15,7 +15,7 @@ In all, this is a lot like the monkey code. /N
return
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
AdjustSleeping(-5)
resting = 0
AdjustParalysis(-3)
@@ -23,7 +23,7 @@ In all, this is a lot like the monkey code. /N
AdjustWeakened(-3)
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake it up!</span>")
if(I_GRAB)
if(INTENT_GRAB)
grabbedby(M)
return 1
@@ -50,11 +50,11 @@ In all, this is a lot like the monkey code. /N
return 0 //this is horrible but 100% necessary
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
help_shake_act(M)
if(I_GRAB)
if(INTENT_GRAB)
grabbedby(M)
if(I_HARM, I_DISARM)
if(INTENT_HARM, INTENT_DISARM)
return 1
return 0
@@ -14,7 +14,7 @@
playsound(src.loc, 'sound/goonstation/effects/gib.ogg', 50, 1)
flick("gibbed-a", animation)
xgibs(loc, viruses)
xgibs(loc)
dead_mob_list -= src
spawn(15)
@@ -40,7 +40,7 @@
/mob/living/carbon/alien/humanoid/hunter/handle_environment()
if(m_intent == "run" || resting)
if(m_intent == MOVE_INTENT_RUN || resting)
..()
else
adjustPlasma(-heal_rate)
@@ -160,13 +160,13 @@
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
help_shake_act(M)
if(I_GRAB)
if(INTENT_GRAB)
grabbedby(M)
if(I_HARM)
if(INTENT_HARM)
M.do_attack_animation(src)
var/damage = rand(1, 9)
if(prob(90))
@@ -191,7 +191,7 @@
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to punch [src]!</span>")
if(I_DISARM)
if(INTENT_DISARM)
if(!lying)
if(prob(5))//Very small chance to push an alien down.
Paralyse(2)
@@ -1,11 +1,8 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/mob/living/carbon/alien/humanoid
oxygen_alert = 0
toxins_alert = 0
fire_alert = 0
pass_flags = PASSTABLE
var/temperature_alert = 0
/mob/living/carbon/alien/humanoid/Life()
@@ -22,15 +19,13 @@
if(disabilities & COUGHING)
if((prob(5) && paralysis <= 1))
drop_item()
spawn( 0 )
emote("cough")
return
emote("cough")
return
if(disabilities & TOURETTES)
if((prob(10) && paralysis <= 1))
Stun(10)
spawn( 0 )
emote("twitch")
return
emote("twitch")
return
if(disabilities & NERVOUS)
if(prob(10))
stuttering = max(10, stuttering)
@@ -68,8 +63,7 @@
//UNCONSCIOUS. NO-ONE IS HOME
if((getOxyLoss() > 50) || (config.health_threshold_crit >= health))
if(health <= 20 && prob(1))
spawn(0)
emote("gasp")
emote("gasp")
if(!reagents.has_reagent("epinephrine"))
adjustOxyLoss(1)
Paralyse(3)
@@ -81,8 +75,7 @@
blinded = 1
stat = UNCONSCIOUS
if(prob(10) && health)
spawn(0)
emote("hiss")
emote("hiss")
//CONSCIOUS
else
stat = CONSCIOUS
@@ -33,7 +33,7 @@
else if(lying || resting)
icon_state = "alien[caste]_sleep"
else if(m_intent == "run")
else if(m_intent == MOVE_INTENT_RUN)
icon_state = "alien[caste]_running"
else
icon_state = "alien[caste]_s"
@@ -127,10 +127,10 @@
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
help_shake_act(M)
if(I_GRAB)
if(INTENT_GRAB)
grabbedby(M)
else
@@ -1,8 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/mob/living/carbon/alien/larva
var/temperature_alert = 0
/mob/living/carbon/alien/larva/Life()
if(..()) //still breathing
// GROW!
@@ -40,9 +35,8 @@
else if(sleeping)
blinded = 1
stat = UNCONSCIOUS
if( prob(10) && health )
spawn(0)
emote("hiss_")
if(prob(10) && health)
emote("hiss_")
//CONSCIOUS
else
stat = CONSCIOUS
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
//TODO: Make these simple_animals
var/const/MIN_IMPREGNATION_TIME = 100 //time it takes to impregnate someone
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/obj/item/device/mmi
name = "Man-Machine Interface"
desc = "The Warrior's bland acronym, MMI, obscures the true horror of this monstrosity."
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/mob/living/carbon/brain
var/obj/item/container = null
var/timeofhostdeath = 0
@@ -71,9 +71,9 @@
var/obj/item/organ/internal/brain/B = src
if(!special)
var/mob/living/simple_animal/borer/borer = owner.has_brain_worms()
if(borer)
borer.detach() //Should remove borer if the brain is removed - RR
borer.leave_host() //Should remove borer if the brain is removed - RR
if(owner.mind && !non_primary)//don't transfer if the owner does not have a mind.
B.transfer_identity(user)
@@ -125,3 +125,11 @@
/obj/item/organ/internal/brain/Destroy() //copypasted from MMIs.
QDEL_NULL(brainmob)
return ..()
/obj/item/organ/internal/brain/cluwne
/obj/item/organ/internal/brain/cluwne/insert(mob/living/target, special = 0, make_cluwne = 1)
..(target, special = special)
if(ishuman(target) && make_cluwne)
var/mob/living/carbon/human/H = target
H.makeCluwne() //No matter where you go, no matter what you do, you cannot escape
@@ -29,7 +29,7 @@
animation.master = src
// flick("gibbed-m", animation)
gibs(loc, viruses, dna)
gibs(loc, dna)
dead_mob_list -= src
if(container && istype(container, /obj/item/device/mmi))
@@ -25,12 +25,14 @@
to_chat(user, "<span class='notice'>You carefully locate the manual activation switch and start the positronic brain's boot process.</span>")
icon_state = "posibrain-searching"
ghost_volunteers.Cut()
src.searching = 1
src.request_player()
searching = 1
request_player()
spawn(600)
if(ghost_volunteers.len)
var/mob/dead/observer/O = pick(ghost_volunteers)
if(check_observer(O))
var/mob/dead/observer/O
while(!istype(O) && ghost_volunteers.len)
O = pick_n_take(ghost_volunteers)
if(istype(O) && check_observer(O))
transfer_personality(O)
reset_search()
else
+62 -55
View File
@@ -19,6 +19,10 @@
/mob/living/carbon/Destroy()
QDEL_LIST(internal_organs)
QDEL_LIST(stomach_contents)
var/mob/living/simple_animal/borer/B = has_brain_worms()
if(B)
B.leave_host()
qdel(B)
remove_from_all_data_huds()
return ..()
@@ -34,9 +38,9 @@
if(.)
if(nutrition && stat != DEAD)
nutrition -= hunger_drain / 10
if(m_intent == "run")
if(m_intent == MOVE_INTENT_RUN)
nutrition -= hunger_drain / 10
if((FAT in mutations) && m_intent == "run" && bodytemperature <= 360)
if((FAT in mutations) && m_intent == MOVE_INTENT_RUN && bodytemperature <= 360)
bodytemperature += 2
// Moving around increases germ_level faster
@@ -107,7 +111,7 @@
for(var/i=0 to distance)
if(blood)
if(T)
T.add_blood_floor(src)
add_splatter_floor(T)
if(stun)
adjustBruteLoss(3)
else
@@ -126,8 +130,7 @@
if(isturf(loc))
I.remove(src)
I.forceMove(get_turf(src))
spawn()
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
for(var/mob/M in src)
if(M in src.stomach_contents)
@@ -217,15 +220,18 @@
"<span class='notice'>You check yourself for injuries.</span>" \
)
for(var/obj/item/organ/external/org in H.bodyparts)
var/list/missing = list("head", "chest", "groin", "l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")
for(var/X in H.bodyparts)
var/obj/item/organ/external/LB = X
missing -= LB.limb_name
var/status = ""
var/brutedamage = org.brute_dam
var/burndamage = org.burn_dam
var/brutedamage = LB.brute_dam
var/burndamage = LB.burn_dam
if(brutedamage > 0)
status = "bruised"
if(brutedamage > 20)
status = "bleeding"
status = "battered"
if(brutedamage > 40)
status = "mangled"
if(brutedamage > 0 && burndamage > 0)
@@ -237,13 +243,20 @@
status += "blistered"
else if(burndamage > 0)
status += "numb"
if(org.status & ORGAN_DESTROYED)
status = "MISSING!"
if(org.status & ORGAN_MUTATED)
if(LB.status & ORGAN_MUTATED)
status = "weirdly shapen."
if(status == "")
status = "OK"
src.show_message(text("\t []My [] is [].",status=="OK"?"<span class='notice'></span>":"<span class='warning'></span>",org.name,status),1)
to_chat(src, "\t <span class='[status == "OK" ? "notice" : "warning"]'>Your [LB.name] is [status].</span>")
for(var/obj/item/I in LB.embedded_objects)
to_chat(src, "\t <a href='byond://?src=[UID()];embedded_object=[I.UID()];embedded_limb=[LB.UID()]' class='warning'>There is \a [I] embedded in your [LB.name]!</a>")
for(var/t in missing)
to_chat(src, "<span class='boldannounce'>Your [parse_zone(t)] is missing!</span>")
if(H.bleed_rate)
to_chat(src, "<span class='danger'>You are bleeding!</span>")
if(staminaloss)
if(staminaloss > 30)
to_chat(src, "<span class='info'>You're completely exhausted.</span>")
@@ -292,7 +305,9 @@
)
if(istype(src,/mob/living/carbon/human))
var/mob/living/carbon/human/H = src
if(H.w_uniform)
if(H.wear_suit)
H.wear_suit.add_fingerprint(M)
else if(H.w_uniform)
H.w_uniform.add_fingerprint(M)
/mob/living/carbon/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0)
@@ -312,15 +327,15 @@
if(1)
to_chat(src, "<span class='warning'>Your eyes sting a little.</span>")
if(prob(40)) //waiting on carbon organs
E.damage += 1
E.take_damage(1, 1)
if(2)
to_chat(src, "<span class='warning'>Your eyes burn.</span>")
E.damage += rand(2, 4)
E.take_damage(rand(2, 4), 1)
else
to_chat(src, "Your eyes itch and burn severely!</span>")
E.damage += rand(12, 16)
E.take_damage(rand(12, 16), 1)
if(E.damage > E.min_bruised_damage)
AdjustEyeBlind(damage)
@@ -474,21 +489,6 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
if(istype(loc, /obj/machinery/atmospherics))
add_ventcrawl(loc)
/mob/living/carbon/clean_blood()
. = ..()
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.gloves)
if(H.gloves.clean_blood())
H.update_inv_gloves(0,0)
H.gloves.germ_level = 0
else
if(H.bloody_hands)
H.bloody_hands = 0
H.update_inv_gloves(0,0)
H.germ_level = 0
update_icons() //apply the now updated overlays to the mob
//Throwing stuff
@@ -535,18 +535,19 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
return
/mob/living/carbon/throw_item(atom/target)
throw_mode_off()
if(!target || !isturf(loc))
return
if(istype(target, /obj/screen))
if(!target || !isturf(loc) || istype(target, /obj/screen))
throw_mode_off()
return
var/atom/movable/thrown_thing
var/obj/item/I = src.get_active_hand()
if(!I || (I.flags & NODROP))
if(!I || I.override_throw(src, target) || (I.flags & NODROP))
throw_mode_off()
return
throw_mode_off()
var/atom/movable/thrown_thing
if(istype(I, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = I
var/mob/throwable_mob = G.get_mob_if_throwable() //throw the person instead of the grab
@@ -649,9 +650,10 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
"<span class='userdanger'>[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM].</span>")
var/no_mask
if(!(wear_mask && wear_mask.flags & AIRTIGHT))
if(!(head && head.flags & AIRTIGHT))
no_mask = 1
if(!get_organ_slot("breathing_tube"))
if(!(wear_mask && wear_mask.flags & AIRTIGHT))
if(!(head && head.flags & AIRTIGHT))
no_mask = 1
if(no_mask)
to_chat(usr, "<span class='warning'>[src] is not wearing a suitable mask or helmet!</span>")
return
@@ -662,9 +664,10 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
update_internals_hud_icon(0)
else
var/no_mask2
if(!(wear_mask && wear_mask.flags & AIRTIGHT))
if(!(head && head.flags & AIRTIGHT))
no_mask2 = 1
if(!get_organ_slot("breathing_tube"))
if(!(wear_mask && wear_mask.flags & AIRTIGHT))
if(!(head && head.flags & AIRTIGHT))
no_mask2 = 1
if(no_mask2)
to_chat(usr, "<span class='warning'>[src] is not wearing a suitable mask or helmet!</span>")
return
@@ -881,8 +884,10 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
/mob/living/carbon/get_standard_pixel_y_offset(lying = 0)
if(lying)
if(buckled) return initial(pixel_y)
return -6
if(buckled)
return buckled.buckle_offset //tg just has this whole block removed, always returning -6. Paradise is special.
else
return -6
else
return initial(pixel_y)
@@ -892,11 +897,11 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
..()
/mob/living/carbon/Stat()
..()
if(statpanel("Status"))
var/obj/item/organ/internal/xenos/plasmavessel/vessel = get_int_organ(/obj/item/organ/internal/xenos/plasmavessel)
if(vessel)
stat(null, "Plasma Stored: [vessel.stored_plasma]/[vessel.max_plasma]")
..()
/mob/living/carbon/get_all_slots()
return list(l_hand,
@@ -935,24 +940,24 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
W.plane = initial(W.plane)
/mob/living/carbon/proc/slip(var/description, var/stun, var/weaken, var/tilesSlipped, var/walkSafely, var/slipAny)
if(flying || buckled || (walkSafely && m_intent == "walk"))
/mob/living/carbon/proc/slip(description, stun, weaken, tilesSlipped, walkSafely, slipAny, slipVerb = "slip")
if(flying || buckled || (walkSafely && m_intent == MOVE_INTENT_WALK))
return 0
if((lying) && (!(tilesSlipped)))
return 0
if(!(slipAny))
if(istype(src, /mob/living/carbon/human))
var/mob/living/carbon/human/H = src
if((isobj(H.shoes) && H.shoes.flags & NOSLIP) || H.species.bodyflags & FEET_NOSLIP)
if(isobj(H.shoes) && H.shoes.flags & NOSLIP)
return 0
if(tilesSlipped)
for(var/t = 0, t<=tilesSlipped, t++)
spawn (t) step(src, src.dir)
stop_pulling()
to_chat(src, "<span class='notice'>You slipped on the [description]!</span>")
to_chat(src, "<span class='notice'>You [slipVerb]ped on [description]!</span>")
playsound(src.loc, 'sound/misc/slip.ogg', 50, 1, -3)
if(stun)
Stun(stun)
// Something something don't run with scissors
Stun(stun)
Weaken(weaken)
return 1
@@ -976,7 +981,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
else
if(!forceFed(toEat, user, fullness))
return 0
consume(toEat, bitesize_override)
consume(toEat, bitesize_override, taste = toEat.taste)
score_foodeaten++
return 1
@@ -1029,7 +1034,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
/*TO DO - If/when stomach organs are introduced, override this at the human level sending the item to the stomach
so that different stomachs can handle things in different ways VB*/
/mob/living/carbon/proc/consume(var/obj/item/weapon/reagent_containers/food/toEat, var/bitesize_override)
/mob/living/carbon/proc/consume(var/obj/item/weapon/reagent_containers/food/toEat, var/bitesize_override, var/taste = TRUE)
var/this_bite = bitesize_override ? bitesize_override : toEat.bitesize
if(!toEat.reagents)
return
@@ -1038,6 +1043,8 @@ so that different stomachs can handle things in different ways VB*/
if(toEat.consume_sound)
playsound(loc, toEat.consume_sound, rand(10,50), 1)
if(toEat.reagents.total_volume)
if(taste)
taste_reagents(toEat.reagents)
var/fraction = min(this_bite/toEat.reagents.total_volume, 1)
toEat.reagents.reaction(src, toEat.apply_type, fraction)
toEat.reagents.trans_to(src, this_bite*toEat.transfer_efficiency)
@@ -20,7 +20,7 @@
/mob/living/carbon/attackby(obj/item/I, mob/user, params)
if(lying)
if(surgeries.len)
if(user != src && user.a_intent == "help")
if(user != src && user.a_intent == INTENT_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, src))
return 1
@@ -30,11 +30,17 @@
if(!iscarbon(user))
return
for(var/datum/disease/D in viruses)
for(var/thing in viruses)
var/datum/disease/D = thing
if(D.IsSpreadByTouch())
user.ContractDisease(D)
for(var/datum/disease/D in user.viruses)
for(var/thing in user.viruses)
var/datum/disease/D = thing
if(D.IsSpreadByTouch())
ContractDisease(D)
return 0
return 0
/mob/living/carbon/is_mouth_covered(head_only = FALSE, mask_only = FALSE)
if((!mask_only && head && (head.flags_cover & HEADCOVERSMOUTH)) || (!head_only && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH)))
return TRUE
@@ -3,18 +3,19 @@
hud_possible = list(HEALTH_HUD,STATUS_HUD,SPECIALROLE_HUD)
var/list/stomach_contents = list()
var/list/internal_organs = list()
var/list/internal_organs_slot = list() //Same as above, but stores "slot ID" - "organ" pairs for easy access.
var/antibodies = 0
var/life_tick = 0 // The amount of life ticks that have processed on this mob.
// total amount of wounds on mob, used to spread out healing and the like over all wounds
var/number_wounds = 0
var/obj/item/handcuffed = null //Whether or not the mob is handcuffed
var/obj/item/legcuffed = null //Same as handcuffs but for legs. Bear traps use this.
var/obj/item/head = null
var/obj/item/clothing/suit/wear_suit = null //TODO: necessary? Are they even used? ~Carn
var/mob/living/simple_animal/borer/borer = null
//Active emote/pose
var/pose = null
@@ -29,3 +30,5 @@
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/co2overloadtime = null
blood_volume = BLOOD_VOLUME_NORMAL
@@ -210,19 +210,14 @@
H.ha_style = "None"
update_head_accessory()
/mob/living/carbon/human/proc/change_eye_color(var/red, var/green, var/blue, update_dna = 1)
/mob/living/carbon/human/proc/change_eye_color(var/colour = "#000000", update_dna = 1)
// Update the main DNA datum, then sync the change across the organs
var/obj/item/organ/internal/eyes/eyes_organ = get_int_organ(/obj/item/organ/internal/eyes)
if(eyes_organ)
var/eyes_red = eyes_organ.eye_colour[1]
var/eyes_green = eyes_organ.eye_colour[2]
var/eyes_blue = eyes_organ.eye_colour[3]
if(red == eyes_red && green == eyes_green && blue == eyes_blue)
if(colour == eyes_organ.eye_colour)
return
eyes_organ.eye_colour[1] = red
eyes_organ.eye_colour[2] = green
eyes_organ.eye_colour[3] = blue
eyes_organ.eye_colour = colour
dna.eye_color_to_dna(eyes_organ)
eyes_organ.set_dna(dna)
@@ -233,68 +228,58 @@
update_body()
return 1
/mob/living/carbon/human/proc/change_hair_color(var/red, var/green, var/blue, var/secondary)
/mob/living/carbon/human/proc/change_hair_color(var/colour = "#000000", var/secondary)
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return
if(!secondary)
if(red == H.r_hair && green == H.g_hair && blue == H.b_hair)
if(colour == H.hair_colour)
return
H.r_hair = red
H.g_hair = green
H.b_hair = blue
H.hair_colour = colour
else
if(red == H.r_hair_sec && green == H.g_hair_sec && blue == H.b_hair_sec)
if(colour == H.sec_hair_colour)
return
H.r_hair_sec = red
H.g_hair_sec = green
H.b_hair_sec = blue
H.sec_hair_colour = colour
update_hair()
return 1
/mob/living/carbon/human/proc/change_facial_hair_color(var/red, var/green, var/blue, var/secondary)
/mob/living/carbon/human/proc/change_facial_hair_color(var/colour = "#000000", var/secondary)
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return
if(!secondary)
if(red == H.r_facial && green == H.g_facial && blue == H.b_facial)
if(colour == H.facial_colour)
return
H.r_facial = red
H.g_facial = green
H.b_facial = blue
H.facial_colour = colour
else
if(red == H.r_facial_sec && green == H.g_facial_sec && blue == H.b_facial_sec)
if(colour == H.sec_facial_colour)
return
H.r_facial_sec = red
H.g_facial_sec = green
H.b_facial_sec = blue
H.sec_facial_colour = colour
update_fhair()
return 1
/mob/living/carbon/human/proc/change_head_accessory_color(var/red, var/green, var/blue)
/mob/living/carbon/human/proc/change_head_accessory_color(var/colour = "#000000")
var/obj/item/organ/external/head/H = get_organ("head")
if(!H)
return
if(red == H.r_headacc && green == H.g_headacc && blue == H.b_headacc)
if(colour == H.headacc_colour)
return
H.r_headacc = red
H.g_headacc = green
H.b_headacc = blue
H.headacc_colour = colour
update_head_accessory()
return 1
/mob/living/carbon/human/proc/change_marking_color(var/colour, var/location = "body")
/mob/living/carbon/human/proc/change_marking_color(var/colour = "#000000", var/location = "body")
if(colour == m_colours[location])
return
@@ -307,13 +292,11 @@
return 1
/mob/living/carbon/human/proc/change_skin_color(var/red, var/green, var/blue)
if(red == r_skin && green == g_skin && blue == b_skin || !(species.bodyflags & HAS_SKIN_COLOR))
/mob/living/carbon/human/proc/change_skin_color(var/colour = "#000000")
if(colour == skin_colour || !(species.bodyflags & HAS_SKIN_COLOR))
return
r_skin = red
g_skin = green
b_skin = blue
skin_colour = colour
force_update_limbs()
update_body()
@@ -343,7 +326,7 @@
continue
if(blacklist.len && (current_species_name in blacklist))
continue
if((current_species.flags & IS_WHITELISTED) && !is_alien_whitelisted(src, current_species_name))
if((IS_WHITELISTED in current_species.species_traits) && !is_alien_whitelisted(src, current_species_name))
continue
valid_species += current_species_name
@@ -364,7 +347,7 @@
continue
if((H.gender == MALE && S.gender == FEMALE) || (H.gender == FEMALE && S.gender == MALE))
continue
if(H.species.flags & ALL_RPARTS) //If the user is a species who can have a robotic head...
if(H.species.bodyflags & ALL_RPARTS) //If the user is a species who can have a robotic head...
var/datum/robolimb/robohead = all_robolimbs[H.model]
if((H.species.name in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
valid_hairstyles += hairstyle //Give them their hairstyles if they do.
@@ -392,7 +375,7 @@
continue
if((H.gender == MALE && S.gender == FEMALE) || (H.gender == FEMALE && S.gender == MALE))
continue
if(H.species.flags & ALL_RPARTS) //If the user is a species who can have a robotic head...
if(H.species.bodyflags & ALL_RPARTS) //If the user is a species who can have a robotic head...
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(H.species.name in S.species_allowed) //If this is a facial hair style native to the user's species...
if((H.species.name in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
@@ -446,7 +429,7 @@
continue
if(location == "head")
var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[S.name]
if(H.species.flags & ALL_RPARTS)//If the user is a species that can have a robotic head...
if(H.species.bodyflags & ALL_RPARTS)//If the user is a species that can have a robotic head...
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head.
continue
@@ -103,10 +103,11 @@ var/global/list/body_accessory_by_species = list("None" = null)
/datum/body_accessory/tail/wingler_tail // Jay wingler fluff tail
name = "Jay Wingler Tail"
name = "Striped Tail"
icon_state = "winglertail"
animated_icon_state = "winglertail_a"
allowed_species = list("Tajaran")
//Vulpkanin
+11 -23
View File
@@ -19,8 +19,7 @@
if(isturf(loc))
var/atom/movable/thing = I.remove(src)
thing.forceMove(get_turf(src))
spawn()
thing.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
thing.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),5)
for(var/obj/item/organ/external/E in bodyparts)
if(istype(E, /obj/item/organ/external/chest))
@@ -28,7 +27,7 @@
// Only make the limb drop if it's not too damaged
if(prob(100 - E.get_damage()))
// Override the current limb status and don't cause an explosion
E.droplimb(DROPLIMB_EDGE)
E.droplimb(DROPLIMB_SHARP)
for(var/mob/M in src)
if(M in stomach_contents)
@@ -38,7 +37,7 @@
if(!isSynthetic())
flick("gibbed-h", animation)
hgibs(loc, viruses, dna)
hgibs(loc, dna)
else
new /obj/effect/decal/cleanable/blood/gibs/robot(loc)
var/datum/effect/system/spark_spread/s = new /datum/effect/system/spark_spread
@@ -90,8 +89,10 @@
if(src) qdel(src)
/mob/living/carbon/human/death(gibbed)
if(stat == DEAD) return
if(healths) healths.icon_state = "health5"
if(stat == DEAD)
return
if(healths)
healths.icon_state = "health5"
if(!gibbed)
emote("deathgasp") //let the world KNOW WE ARE DEAD
@@ -102,21 +103,8 @@
set_heartattack(FALSE)
//Handle species-specific deaths.
if(species) species.handle_death(src)
//Handle brain slugs.
var/obj/item/organ/external/head = get_organ("head")
var/mob/living/simple_animal/borer/B
if(istype(head))
for(var/I in head.implants)
if(istype(I,/mob/living/simple_animal/borer))
B = I
if(B)
if(B.controlling && B.host == src)
B.detach()
verbs -= /mob/living/carbon/proc/release_control
if(species)
species.handle_death(src)
callHook("death", list(src, gibbed))
@@ -143,9 +131,9 @@
return ..(gibbed)
/mob/living/carbon/human/update_revive()
..()
. = ..()
// Update healthdoll
if(healthdoll)
if(. && healthdoll)
// We're alive again, so re-build the entire healthdoll
healthdoll.cached_healthdoll_overlays.Cut()
+50 -11
View File
@@ -38,6 +38,16 @@
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
else
return
if("howl", "howls")
if (species.name == "Vulpkanin") //Only Vulpkanin can howl
on_CD = handle_emote_CD(100)
else
return
if("growl", "growls")
if (species.name == "Vulpkanin") //Only Vulpkanin can growl
on_CD = handle_emote_CD()
else
return
if("squish", "squishes")
var/found_slime_bodypart = 0
@@ -76,7 +86,7 @@
on_CD = handle_emote_CD(50) //longer cooldown
if("fart", "farts", "flip", "flips", "snap", "snaps")
on_CD = handle_emote_CD() //proc located in code\modules\mob\emote.dm
if("cough", "coughs")
if("cough", "coughs", "slap", "slaps")
on_CD = handle_emote_CD()
if("sneeze", "sneezes")
on_CD = handle_emote_CD()
@@ -91,8 +101,21 @@
if("me") //OKAY SO RANT TIME, THIS FUCKING HAS TO BE HERE OR A SHITLOAD OF THINGS BREAK
return custom_emote(m_type, message) //DO YOU KNOW WHY SHIT BREAKS? BECAUSE SO MUCH OLDCODE CALLS mob.emote("me",1,"whatever_the_fuck_it_wants_to_emote")
//WHO THE FUCK THOUGHT THAT WAS A GOOD FUCKING IDEA!?!?
if("ping", "pings")
if("howl", "howls")
var/M = handle_emote_param(param) //Check to see if the param is valid (mob with the param name is in view).
message = "<B>[src]</B> howls[M ? " at [M]" : ""]!"
playsound(loc, 'sound/goonstation/voice/howl.ogg', 100, 0, 10)
m_type = 2
if("growl", "growls")
var/M = handle_emote_param(param)
message = "<B>[src]</B> growls[M ? " at [M]" : ""]."
playsound(loc, "growls", 80, 0)
m_type = 2
if("ping", "pings")
var/M = handle_emote_param(param)
message = "<B>[src]</B> pings[M ? " at [M]" : ""]."
playsound(loc, 'sound/machines/ping.ogg', 50, 0)
@@ -711,9 +734,9 @@
message = "<B>[src]</B> [species.scream_verb][M ? " at [M]" : ""]!"
m_type = 2
if(gender == FEMALE)
playsound(loc, "[species.female_scream_sound]", 80, 1, 0, pitch = get_age_pitch())
playsound(loc, "[species.female_scream_sound]", 80, 1, frequency = get_age_pitch())
else
playsound(loc, "[species.male_scream_sound]", 80, 1, 0, pitch = get_age_pitch()) //default to male screams if no gender is present.
playsound(loc, "[species.male_scream_sound]", 80, 1, frequency = get_age_pitch()) //default to male screams if no gender is present.
else
message = "<B>[src]</B> makes a very loud noise[M ? " at [M]" : ""]."
@@ -727,9 +750,9 @@
var/obj/item/organ/external/R = H.get_organ("r_hand")
var/left_hand_good = 0
var/right_hand_good = 0
if(L && (!(L.status & ORGAN_DESTROYED)) && (!(L.status & ORGAN_SPLINTED)) && (!(L.status & ORGAN_BROKEN)))
if(L && (!(L.status & ORGAN_SPLINTED)) && (!(L.status & ORGAN_BROKEN)))
left_hand_good = 1
if(R && (!(R.status & ORGAN_DESTROYED)) && (!(R.status & ORGAN_SPLINTED)) && (!(R.status & ORGAN_BROKEN)))
if(R && (!(R.status & ORGAN_SPLINTED)) && (!(R.status & ORGAN_BROKEN)))
right_hand_good = 1
if(!left_hand_good && !right_hand_good)
@@ -785,12 +808,28 @@
+ " handshake-mob, hug(s)-(none)/mob, johnny, jump, laugh(s), look(s)-(none)/mob, moan(s), mumble(s), nod(s), pale(s), point(s)-atom, quiver(s), raise(s), salute(s)-(none)/mob, scream(s), shake(s)," \
+ " shiver(s), shrug(s), sigh(s), signal(s)-#1-10,slap(s)-(none)/mob, smile(s),snap(s), sneeze(s), sniff(s), snore(s), stare(s)-(none)/mob, swag(s), tremble(s), twitch(es), twitch(es)_s," \
+ " wag(s), wave(s), whimper(s), wink(s), yawn(s)"
if(species.name == "Machine")
emotelist += "\nMachine specific emotes :- beep(s)-(none)/mob, buzz(es)-none/mob, no-(none)/mob, ping(s)-(none)/mob, yes-(none)/mob"
else if(species.name == "Slime People")
emotelist += "\nSlime people specific emotes :- squish(es)-(none)/mob"
to_chat(src, emotelist)
switch(species.name)
if("Machine")
emotelist += "\nMachine specific emotes :- beep(s)-(none)/mob, buzz(es)-none/mob, no-(none)/mob, ping(s)-(none)/mob, yes-(none)/mob, buzz2-(none)/mob"
if("Drask")
emotelist += "\nDrask specific emotes :- drone(s)-(none)/mob, hum(s)-(none)/mob, rumble(s)-(none)/mob"
if("Kidan")
emotelist += "\nKidan specific emotes :- click(s), clack(s)"
if("Unathi")
emotelist += "\nUnathi specific emotes :- hiss(es)"
if("Vulpkanin")
emotelist += "\nVulpkanin specific emotes :- growl(s)-none/mob, howl(s)-none/mob"
if (species.name == "Slime People")
emotelist += "\nSlime people specific emotes :- squish(es)-(none)/mob"
else
for(var/obj/item/organ/external/L in bodyparts) // if your limbs are squishy you can squish too!
if(L.dna.species in list("Slime People"))
emotelist += "\nSlime people body part specific emotes :- squish(es)-(none)/mob"
break
to_chat(src, emotelist)
else
to_chat(src, "<span class='notice'>Unusable emote '[act]'. Say *help for a list.</span>")
+126 -204
View File
@@ -191,16 +191,6 @@
//ID
if(wear_id)
/*var/id
if(istype(wear_id, /obj/item/device/pda))
var/obj/item/device/pda/pda = wear_id
id = pda.owner
else if(istype(wear_id, /obj/item/weapon/card/id)) //just in case something other than a PDA/ID card somehow gets in the ID slot :[
var/obj/item/weapon/card/id/idcard = wear_id
id = idcard.registered_name
if(id && (id != real_name) && (get_dist(src, user) <= 1) && prob(10))
msg += "<span class='warning'>[t_He] [t_is] wearing [bicon(wear_id)] \a [wear_id] yet something doesn't seem right...</span>\n"
else*/
msg += "[t_He] [t_is] wearing [bicon(wear_id)] \a [wear_id].\n"
//Jitters
@@ -212,36 +202,103 @@
if(100 to 200)
msg += "<span class='warning'>[t_He] [t_is] twitching ever so slightly.</span>\n"
//splints
for(var/organ in list("l_leg","r_leg","l_arm","r_arm"))
var/obj/item/organ/external/o = get_organ(organ)
if(o && o.status & ORGAN_SPLINTED)
msg += "<span class='warning'>[t_He] [t_has] a splint on his [o.name]!</span>\n"
if(suiciding)
msg += "<span class='warning'>[t_He] appears to have commited suicide... there is no hope of recovery.</span>\n"
var/appears_dead = FALSE
if(stat == DEAD || (status_flags & FAKEDEATH))
appears_dead = TRUE
if(suiciding)
msg += "<span class='warning'>[t_He] appears to have committed suicide... there is no hope of recovery.</span>\n"
msg += "<span class='deadsay'>[t_He] [t_is] limp and unresponsive; there are no signs of life"
if(get_int_organ(/obj/item/organ/internal/brain))
if(!key)
var/foundghost = FALSE
if(mind)
for(var/mob/dead/observer/G in player_list)
if(G.mind == mind)
foundghost = TRUE
if(G.can_reenter_corpse == 0)
foundghost = FALSE
break
if(!foundghost)
msg += " and [t_his] soul has departed"
msg += "...</span>\n"
if(DWARF in mutations)
msg += "[t_He] [t_is] a halfling!\n"
var/distance = get_dist(user,src)
if(istype(user, /mob/dead/observer) || user.stat == 2) // ghosts can see anything
distance = 1
if(src.stat)
msg += "<span class='warning'>[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.</span>\n"
if((stat == 2 || src.health <= config.health_threshold_crit) && distance <= 3)
msg += "<span class='warning'>[t_He] does not appear to be breathing.</span>\n"
if(istype(user, /mob/living/carbon/human) && !user.stat && distance <= 1)
for(var/mob/O in viewers(user.loc, null))
O.show_message("[user] checks [src]'s pulse.", 1)
spawn(15)
if(distance <= 1 && user.stat != 1)
if(pulse == PULSE_NONE)
to_chat(user, "<span class='deadsay'>[t_He] has no pulse[src.client ? "" : " and [t_his] soul has departed"]...</span>")
else
to_chat(user, "<span class='deadsay'>[t_He] has a pulse!</span>")
if(!get_int_organ(/obj/item/organ/internal/brain))
msg += "<span class='deadsay'>It appears that [t_his] brain is missing...</span>\n"
msg += "<span class='warning'>"
var/list/wound_flavor_text = list()
var/list/is_destroyed = list()
for(var/organ_tag in species.has_limbs)
var/list/organ_data = species.has_limbs[organ_tag]
var/organ_descriptor = organ_data["descriptor"]
is_destroyed["[organ_data["descriptor"]]"] = 1
var/obj/item/organ/external/E = bodyparts_by_name[organ_tag]
if(!E)
wound_flavor_text["[organ_tag]"] = "<B>[t_He] [t_is] missing [t_his] [organ_descriptor].</B>\n"
else
if(!isSynthetic())
if(E.status & ORGAN_ROBOT)
wound_flavor_text["[E.limb_name]"] = "[t_He] [t_has] a robotic [E.name]!\n"
else if(E.status & ORGAN_SPLINTED)
wound_flavor_text["[E.limb_name]"] = "[t_He] [t_has] a splint on his [E.name]!\n"
for(var/obj/item/I in E.embedded_objects)
msg += "<B>[t_He] [t_has] \a [bicon(I)] [I] embedded in [t_his] [E.name]!</B>\n"
//Handles the text strings being added to the actual description.
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))))
msg += wound_flavor_text["head"]
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
msg += wound_flavor_text["chest"]
if(wound_flavor_text["l_arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["l_arm"]
if(wound_flavor_text["l_hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["l_hand"]
if(wound_flavor_text["r_arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["r_arm"]
if(wound_flavor_text["r_hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["r_hand"]
if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["groin"]
if(wound_flavor_text["l_leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["l_leg"]
if(wound_flavor_text["l_foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["l_foot"]
if(wound_flavor_text["r_leg"] && (is_destroyed["right leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["r_leg"]
if(wound_flavor_text["r_foot"]&& (is_destroyed["right foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["r_foot"]
var/temp = getBruteLoss() //no need to calculate each of these twice
if(temp)
var/brute_message = !isSynthetic() ? "bruising" : "denting"
if(temp < 30)
msg += "[t_He] [t_has] minor [brute_message ].\n"
else
msg += "<B>[t_He] [t_has] severe [brute_message ]!</B>\n"
temp = getFireLoss()
if(temp)
if(temp < 30)
msg += "[t_He] [t_has] minor burns.\n"
else
msg += "<B>[t_He] [t_has] severe burns!</B>\n"
temp = getCloneLoss()
if(temp)
if(temp < 30)
msg += "[t_He] [t_has] minor cellular damage.\n"
else
msg += "<B>[t_He] [t_has] severe cellular damage.</B>\n"
if(fire_stacks > 0)
msg += "[t_He] [t_is] covered in something flammable.\n"
if(fire_stacks < 0)
@@ -267,184 +324,49 @@
else
msg += "[t_He] [t_is] quite chubby.\n"
if(blood_volume < BLOOD_VOLUME_SAFE)
msg += "[t_He] [t_has] pale skin.\n"
if(bleedsuppress)
msg += "[t_He] [t_is] bandaged with something.\n"
else if(bleed_rate)
if(reagents.has_reagent("heparin"))
msg += "<B>[t_He] [t_is] bleeding uncontrollably!</B>\n"
else
msg += "<B>[t_He] [t_is] bleeding!</B>\n"
if(reagents.has_reagent("teslium"))
msg += "[t_He] is emitting a gentle blue glow!\n"
msg += "</span>"
if(getBrainLoss() >= 60)
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
if(!appears_dead)
if(stat == UNCONSCIOUS)
msg += "[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.\n"
else if(getBrainLoss() >= 60)
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
if(species.show_ssd && (!species.has_organ["brain"] || get_int_organ(/obj/item/organ/internal/brain)) && stat != DEAD)
if(istype(src, /mob/living/carbon/human/interactive))
msg += "<span class='deadsay'>[t_He] appears to be some sort of sick automaton: [t_his] eyes are glazed over and [t_his] mouth is slightly agape.</span>\n"
else if(!key)
msg += "<span class='deadsay'>[t_He] [t_is] fast asleep. It doesn't look like they are waking up anytime soon.</span>\n"
else if(!client)
msg += "[t_He] [t_has] suddenly fallen asleep, suffering from Space Sleep Disorder.\n"
if(get_int_organ(/obj/item/organ/internal/brain))
if(istype(src, /mob/living/carbon/human/interactive))
var/mob/living/carbon/human/interactive/auto = src
if(auto.showexaminetext)
msg += "<span class='deadsay'>[t_He] [t_is] appears to be some sort of sick automaton, [t_his] eyes are glazed over and [t_his] mouth is slightly agape.</span>\n"
if(auto.debugexamine)
var/dodebug = auto.doing2string(auto.doing)
var/interestdebug = auto.interest2string(auto.interest)
msg += "<span class='deadsay'>[t_He] [t_is] appears to be [interestdebug] and [dodebug].</span>\n"
else if(species.show_ssd)
if(!key)
msg += "<span class='deadsay'>[t_He] [t_is] totally catatonic. The stresses of life in deep-space must have been too much for [t_him]. Any recovery is unlikely.</span>\n"
else if(!client)
msg += "[t_He] [t_has] suddenly fallen asleep, suffering from Space Sleep Disorder. [t_He] may wake up soon.\n"
if(!get_int_organ(/obj/item/organ/internal/brain))
msg += "<span class='deadsay'>It appears that [t_his] brain is missing...</span>\n"
if(digitalcamo)
msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly inhuman manner.\n"
var/list/wound_flavor_text = list()
var/list/is_destroyed = list()
var/list/is_bleeding = list()
for(var/organ_tag in species.has_limbs)
var/list/organ_data = species.has_limbs[organ_tag]
var/organ_descriptor = organ_data["descriptor"]
is_destroyed["[organ_data["descriptor"]]"] = 1
var/obj/item/organ/external/E = bodyparts_by_name[organ_tag]
if(!E)
wound_flavor_text["[organ_tag]"] = "<span class='warning'><b>[t_He] [t_is] missing [t_his] [organ_descriptor].</b></span>\n"
else if(E.is_stump())
wound_flavor_text["[organ_tag]"] = "<span class='warning'><b>[t_He] [t_has] a stump where [t_his] [organ_descriptor] should be.</b></span>\n"
else
continue
for(var/obj/item/organ/external/temp in bodyparts)
if(temp && !temp.is_stump())
if(temp.status & ORGAN_ROBOT)
if(!(temp.brute_dam + temp.burn_dam))
if(!isSynthetic())
wound_flavor_text["[temp.limb_name]"] = "<span class='warning'>[t_He] [t_has] a robotic [temp.name]!</span>\n"
continue
else
wound_flavor_text["[temp.limb_name]"] = "<span class='warning'>[t_He] [t_has] a robotic [temp.name]. It has"
if(temp.brute_dam) switch(temp.brute_dam)
if(0 to 20)
wound_flavor_text["[temp.limb_name]"] += " some dents"
if(21 to INFINITY)
wound_flavor_text["[temp.limb_name]"] += pick(" a lot of dents"," severe denting")
if(temp.brute_dam && temp.burn_dam)
wound_flavor_text["[temp.limb_name]"] += " and"
if(temp.burn_dam) switch(temp.burn_dam)
if(0 to 20)
wound_flavor_text["[temp.limb_name]"] += " some burns"
if(21 to INFINITY)
wound_flavor_text["[temp.limb_name]"] += pick(" a lot of burns"," severe melting")
if(wound_flavor_text["[temp.limb_name]"])
wound_flavor_text["[temp.limb_name]"] += "!</span>\n"
else if(temp.wounds.len > 0)
var/list/wound_descriptors = list()
for(var/datum/wound/W in temp.wounds)
if(W.internal && !temp.open) continue // can't see internal wounds
var/this_wound_desc = W.desc
if(W.damage_type == BURN && W.salved) this_wound_desc = "salved [this_wound_desc]"
if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
if(W.germ_level > 600) this_wound_desc = "badly infected [this_wound_desc]"
else if(W.germ_level > 330) this_wound_desc = "lightly infected [this_wound_desc]"
if(this_wound_desc in wound_descriptors)
wound_descriptors[this_wound_desc] += W.amount
continue
wound_descriptors[this_wound_desc] = W.amount
if(wound_descriptors.len)
var/list/flavor_text = list()
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")
for(var/wound in wound_descriptors)
switch(wound_descriptors[wound])
if(1)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] [t_has][prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
else
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a [wound]"
if(2)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] [t_has][prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
else
flavor_text += "[prob(10) && !(wound in no_exclude) ? " what might be" : ""] a pair of [wound]s"
if(3 to 5)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] [t_has] several [wound]s"
else
flavor_text += " several [wound]s"
if(6 to INFINITY)
if(!flavor_text.len)
flavor_text += "<span class='warning'>[t_He] [t_has] a bunch of [wound]s"
else
flavor_text += " a ton of [wound]\s"
var/flavor_text_string = ""
for(var/text = 1, text <= flavor_text.len, text++)
if(text == flavor_text.len && flavor_text.len > 1)
flavor_text_string += ", and"
else if(flavor_text.len > 1 && text > 1)
flavor_text_string += ","
flavor_text_string += flavor_text[text]
flavor_text_string += " on [t_his] [temp.name].</span><br>"
wound_flavor_text["[temp.limb_name]"] = flavor_text_string
else
wound_flavor_text["[temp.limb_name]"] = ""
if(temp.status & ORGAN_BLEEDING)
is_bleeding["[temp.limb_name]"] = 1
else
wound_flavor_text["[temp.limb_name]"] = ""
//Handles the text strings being added to the actual description.
//If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext.
var/display_chest = 0
var/display_shoes = 0
var/display_gloves = 0
if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas)))))
msg += wound_flavor_text["head"]
else if(is_bleeding["head"])
msg += "<span class='warning'>[src] has blood running down [t_his] face!</span>\n"
if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you.
msg += wound_flavor_text["chest"]
else if(is_bleeding["chest"])
display_chest = 1
if(wound_flavor_text["l_arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["l_arm"]
else if(is_bleeding["l_arm"])
display_chest = 1
if(wound_flavor_text["l_hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["l_hand"]
else if(is_bleeding["l_hand"])
display_gloves = 1
if(wound_flavor_text["r_arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["r_arm"]
else if(is_bleeding["r_arm"])
display_chest = 1
if(wound_flavor_text["r_hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves)))
msg += wound_flavor_text["r_hand"]
else if(is_bleeding["r_hand"])
display_gloves = 1
if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["groin"]
else if(is_bleeding["groin"])
display_chest = 1
if(wound_flavor_text["l_leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["l_leg"]
else if(is_bleeding["l_leg"])
display_chest = 1
if(wound_flavor_text["l_foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["l_foot"]
else if(is_bleeding["l_foot"])
display_shoes = 1
if(wound_flavor_text["r_leg"] && (is_destroyed["right leg"] || (!w_uniform && !skipjumpsuit)))
msg += wound_flavor_text["r_leg"]
else if(is_bleeding["r_leg"])
display_chest = 1
if(wound_flavor_text["r_foot"]&& (is_destroyed["right foot"] || (!shoes && !skipshoes)))
msg += wound_flavor_text["r_foot"]
else if(is_bleeding["r_foot"])
display_shoes = 1
if(display_chest)
msg += "<span class='warning'><b>[src] has blood soaking through from under [t_his] clothing!</b></span>\n"
if(display_shoes)
msg += "<span class='warning'><b>[src] has blood running from [t_his] shoes!</b></span>\n"
if(display_gloves)
msg += "<span class='warning'><b>[src] has blood running from under [t_his] gloves!</b></span>\n"
for(var/implant in get_visible_implants(0))
msg += "<span class='warning'><b>[src] has \a [implant] sticking out of [t_his] flesh!</b></span>\n"
if(digitalcamo)
msg += "[t_He] [t_is] repulsively uncanny!\n"
if(!(skipface || ( wear_mask && ( wear_mask.flags_inv & HIDEFACE || wear_mask.flags_cover & MASKCOVERSMOUTH) ) ) && is_thrall(src) && in_range(user,src))
msg += "Their features seem unnaturally tight and drawn.\n"
if(decaylevel == 1)
msg += "[t_He] [t_is] starting to smell.\n"
if(decaylevel == 2)
+62 -114
View File
@@ -8,7 +8,6 @@
//why are these here and not in human_defines.dm
//var/list/hud_list[10]
var/datum/species/species //Contains icon generation and language information, set during New().
var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us.
var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
/mob/living/carbon/human/New(var/new_loc, var/new_species = null, var/delay_ready_dna = 0)
@@ -33,9 +32,6 @@
create_reagents(330)
prev_gender = gender // Debug for plural genders
make_blood()
martial_art = default_martial_art
handcrafting = new()
@@ -226,7 +222,7 @@
while(limbs_affected != 0 && valid_limbs.len > 0)
processing_dismember = pick(valid_limbs)
if(processing_dismember.limb_name != "chest" && processing_dismember.limb_name != "head" && processing_dismember.limb_name != "groin")
processing_dismember.droplimb(1,DROPLIMB_EDGE,0,1)
processing_dismember.droplimb(1,DROPLIMB_SHARP,0,1)
valid_limbs -= processing_dismember
limbs_affected -= 1
else valid_limbs -= processing_dismember
@@ -252,7 +248,7 @@
while(limbs_affected != 0 && valid_limbs.len > 0)
processing_dismember = pick(valid_limbs)
if(processing_dismember.limb_name != "chest" && processing_dismember.limb_name != "head" && processing_dismember.limb_name != "groin")
processing_dismember.droplimb(1,DROPLIMB_EDGE,0,1)
processing_dismember.droplimb(1,DROPLIMB_SHARP,0,1)
valid_limbs -= processing_dismember
limbs_affected -= 1
else valid_limbs -= processing_dismember
@@ -277,7 +273,7 @@
while(limbs_affected != 0 && valid_limbs.len > 0)
processing_dismember = pick(valid_limbs)
if(processing_dismember.limb_name != "chest" && processing_dismember.limb_name != "head" && processing_dismember.limb_name != "groin")
processing_dismember.droplimb(1,DROPLIMB_EDGE,0,1)
processing_dismember.droplimb(1,DROPLIMB_SHARP,0,1)
valid_limbs -= processing_dismember
limbs_affected -= 1
else valid_limbs -= processing_dismember
@@ -335,7 +331,7 @@
/mob/living/carbon/human/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if(I_HELP)
if(INTENT_HELP)
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
@@ -428,7 +424,7 @@
/mob/living/carbon/human/show_inv(mob/user)
user.set_machine(src)
var/has_breathable_mask = istype(wear_mask, /obj/item/clothing/mask)
var/has_breathable_mask = istype(wear_mask, /obj/item/clothing/mask) || get_organ_slot("breathing_tube")
var/list/obscured = check_obscured_slots()
var/dat = {"<table>
@@ -540,12 +536,10 @@
popup.open()
// called when something steps onto a human
// this handles mulebots and vehicles
/mob/living/carbon/human/Crossed(var/atom/movable/AM)
if(istype(AM, /obj/vehicle))
var/obj/vehicle/V = AM
V.RunOver(src)
/mob/living/carbon/human/Crossed(atom/movable/AM)
var/mob/living/simple_animal/bot/mulebot/MB = AM
if(istype(MB))
MB.RunOver(src)
// Get rank from ID, ID inside PDA, PDA, ID in wallet, etc.
/mob/living/carbon/human/proc/get_authentification_rank(var/if_no_id = "No id", var/if_no_job = "No job")
@@ -597,7 +591,7 @@
return
//repurposed proc. Now it combines get_id_name() and get_face_name() to determine a mob's name variable. Made into a seperate proc as it'll be useful elsewhere
/mob/living/carbon/human/get_visible_name()
/mob/living/carbon/human/get_visible_name(var/id_override = FALSE)
if(name_override)
return name_override
if(wear_mask && (wear_mask.flags_inv & HIDEFACE)) //Wearing a mask which hides our face, use id-name if possible
@@ -606,14 +600,14 @@
return get_id_name("Unknown") //Likewise for hats
var/face_name = get_face_name()
var/id_name = get_id_name("")
if(id_name && (id_name != face_name))
if(id_name && (id_name != face_name) && !id_override)
return "[face_name] (as [id_name])"
return face_name
//Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable
/mob/living/carbon/human/proc/get_face_name()
var/obj/item/organ/external/head = get_organ("head")
if( !head || head.disfigured || (head.status & ORGAN_DESTROYED) || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
if( !head || head.disfigured || !real_name || (HUSK in mutations) ) //disfigured. use id-name if possible
return "Unknown"
return real_name
@@ -700,6 +694,28 @@
if(G && G.pickpocket)
thief_mode = 1
if(href_list["embedded_object"])
var/obj/item/organ/external/L = locate(href_list["embedded_limb"]) in bodyparts
if(!L)
return
var/obj/item/I = locate(href_list["embedded_object"]) in L.embedded_objects
if(!I || I.loc != src) //no item, no limb, or item is not in limb or in the person anymore
return
var/time_taken = I.embedded_unsafe_removal_time*I.w_class
usr.visible_message("<span class='warning'>[usr] attempts to remove [I] from their [L.name].</span>","<span class='notice'>You attempt to remove [I] from your [L.name]... (It will take [time_taken/10] seconds.)</span>")
if(do_after(usr, time_taken, needhand = 1, target = src))
if(!I || !L || I.loc != src || !(I in L.embedded_objects))
return
L.embedded_objects -= I
L.take_damage(I.embedded_unsafe_removal_pain_multiplier*I.w_class)//It hurts to rip it out, get surgery you dingus.
I.forceMove(get_turf(src))
usr.put_in_hands(I)
usr.emote("scream")
usr.visible_message("[usr] successfully rips [I] out of their [L.name]!","<span class='notice'>You successfully remove [I] from your [L.name].</span>")
if(!has_embedded_objects())
clear_alert("embeddedobject")
return
if(href_list["item"])
var/slot = text2num(href_list["item"])
if(slot in check_obscured_slots())
@@ -1190,18 +1206,10 @@
for(var/obj/item/organ/internal/I in H.internal_organs)
types_of_int_organs |= I.type //Compiling the list of organ types. It is possible for organs to be missing from this list if they are absent from the mob.
//Removing stumps.
for(var/obj/item/organ/organ in H.contents)
if(istype(organ, /obj/item/organ/external/stump)) //Get rid of all stumps.
qdel(organ)
H.contents -= organ //Making sure the list entry is removed.
for(var/obj/item/organ/organ in H.bodyparts)
if(istype(organ, /obj/item/organ/external/stump))
qdel(organ)
H.bodyparts -= organ //Making sure the list entry is removed.
//Clean up limbs
for(var/organ_name in H.bodyparts_by_name)
var/obj/item/organ/organ = H.bodyparts_by_name[organ_name]
if(istype(organ, /obj/item/organ/external/stump) || !organ) //The !organ check is to account for mechanical limb (prostheses) losses, since those are handled in a way that leaves indexed but null list entries instead of stumps.
if(!organ) //The !organ check is to account for mechanical limb (prostheses) losses, since those are handled in a way that leaves indexed but null list entries instead of stumps.
qdel(organ)
H.bodyparts_by_name -= organ_name //Making sure the list entry is removed.
@@ -1234,12 +1242,6 @@
I.insert(H)
/mob/living/carbon/human/revive()
if(species && !(species.flags & NO_BLOOD))
var/blood_reagent = get_blood_name()
vessel.add_reagent(blood_reagent, max_blood-vessel.total_volume)
fixblood()
//Fix up all organs and replace lost ones.
restore_all_organs() //Rejuvenate and reset all existing organs.
check_and_regenerate_organs(src) //Regenerate limbs and organs only if they're really missing.
@@ -1311,23 +1313,13 @@
*/
//returns 1 if made bloody, returns 0 otherwise
/mob/living/carbon/human/add_blood(mob/living/carbon/human/M as mob)
if(!..())
return 0
//if this blood isn't already in the list, add it
if(blood_DNA[M.dna.unique_enzymes])
return 0 //already bloodied with this blood. Cannot add more.
blood_DNA[M.dna.unique_enzymes] = M.dna.b_type
hand_blood_color = blood_color
src.update_inv_gloves()
verbs += /mob/living/carbon/human/proc/bloody_doodle
return 1 //we applied blood to the item
/mob/living/carbon/human/clean_blood(var/clean_feet)
.=..()
if(clean_feet && !shoes && istype(feet_blood_DNA, /list) && feet_blood_DNA.len)
feet_blood_color = null
qdel(feet_blood_DNA)
bloody_feet = list(BLOOD_STATE_HUMAN = 0, BLOOD_STATE_XENO = 0, BLOOD_STATE_NOT_BLOODY = 0)
blood_state = BLOOD_STATE_NOT_BLOODY
update_inv_shoes(1)
return 1
@@ -1348,16 +1340,6 @@
else
..()
/mob/living/carbon/human/get_visible_implants(var/class = 0)
var/list/visible_implants = list()
for(var/obj/item/organ/external/organ in bodyparts)
for(var/obj/item/weapon/O in organ.implants)
if(!istype(O,/obj/item/weapon/implant) && (O.w_class > class) && !istype(O,/obj/item/weapon/shard/shrapnel))
visible_implants += O
return(visible_implants)
/mob/living/carbon/human/generate_name()
name = species.makeName(gender,src)
real_name = name
@@ -1365,29 +1347,6 @@
dna.real_name = name
return name
/mob/living/carbon/human/proc/handle_embedded_objects()
for(var/obj/item/organ/external/organ in bodyparts)
if(organ.status & ORGAN_SPLINTED) //Splints prevent movement.
continue
for(var/obj/item/weapon/O in organ.implants)
if(!istype(O,/obj/item/weapon/implant) && prob(5)) //Moving with things stuck in you could be bad.
// All kinds of embedded objects cause bleeding.
var/msg = null
switch(rand(1,3))
if(1)
msg ="<span class='warning'>A spike of pain jolts your [organ.name] as you bump [O] inside.</span>"
if(2)
msg ="<span class='warning'>Your movement jostles [O] in your [organ.name] painfully.</span>"
if(3)
msg ="<span class='warning'>[O] in your [organ.name] twists painfully as you move.</span>"
to_chat(src, msg)
organ.take_damage(rand(1,3), 0, 0)
if(!(organ.status & ORGAN_ROBOT)) //There is no blood in protheses.
organ.status |= ORGAN_BLEEDING
src.adjustToxLoss(rand(1,3))
/mob/living/carbon/human/verb/check_pulse()
set category = null
set name = "Check pulse"
@@ -1455,10 +1414,6 @@
tail = species.tail
if(vessel)
vessel = null
make_blood()
maxHealth = species.total_health
toxins_alert = 0
@@ -1476,13 +1431,9 @@
if(species.base_color && default_colour)
//Apply colour.
r_skin = color2R(species.base_color)
g_skin = color2G(species.base_color)
b_skin = color2B(species.base_color)
skin_colour = species.base_color
else
r_skin = 0
g_skin = 0
b_skin = 0
skin_colour = "#000000"
if(!(species.bodyflags & HAS_SKIN_TONE))
s_tone = 0
@@ -1506,29 +1457,17 @@
if(species.default_hair_colour)
//Apply colour.
H.r_hair = color2R(species.default_hair_colour)
H.g_hair = color2G(species.default_hair_colour)
H.b_hair = color2B(species.default_hair_colour)
H.hair_colour = species.default_hair_colour
else
H.r_hair = 0
H.g_hair = 0
H.b_hair = 0
H.hair_colour = "#000000"
if(species.default_fhair_colour)
H.r_facial = color2R(species.default_fhair_colour)
H.g_facial = color2G(species.default_fhair_colour)
H.b_facial = color2B(species.default_fhair_colour)
H.facial_colour = species.default_fhair_colour
else
H.r_facial = 0
H.g_facial = 0
H.b_facial = 0
H.facial_colour = "#000000"
if(species.default_headacc_colour)
H.r_headacc = color2R(species.default_headacc_colour)
H.g_headacc = color2G(species.default_headacc_colour)
H.b_headacc = color2B(species.default_headacc_colour)
H.headacc_colour = species.default_headacc_colour
else
H.r_headacc = 0
H.g_headacc = 0
H.b_headacc = 0
H.headacc_colour = "#000000"
m_styles = DEFAULT_MARKING_STYLES //Wipes out markings, setting them all to "None".
m_colours = DEFAULT_MARKING_COLOURS //Defaults colour to #00000 for all markings.
@@ -1555,7 +1494,6 @@
overlays.Cut()
update_mutantrace(1)
regenerate_icons()
fixblood()
if(!delay_icon_update)
UpdateAppearance()
@@ -1634,11 +1572,11 @@
return
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) //If the rock'em-sock'em robot's head came off during a fight, they shouldn't be able to change their screen/optics.
if(!head_organ) //If the rock'em-sock'em robot's head came off during a fight, they shouldn't be able to change their screen/optics.
to_chat(src, "<span class='warning'>Where's your head at? Can't change your monitor/display without one.</span>")
return
if(species.flags & ALL_RPARTS) //If they can have a fully cybernetic body...
if(species.bodyflags & ALL_RPARTS) //If they can have a fully cybernetic body...
var/datum/robolimb/robohead = all_robolimbs[head_organ.model]
if(!head_organ)
return
@@ -1972,7 +1910,7 @@
. |= A.GetAccess()
/mob/living/carbon/human/is_mechanical()
return ..() || (species.flags & ALL_RPARTS) != 0
return ..() || (species.bodyflags & ALL_RPARTS) != 0
/mob/living/carbon/human/can_use_guns(var/obj/item/weapon/gun/G)
. = ..()
@@ -1981,12 +1919,12 @@
if(HULK in mutations)
to_chat(src, "<span class='warning'>Your meaty finger is much too large for the trigger guard!</span>")
return 0
if(species.flags & NOGUNS)
if(NOGUNS in species.species_traits)
to_chat(src, "<span class='warning'>Your fingers don't fit in the trigger guard!</span>")
return 0
if(martial_art && martial_art.name == "The Sleeping Carp") //great dishonor to famiry
to_chat(src, "<span class='warning'>Use of ranged weaponry would bring dishonor to the clan.</span>")
if(martial_art && martial_art.no_guns) //great dishonor to famiry
to_chat(src, "<span class='warning'>[martial_art.no_guns_message]</span>")
return 0
return .
@@ -2094,3 +2032,13 @@
update_icons()
..()
mob/living/carbon/human/get_taste_sensitivity()
if(species)
return species.taste_sensitivity
else
return 1
/mob/living/carbon/human/proc/special_post_clone_handling()
if(mind && mind.assigned_role == "Cluwne") //HUNKE your suffering never stops
makeCluwne()
@@ -4,13 +4,13 @@
return 0
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if(I_GRAB)
if(INTENT_GRAB)
grabbedby(M)
if(I_HARM)
if(INTENT_HARM)
M.do_attack_animation(src)
if(w_uniform)
w_uniform.add_fingerprint(M)
@@ -33,7 +33,7 @@
apply_effect(4, WEAKEN, armor_block)
updatehealth()
if(I_DISARM)
if(INTENT_DISARM)
M.do_attack_animation(src)
if(prob(80))
var/obj/item/organ/external/affecting = get_organ(ran_zone(M.zone_sel.selecting))
@@ -18,7 +18,7 @@
..()
if((M != src) && M.a_intent != "help" && check_shields(0, M.name, attack_type = UNARMED_ATTACK))
if((M != src) && M.a_intent != INTENT_HELP && check_shields(0, M.name, attack_type = UNARMED_ATTACK))
add_logs(M, src, "attempted to touch")
visible_message("<span class='warning'>[M] attempted to touch [src]!</span>")
return 0
@@ -53,7 +53,7 @@
species.handle_attack_hand(src,M)
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
if(attacker_style && attacker_style.help_act(H, src))//adminfu only...
return 1
if(can_operate(src))
@@ -99,26 +99,26 @@
else
to_chat(M, "<span class='danger'>You need to stay still while performing CPR!</span>")
if(I_GRAB)
if(INTENT_GRAB)
if(attacker_style && attacker_style.grab_act(H, src))
return 1
else
src.grabbedby(M)
return 1
if(I_HARM)
if(INTENT_HARM)
//Vampire code
if(M.mind && M.mind.vampire && (M.mind in ticker.mode.vampires) && !M.mind.vampire.draining && M.zone_sel && M.zone_sel.selecting == "head" && src != M)
if(species && species.flags & NO_BLOOD)//why this hell were we never checkinf for this?
if((NO_BLOOD in species.species_traits) || species.exotic_blood || !blood_volume)
to_chat(M, "<span class='warning'>They have no blood!</span>")
return
if(mind && mind.vampire && (mind in ticker.mode.vampires))
to_chat(M, "<span class='warning'>Your fangs fail to pierce [src.name]'s cold flesh</span>")
to_chat(M, "<span class='warning'>Your fangs fail to pierce [name]'s cold flesh</span>")
return
if(SKELETON in mutations)
to_chat(M, "<span class='warning'>There is no blood in a skeleton!</span>")
return
if(issmall(src) && !ckey) //Monkeyized humans are okay, humanized monkeys are okey, monkeys are not.
if(issmall(src) && !ckey) //Monkeyized humans are okay, humanized monkeys are okay, NPC monkeys are not.
to_chat(M, "<span class='warning'>Blood from a monkey is useless!</span>")
return
//we're good to suck the blood, blaah
@@ -158,7 +158,7 @@
visible_message("<span class='danger'>[M] [pick(attack.attack_verb)]ed [src]!</span>")
apply_damage(damage, BRUTE, affecting, armor_block, sharp=attack.sharp, edge=attack.edge) //moving this back here means Armalis are going to knock you down 70% of the time, but they're pure adminbus anyway.
apply_damage(damage, BRUTE, affecting, armor_block, sharp = attack.sharp) //moving this back here means Armalis are going to knock you down 70% of the time, but they're pure adminbus anyway.
if((stat != DEAD) && damage >= M.species.punchstunthreshold)
visible_message("<span class='danger'>[M] has weakened [src]!</span>", \
"<span class='userdanger'>[M] has weakened [src]!</span>")
@@ -168,7 +168,7 @@
forcesay(hit_appends)
if(I_DISARM)
if(INTENT_DISARM)
if(attacker_style && attacker_style.disarm_act(H, src))
return 1
else
@@ -112,7 +112,7 @@
var/obj/item/organ/external/O = get_organ(organ_name)
if(amount > 0)
O.take_damage(amount, 0, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source)
O.take_damage(amount, 0, sharp=is_sharp(damage_source), used_weapon=damage_source)
else
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
O.heal_damage(-amount, 0, internal=0, robo_repair=(O.status & ORGAN_ROBOT))
@@ -126,7 +126,7 @@
var/obj/item/organ/external/O = get_organ(organ_name)
if(amount > 0)
O.take_damage(0, amount, sharp=is_sharp(damage_source), edge=has_edge(damage_source), used_weapon=damage_source)
O.take_damage(0, amount, sharp=is_sharp(damage_source), used_weapon=damage_source)
else
//if you don't want to heal robot organs, they you will have to check that yourself before using this proc.
O.heal_damage(0, -amount, internal=0, robo_repair=(O.status & ORGAN_ROBOT))
@@ -240,7 +240,7 @@
if(!parts.len)
return
var/obj/item/organ/external/picked = pick(parts)
if(picked.take_damage(brute,burn,sharp,edge))
if(picked.take_damage(brute, burn, sharp))
UpdateDamageIcon()
updatehealth()
speech_problem_flag = 1
@@ -285,7 +285,7 @@
var/burn_was = picked.burn_dam
update |= picked.take_damage(brute_per_part,burn_per_part,sharp,edge,used_weapon)
update |= picked.take_damage(brute_per_part, burn_per_part, sharp, used_weapon)
brute -= (picked.brute_dam - brute_was)
burn -= (picked.burn_dam - burn_was)
@@ -300,15 +300,6 @@
////////////////////////////////////////////
/*
This function restores the subjects blood to max.
*/
/mob/living/carbon/human/proc/restore_blood()
if(!(species.flags & NO_BLOOD))
var/blood_type = get_blood_name()
var/blood_volume = vessel.get_reagent_amount(blood_type)
vessel.add_reagent(blood_type, BLOOD_VOLUME_NORMAL - blood_volume)
/*
This function restores all organs.
*/
@@ -333,7 +324,7 @@ This function restores all organs.
return bodyparts_by_name[zone]
/mob/living/carbon/human/apply_damage(damage = 0, damagetype = BRUTE, def_zone = null, blocked = 0, sharp = 0, edge = 0, obj/used_weapon = null)
/mob/living/carbon/human/apply_damage(damage = 0, damagetype = BRUTE, def_zone = null, blocked = 0, sharp = 0, obj/used_weapon = null)
//Handle other types of damage
if((damagetype != BRUTE) && (damagetype != BURN))
..(damage, damagetype, def_zone, blocked)
@@ -364,7 +355,7 @@ This function restores all organs.
if(species)
damage = damage * species.brute_mod
if(organ.take_damage(damage, 0, sharp, edge, used_weapon))
if(organ.take_damage(damage, 0, sharp, used_weapon))
UpdateDamageIcon()
if(LAssailant && ishuman(LAssailant)) //superheros still get the comical hit markers
@@ -389,7 +380,7 @@ This function restores all organs.
if(species)
damage = damage * species.burn_mod
if(organ.take_damage(0, damage, sharp, edge, used_weapon))
if(organ.take_damage(0, damage, sharp, used_weapon))
UpdateDamageIcon()
// Will set our damageoverlay icon to the next level, which will then be set back to the normal level the next mob.Life().
@@ -8,9 +8,10 @@ emp_act
*/
/mob/living/carbon/human/bullet_act(var/obj/item/projectile/P, var/def_zone)
if(istype(P, /obj/item/projectile/energy) || istype(P, /obj/item/projectile/beam))
/mob/living/carbon/human/bullet_act(obj/item/projectile/P, def_zone)
if(P.is_reflectable)
if(check_reflect(def_zone)) // Checks if you've passed a reflection% check
visible_message("<span class='danger'>The [P.name] gets reflected by [src]!</span>", \
"<span class='userdanger'>The [P.name] gets reflected by [src]!</span>")
@@ -41,19 +42,6 @@ emp_act
. = bullet_act(P, "chest") //act on chest instead
return
//Shrapnel
if(P.damage_type == BRUTE)
var/armor = getarmor_organ(organ, "bullet")
if((P.embed && prob(20 + max(P.damage - armor, -10))))
var/obj/item/weapon/shard/shrapnel/SP = new()
(SP.name) = "[P.name] shrapnel"
if(P.ammo_casing && P.ammo_casing.caliber)
(SP.desc) = "[SP.desc] It looks like it is a [P.ammo_casing.caliber] caliber round."
else
(SP.desc) = "[SP.desc] The round's caliber is unidentifiable."
(SP.loc) = organ
organ.embed(SP)
organ.add_autopsy_data(P.name, P.damage) // Add the bullet's name to the autopsy data
return (..(P , def_zone))
@@ -61,7 +49,7 @@ emp_act
/mob/living/carbon/human/check_projectile_dismemberment(obj/item/projectile/P, def_zone)
var/obj/item/organ/external/affecting = get_organ(check_zone(def_zone))
if(affecting && !affecting.cannot_amputate && affecting.get_damage() >= (affecting.max_damage - P.dismemberment))
var/damtype = DROPLIMB_EDGE
var/damtype = DROPLIMB_SHARP
switch(P.damage_type)
if(BRUTE)
damtype = DROPLIMB_BLUNT
@@ -191,14 +179,14 @@ emp_act
/mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone)
if(!I || !user) return 0
if((istype(I, /obj/item/weapon/kitchen/knife/butcher/meatcleaver) || istype(I, /obj/item/weapon/twohanded/chainsaw)) && src.stat == DEAD && user.a_intent == I_HARM)
if((istype(I, /obj/item/weapon/kitchen/knife/butcher/meatcleaver) || istype(I, /obj/item/weapon/twohanded/chainsaw)) && src.stat == DEAD && user.a_intent == INTENT_HARM)
var/obj/item/weapon/reagent_containers/food/snacks/meat/human/newmeat = new /obj/item/weapon/reagent_containers/food/snacks/meat/human(get_turf(src.loc))
newmeat.name = src.real_name + newmeat.name
newmeat.subjectname = src.real_name
newmeat.subjectjob = src.job
newmeat.reagents.add_reagent ("nutriment", (src.nutrition / 15) / 3)
src.reagents.trans_to (newmeat, round ((src.reagents.total_volume) / 3, 1))
src.loc.add_blood(src)
add_mob_blood(src)
--src.meatleft
to_chat(user, "<span class='warning'>You hack off a chunk of meat from [src.name]</span>")
if(!src.meatleft)
@@ -213,10 +201,10 @@ emp_act
qdel(src)
var/obj/item/organ/external/affecting = get_organ(ran_zone(user.zone_sel.selecting))
if(!affecting || affecting.is_stump() || (affecting.status & ORGAN_DESTROYED))
if(!affecting)
to_chat(user, "<span class='danger'>They are missing that limb!</span>")
return 1
var/hit_area = affecting.name
var/hit_area = parse_zone(affecting.limb_name)
if(user != src)
user.do_attack_animation(src)
@@ -234,32 +222,29 @@ emp_act
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].", armour_penetration = I.armour_penetration)
var/weapon_sharp = is_sharp(I)
var/weapon_edge = has_edge(I)
if((weapon_sharp || weapon_edge) && prob(getarmor(user.zone_sel.selecting, "melee")))
if(weapon_sharp && prob(getarmor(user.zone_sel.selecting, "melee")))
weapon_sharp = 0
weapon_edge = 0
if(armor >= 100) return 0
if(!I.force) return 0
var/Iforce = I.force //to avoid runtimes on the forcesay checks at the bottom. Some items might delete themselves if you drop them. (stunning yourself, ninja swords)
apply_damage(I.force, I.damtype, affecting, armor, sharp=weapon_sharp, edge=weapon_edge, used_weapon=I)
apply_damage(I.force, I.damtype, affecting, armor, sharp = weapon_sharp, used_weapon = I)
var/bloody = 0
if(I.damtype == BRUTE && I.force && prob(25 + I.force * 2))
I.add_blood(src) //Make the weapon bloody, not the person.
I.add_mob_blood(src) //Make the weapon bloody, not the person.
// if(user.hand) user.update_inv_l_hand() //updates the attacker's overlay for the (now bloodied) weapon
// else user.update_inv_r_hand() //removed because weapons don't have on-mob blood overlays
if(prob(33))
if(prob(I.force * 2)) //blood spatter!
bloody = 1
var/turf/location = loc
if(istype(location, /turf/simulated))
location.add_blood(src)
add_splatter_floor(location)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(get_dist(H, src) <= 1) //people with TK won't get smeared with blood
H.bloody_body(src)
H.bloody_hands(src)
H.add_mob_blood(src)
if(!stat)
switch(hit_area)
@@ -275,43 +260,35 @@ emp_act
if(bloody)//Apply blood
if(wear_mask)
wear_mask.add_blood(src)
wear_mask.add_mob_blood(src)
update_inv_wear_mask(0)
if(head)
head.add_blood(src)
head.add_mob_blood(src)
update_inv_head(0,0)
if(glasses && prob(33))
glasses.add_blood(src)
glasses.add_mob_blood(src)
update_inv_glasses(0)
if("upper body")//Easier to score a stun but lasts less time
if("chest")//Easier to score a stun but lasts less time
if(stat == CONSCIOUS && I.force && prob(I.force + 10))
visible_message("<span class='combat danger'>[src] has been knocked down!</span>", \
"<span class='combat userdanger'>[src] has been knocked down!</span>")
apply_effect(5, WEAKEN, armor)
if(bloody)
bloody_body(src)
if(wear_suit)
wear_suit.add_mob_blood(src)
update_inv_wear_suit(1)
if(w_uniform)
w_uniform.add_mob_blood(src)
update_inv_w_uniform(1)
if(Iforce > 10 || Iforce >= 5 && prob(33))
forcesay(hit_appends) //forcesay checks stat already
/* //Melee weapon embedded object code. Commented out, as most people on the forums seem to find this annoying and think it does not contribute to general gameplay. - Dave
if(I.damtype == BRUTE && !I.is_robot_module())
var/damage = I.force
if(armor)
damage /= armor+1
//blunt objects should really not be embedding in things unless a huge amount of force is involved
var/embed_chance = weapon_sharp? damage/I.w_class : damage/(I.w_class*3)
var/embed_threshold = weapon_sharp? 5*I.w_class : 15*I.w_class
//Sharp objects will always embed if they do enough damage.
if(((weapon_sharp && damage > (10*I.w_class)) || (damage > embed_threshold && prob(embed_chance))) && (I.no_embed == 0) )
affecting.embed(I)
return 1*/
//this proc handles being hit by a thrown atom
/mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0)
var/obj/item/I
@@ -325,45 +302,38 @@ emp_act
hitpush = 0
skipcatch = 1
blocked = 1
/*else if(I)
else if(I)
if(I.throw_speed >= EMBED_THROWSPEED_THRESHOLD)
if(!I.is_robot_module())
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].", I.armour_penetration) //I guess "melee" is the best fit here
var/sharp = is_sharp(I)
var/damage = throwpower * (I.throw_speed / 5)
if(armor)
damage /= armor + 1
//blunt objects should really not be embedding in things unless a huge amount of force is involved
var/embed_chance = sharp? damage / I.w_class : damage/(I.w_class * 3)
var/embed_threshold = sharp? 5 * I.w_class : 15 * I.w_class
//Sharp objects will always embed if they do enough damage.
//Thrown sharp objects have some momentum already and have a small chance to embed even if the damage is below the threshold
if(((sharp && prob(damage / (10 * I.w_class) * 100)) || (damage > embed_threshold && prob(embed_chance))) && (I.no_embed == 0))
affecting.embed(I)*/
if(can_embed(I))
if(prob(I.embed_chance))
throw_alert("embeddedobject", /obj/screen/alert/embeddedobject)
var/obj/item/organ/external/L = pick(bodyparts)
L.embedded_objects |= I
I.add_mob_blood(src)//it embedded itself in you, of course it's bloody!
I.forceMove(src)
L.take_damage(I.w_class*I.embedded_impact_pain_multiplier)
visible_message("<span class='danger'>[I] embeds itself in [src]'s [L.name]!</span>","<span class='userdanger'>[I] embeds itself in your [L.name]!</span>")
hitpush = 0
skipcatch = 1 //can't catch the now embedded item
return ..()
/mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2)
if(gloves)
gloves.add_blood(source)
gloves.add_mob_blood(source)
gloves:transfer_blood = amount
gloves:bloody_hands_mob = source
else
add_blood(source)
add_mob_blood(source)
bloody_hands = amount
bloody_hands_mob = source
update_inv_gloves(1) //updates on-mob overlays for bloody hands and/or bloody gloves
/mob/living/carbon/human/proc/bloody_body(var/mob/living/source)
if(wear_suit)
wear_suit.add_blood(source)
wear_suit.add_mob_blood(source)
update_inv_wear_suit(0)
return
if(w_uniform)
w_uniform.add_blood(source)
w_uniform.add_mob_blood(source)
update_inv_w_uniform(1)
/mob/living/carbon/human/proc/handle_suit_punctures(var/damtype, var/damage)
@@ -378,7 +348,7 @@ emp_act
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == I_HARM)
if(M.occupant.a_intent == INTENT_HARM)
if(M.damtype == "brute")
step_away(src,M,15)
var/obj/item/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
@@ -421,5 +391,12 @@ emp_act
/mob/living/carbon/human/water_act(volume, temperature, source)
..()
if(temperature >= 330) bodytemperature = bodytemperature + (temperature - bodytemperature)
if(temperature <= 280) bodytemperature = bodytemperature - (bodytemperature - temperature)
species.water_act(src,volume,temperature,source)
/mob/living/carbon/human/is_eyes_covered(check_glasses = TRUE, check_head = TRUE, check_mask = TRUE)
if(check_glasses && glasses && (glasses.flags_cover & GLASSESCOVERSEYES))
return TRUE
if(check_head && head && (head.flags_cover & HEADCOVERSEYES))
return TRUE
if(check_mask && wear_mask && (wear_mask.flags_cover & MASKCOVERSMOUTH))
return TRUE
@@ -10,9 +10,7 @@ var/global/default_martial_art = new/datum/martial_art
var/s_tone = 0 //Skin tone
//Skin colour
var/r_skin = 0
var/g_skin = 0
var/b_skin = 0
var/skin_colour = "#000000"
var/lip_style = null //no lipstick by default- arguably misleading, as it could be used for general makeup
var/lip_color = "white"
@@ -52,9 +50,6 @@ var/global/default_martial_art = new/datum/martial_art
var/special_voice = "" // For changing our voice. Used by a symptom.
var/last_dam = -1 //Used for determining if we need to process all organs or just some or even none.
var/list/bad_external_organs = list()// organs we check until they are good.
var/hand_blood_color
var/name_override //For temporary visible name changes
@@ -65,9 +60,13 @@ var/global/default_martial_art = new/datum/martial_art
var/meatleft = 3 //For chef item
var/decaylevel = 0 // For rotting bodies
var/max_blood = BLOOD_VOLUME_NORMAL // For stuff in the vessel
var/bleed_rate = 0
var/bleedsuppress = 0 //for stopping bloodloss
var/check_mutations=0 // Check mutations on next life tick
var/heartbeat = 0
var/fire_dmi = 'icons/mob/OnFire.dmi'
var/fire_sprite = "Standing"
@@ -35,24 +35,53 @@
/mob/living/carbon/human/Move(NewLoc, direct)
. = ..()
if(shoes && .) // did we actually move?
if(.) // did we actually move?
if(!lying && !buckled)
var/obj/item/clothing/shoes/S = shoes
if(!has_gravity(loc))
return
var/obj/item/clothing/shoes/S = shoes
S.step_action(src)
//Bloody footprints
var/turf/T = get_turf(src)
var/obj/item/organ/external/l_foot = get_organ("l_foot")
var/obj/item/organ/external/r_foot = get_organ("r_foot")
var/hasfeet = 1
if(!l_foot && !r_foot)
hasfeet = 0
if(shoes)
if(S.bloody_shoes && S.bloody_shoes[S.blood_state])
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T
if(oldFP && oldFP.blood_state == S.blood_state && oldFP.basecolor == S.blood_color)
return
else
//No oldFP or it's a different kind of blood
S.bloody_shoes[S.blood_state] = max(0, S.bloody_shoes[S.blood_state] - BLOOD_LOSS_PER_STEP)
createFootprintsFrom(shoes, dir, T)
update_inv_shoes()
else if(hasfeet)
if(bloody_feet && bloody_feet[blood_state])
var/obj/effect/decal/cleanable/blood/footprints/oldFP = locate(/obj/effect/decal/cleanable/blood/footprints) in T
if(oldFP && oldFP.blood_state == blood_state && oldFP.basecolor == feet_blood_color)
return
else
bloody_feet[blood_state] = max(0, bloody_feet[blood_state] - BLOOD_LOSS_PER_STEP)
createFootprintsFrom(src, dir, T)
update_inv_shoes()
//End bloody footprints
if(S)
S.step_action(src)
/mob/living/carbon/human/handle_footstep(turf/T)
if(..())
if(T.footstep_sounds["human"])
var/S = pick(T.footstep_sounds["human"])
if(S)
if(m_intent == "run")
if(m_intent == MOVE_INTENT_RUN)
if(!(step_count % 2)) //every other turf makes a sound
return 0
var/range = -(world.view - 2)
if(m_intent == "walk")
if(m_intent == MOVE_INTENT_WALK)
range -= 0.333
if(!shoes)
range -= 0.333
@@ -65,7 +94,7 @@
//-(7 - 2) = (-5) = -5 | -5 - (0.333 * 2) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
var/volume = 13
if(m_intent == "walk")
if(m_intent == MOVE_INTENT_WALK)
volume -= 4
if(!shoes)
volume -= 4
@@ -91,4 +120,4 @@
playsound(T, S, volume, 1, range)
return 1
return 0
return 0
@@ -9,52 +9,24 @@
// Takes care of organ related updates, such as broken and missing limbs
/mob/living/carbon/human/proc/handle_organs()
number_wounds = 0
var/force_process = 0
var/damage_this_tick = getBruteLoss() + getFireLoss() + getToxLoss()
if(damage_this_tick > last_dam)
force_process = 1
last_dam = damage_this_tick
if(force_process)
bad_external_organs.Cut()
for(var/obj/item/organ/external/Ex in bodyparts)
bad_external_organs |= Ex
//processing internal organs is pretty cheap, do that first.
for(var/obj/item/organ/internal/I in internal_organs)
I.process()
for(var/obj/item/organ/external/E in bodyparts)
E.process()
if(!lying && world.time - l_move_time < 15)
//Moving around with fractured ribs won't do you any good
if(E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15))
var/obj/item/organ/internal/I = pick(E.internal_organs)
custom_pain("You feel broken bones moving in your [E.name]!", 1)
I.take_damage(rand(3,5))
//handle_stance()
handle_grasp()
handle_stance()
if(!force_process && !bad_external_organs.len)
return
for(var/obj/item/organ/external/E in bad_external_organs)
if(!E)
continue
if(!E.need_process())
bad_external_organs -= E
continue
else
E.process()
number_wounds += E.number_wounds
if(!lying && world.time - l_move_time < 15)
//Moving around with fractured ribs won't do you any good
if(E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15))
var/obj/item/organ/internal/I = pick(E.internal_organs)
custom_pain("You feel broken bones moving in your [E.name]!", 1)
I.take_damage(rand(3,5))
//Moving makes open wounds get infected much faster
if(E.wounds.len)
for(var/datum/wound/W in E.wounds)
if(W.infection_check())
W.germ_level += 1
/mob/living/carbon/human/proc/handle_stance()
// Don't need to process any of this if they aren't standing anyways
@@ -71,7 +43,7 @@
for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot"))
var/obj/item/organ/external/E = bodyparts_by_name[limb_tag]
if(!E || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD)) || E.is_malfunctioning())
if(!E || (E.status & ORGAN_DEAD) || E.is_malfunctioning())
stance_damage += 2 // let it fail even if just foot&leg. Also malfunctioning happens sporadically so it should impact more when it procs
else if(E.is_broken() || !E.is_usable())
stance_damage += 1
@@ -90,7 +62,7 @@
// standing is poor
if(stance_damage >= 8)
if(!(lying || resting))
if(species && !(species.flags & NO_PAIN))
if(!(NO_PAIN in species.species_traits))
emote("scream")
custom_emote(1, "collapses!")
Weaken(5) //can't emote while weakened, apparently.
@@ -118,7 +90,7 @@
continue
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
custom_emote(1, "[(species.flags & NO_PAIN) ? "" : emote_scream ]drops what they were holding in their [E.name]!")
custom_emote(1, "[(NO_PAIN in species.species_traits) ? "" : emote_scream ]drops what they were holding in their [E.name]!")
else if(E.is_malfunctioning())
@@ -420,9 +420,9 @@
return
doing |= SNPC_SPECIAL
var/static/list/customableTypes = list(/obj/item/weapon/reagent_containers/food/snacks/customizable,/obj/item/weapon/reagent_containers/food/snacks/breadslice,/obj/item/weapon/reagent_containers/food/snacks/bun,/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough,/obj/item/weapon/reagent_containers/food/snacks/boiledspagetti,/obj/item/trash/plate,/obj/item/trash/bowl)
var/static/list/customableTypes = list(/obj/item/weapon/reagent_containers/food/snacks/customizable,/obj/item/weapon/reagent_containers/food/snacks/breadslice,/obj/item/weapon/reagent_containers/food/snacks/bun,/obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough,/obj/item/weapon/reagent_containers/food/snacks/boiledspaghetti,/obj/item/trash/plate,/obj/item/trash/bowl)
var/static/list/rawtypes = list(/obj/item/weapon/reagent_containers/food/snacks/grown, /obj/item/weapon/reagent_containers/food/snacks/rawcutlet, /obj/item/weapon/reagent_containers/food/snacks/rawsticks, /obj/item/weapon/reagent_containers/food/snacks/salmonmeat, /obj/item/weapon/reagent_containers/food/snacks/carpmeat, /obj/item/weapon/reagent_containers/food/snacks/catfishmeat, /obj/item/weapon/reagent_containers/food/snacks/spagetti, /obj/item/weapon/reagent_containers/food/snacks/dough, /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough, /obj/item/weapon/reagent_containers/food/snacks/doughslice, /obj/item/weapon/reagent_containers/food/snacks/meat, /obj/item/weapon/reagent_containers/food/snacks/boiledrice, /obj/item/weapon/reagent_containers/food/snacks/cheesewedge, /obj/item/weapon/reagent_containers/food/snacks/raw_bacon)
var/static/list/rawtypes = list(/obj/item/weapon/reagent_containers/food/snacks/grown, /obj/item/weapon/reagent_containers/food/snacks/rawcutlet, /obj/item/weapon/reagent_containers/food/snacks/rawsticks, /obj/item/weapon/reagent_containers/food/snacks/salmonmeat, /obj/item/weapon/reagent_containers/food/snacks/carpmeat, /obj/item/weapon/reagent_containers/food/snacks/catfishmeat, /obj/item/weapon/reagent_containers/food/snacks/spaghetti, /obj/item/weapon/reagent_containers/food/snacks/dough, /obj/item/weapon/reagent_containers/food/snacks/sliceable/flatdough, /obj/item/weapon/reagent_containers/food/snacks/doughslice, /obj/item/weapon/reagent_containers/food/snacks/meat, /obj/item/weapon/reagent_containers/food/snacks/boiledrice, /obj/item/weapon/reagent_containers/food/snacks/cheesewedge, /obj/item/weapon/reagent_containers/food/snacks/raw_bacon)
try
var/list/allContents = getAllContents()
@@ -638,7 +638,7 @@
if(canmove)
if((graytide || (TRAITS & TRAIT_MEAN)) || retal)
interest += targetInterestShift
a_intent = "harm"
a_intent = INTENT_HARM
zone_sel.selecting = pick("chest","r_leg","l_leg","r_arm","l_arm","head")
doing |= SNPC_FIGHTING
if(retal)
@@ -746,7 +746,7 @@
tryWalk(TARGET)
else
if(Adjacent(TARGET))
a_intent = pick("disarm", "harm")
a_intent = pick(INTENT_DISARM, INTENT_HARM)
M.attack_hand(src)
timeout++
else if(timeout >= 10 || !(targetRange(M) > 14))
@@ -72,6 +72,8 @@
var/forceProcess = 0
var/processTime = 10
var/speak_file = "npc_chatter.json"
var/debugexamine = FALSE //If we show debug info in our examine
var/showexaminetext = TRUE //If we show our telltale examine text
var/list/knownStrings = list()
@@ -270,20 +272,20 @@
if(prob((SNPC_FUZZY_CHANCE_LOW+SNPC_FUZZY_CHANCE_HIGH)/4))
var/obj/item/organ/external/R = bodyparts_by_name["r_arm"]
if(R)
R.robotize()
R.robotize(make_tough = 1)
else
var/obj/item/organ/external/L = bodyparts_by_name["l_arm"]
if(L)
L.robotize()
L.robotize(make_tough = 1)
//legs
if(prob((SNPC_FUZZY_CHANCE_LOW+SNPC_FUZZY_CHANCE_HIGH)/4))
var/obj/item/organ/external/R = bodyparts_by_name["r_leg"]
if(R)
R.robotize()
R.robotize(make_tough = 1)
else
var/obj/item/organ/external/L = bodyparts_by_name["l_leg"]
if(L)
L.robotize()
L.robotize(make_tough = 1)
UpdateDamageIcon()
regenerate_icons()
@@ -431,7 +433,7 @@
var/mob/living/M = target
if(istype(M))
if(health > 0)
if(M.a_intent == "help" && !incapacitated())
if(M.a_intent == INTENT_HELP && !incapacitated())
chatter()
if(istype(target, /mob/living/carbon) && !retal && prob(SNPC_FUZZY_CHANCE_LOW))
var/mob/living/carbon/C = target
@@ -439,7 +441,7 @@
tryWalk(target)
else
C.help_shake_act(src)
if(M.a_intent == "harm")
if(M.a_intent == INTENT_HARM)
retal = 1
retal_target = target
@@ -658,7 +660,7 @@
if(grabbed_by.len > 0)
for(var/obj/item/weapon/grab/G in grabbed_by)
if(Adjacent(G))
a_intent = "disarm"
a_intent = INTENT_DISARM
G.assailant.attack_hand(src)
inactivity_period = 10
@@ -24,8 +24,7 @@
/mob/living/carbon/human/proc/has_organ(name)
var/obj/item/organ/external/O = bodyparts_by_name[name]
return (O && !(O.status & ORGAN_DESTROYED) && !O.is_stump())
return O
/mob/living/carbon/human/proc/has_organ_for_slot(slot)
switch(slot)
@@ -151,7 +150,7 @@
update_hair() //rebuild hair
update_fhair()
update_head_accessory()
if(internal)
if(internal && !get_organ_slot("breathing_tube"))
internal = null
update_internals_hud_icon(0)
wear_mask_update(I, toggle_off = FALSE)
+101 -177
View File
@@ -1,29 +1,10 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
/mob/living/carbon/human
var/pressure_alert = 0
var/prev_gender = null // Debug for plural genders
var/temperature_alert = 0
var/in_stasis = 0
var/exposedtimenow = 0
var/firstexposed = 0
var/heartbeat = 0
/mob/living/carbon/human/Life()
fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it.
life_tick++
in_stasis = 0
if(istype(loc, /obj/structure/closet/body_bag/cryobag))
var/obj/structure/closet/body_bag/cryobag/loc_as_cryobag = loc
if(!loc_as_cryobag.opened)
loc_as_cryobag.used++
in_stasis = 1
voice = GetVoice()
if(..() && !in_stasis)
if(..())
if(check_mutations)
domutcheck(src,null)
@@ -40,11 +21,13 @@
if(!client)
species.handle_npc(src)
if(stat != DEAD)
//Stuff jammed in your limbs hurts
handle_embedded_objects()
if(stat == DEAD)
handle_decay()
handle_stasis_bag()
if(life_tick > 5 && timeofdeath && (timeofdeath < 5 || world.time - timeofdeath > 6000)) //We are long dead, or we're junk mobs spawned like the clowns on the clown shuttle
return //We go ahead and process them 5 times for HUD images and other stuff though.
@@ -154,16 +137,6 @@
visible_message("<span class='alert'><B>[src]</B> goes limp, their facial expression utterly blank.</span>")
death()
/mob/living/carbon/human/proc/handle_stasis_bag()
// Handle side effects from stasis bag
if(in_stasis)
// First off, there's no oxygen supply, so the mob will slowly take brain damage
adjustBrainLoss(0.1)
// Next, the method to induce stasis has some adverse side-effects, manifesting
// as cloneloss
adjustCloneLoss(0.1)
/mob/living/carbon/human/handle_mutations_and_radiation()
for(var/datum/dna/gene/gene in dna_genes)
if(!gene.block)
@@ -189,79 +162,68 @@
if(gene_stability < GENETIC_DAMAGE_STAGE_3)
gib()
if(!(species.flags & RADIMMUNE))
if(!(RADIMMUNE in species.species_traits))
if(radiation)
radiation = Clamp(radiation, 0, 200)
if(get_int_organ(/obj/item/organ/internal/nucleation/resonant_crystal))
var/rads = radiation/25
radiation -= rads
radiation -= 0.1
reagents.add_reagent("radium", rads/10)
if( prob(10) )
to_chat(src, "<span class='notice'>You feel relaxed.</span>")
return
if(radiation > 100)
radiation = 100
Weaken(10)
if(!lying)
to_chat(src, "<span class='alert'>You feel weak.</span>")
emote("collapse")
if(radiation < 0)
radiation = 0
else
var/damage = 0
switch(radiation)
if(0 to 49)
radiation--
if(prob(25))
adjustToxLoss(1)
damage = 1
updatehealth()
if(50 to 74)
radiation -= 2
damage = 1
var/autopsy_damage = 0
switch(radiation)
if(1 to 49)
radiation = max(radiation-1, 0)
if(prob(25))
adjustToxLoss(1)
if(prob(5))
radiation -= 5
Weaken(3)
if(!lying)
to_chat(src, "<span class='alert'>You feel weak.</span>")
emote("collapse")
updatehealth()
adjustFireLoss(1)
autopsy_damage = 2
if(75 to 100)
radiation -= 3
adjustToxLoss(3)
damage = 3
if(prob(1))
to_chat(src, "<span class='alert'>You mutate!</span>")
randmutb(src)
domutcheck(src,null)
emote("gasp")
updatehealth()
if(50 to 74)
radiation = max(radiation-2, 0)
adjustToxLoss(1)
adjustFireLoss(1)
autopsy_damage = 2
if(prob(5))
radiation = max(radiation-5, 0)
Weaken(3)
to_chat(src, "<span class='danger'>You feel weak.</span>")
emote("collapse")
else
radiation -= 5
adjustToxLoss(5)
damage = 5
if(prob(1))
to_chat(src, "<span class='alert'>You mutate!</span>")
randmutb(src)
domutcheck(src,null)
emote("gasp")
updatehealth()
if(75 to 100)
radiation = max(radiation-2, 0)
adjustToxLoss(2)
adjustFireLoss(2)
autopsy_damage = 4
if(prob(2))
to_chat(src, "<span class='danger'>You mutate!</span>")
randmutb(src)
domutcheck(src, null)
if(damage && bodyparts.len)
var/obj/item/organ/external/O = pick(bodyparts)
if(istype(O)) O.add_autopsy_data("Radiation Poisoning", damage)
if(101 to 150)
radiation = max(radiation-3, 0)
adjustToxLoss(2)
adjustFireLoss(3)
autopsy_damage = 5
if(prob(4))
to_chat(src, "<span class='danger'>You mutate!</span>")
randmutb(src)
domutcheck(src, null)
if(151 to INFINITY)
radiation = max(radiation-3, 0)
adjustToxLoss(2)
adjustFireLoss(3)
autopsy_damage = 5
if(prob(6))
to_chat(src, "<span class='danger'>You mutate!</span>")
randmutb(src)
domutcheck(src, null)
if(autopsy_damage)
var/obj/item/organ/external/chest/chest = get_organ("chest")
if(chest)
chest.add_autopsy_data("Radiation Poisoning", autopsy_damage)
/mob/living/carbon/human/breathe()
if((NO_BREATH in mutations) || (species && (species.flags & NO_BREATHE)) || reagents.has_reagent("lexorin"))
if((NO_BREATH in mutations) || (NO_BREATHE in species.species_traits) || reagents.has_reagent("lexorin"))
adjustOxyLoss(-5)
oxygen_alert = 0
toxins_alert = 0
@@ -281,7 +243,7 @@
if(losebreath > 0)
AdjustLoseBreath(-1)
if(prob(10))
spawn emote("gasp")
emote("gasp")
if(istype(loc, /obj/))
var/obj/loc_as_obj = loc
loc_as_obj.handle_internal_lifeform(src, 0)
@@ -327,9 +289,10 @@
var/null_internals = 0 //internals are invalid, therefore turn them off
var/skip_contents_check = 0 //rigsuit snowflake, oxygen tanks aren't stored inside the mob, so the 'contents.Find' check has to be skipped.
if(!(wear_mask && wear_mask.flags & AIRTIGHT)) //if NOT (wear_mask AND wear_mask.flags CONTAIN AIRTIGHT)
if(!(head && head.flags & AIRTIGHT)) //if NOT (head AND head.flags CONTAIN AIRTIGHT)
null_internals = 1 //not wearing a mask or suitable helmet
if(!get_organ_slot("breathing_tube"))
if(!(wear_mask && wear_mask.flags & AIRTIGHT)) //if NOT (wear_mask AND wear_mask.flags CONTAIN AIRTIGHT)
if(!(head && head.flags & AIRTIGHT)) //if NOT (head AND head.flags CONTAIN AIRTIGHT)
null_internals = 1 //not wearing a mask or suitable helmet
if(istype(back, /obj/item/weapon/rig)) //wearing a rigsuit
var/obj/item/weapon/rig/rig = back //needs to be typecasted because this doesn't use get_rig() for some reason
@@ -664,7 +627,7 @@
return 0 //godmode
//The fucking FAT mutation is the greatest shit ever. It makes everyone so hot and bothered.
if(species.flags & CAN_BE_FAT)
if(CAN_BE_FAT in species.species_traits)
if(FAT in mutations)
if(overeatduration < 100)
becomeSlim()
@@ -728,7 +691,8 @@
AdjustDizzy(-3)
AdjustJitter(-3)
if(species && species.flags & NO_INTORGANS) return
if(NO_INTORGANS in species.species_traits)
return
handle_trace_chems()
@@ -839,13 +803,6 @@
blinded = 1
stat = UNCONSCIOUS
if(embedded_flag && !(mob_master.current_cycle % 10))
var/list/E
E = get_visible_implants(0)
if(!E.len)
embedded_flag = 0
//Vision //god knows why this is here
var/obj/item/organ/vision
if(species.vision_organ)
@@ -904,9 +861,7 @@
if(gloves && germ_level > gloves.germ_level && prob(10))
gloves.germ_level += 1
if(!in_stasis)
handle_organs()
handle_blood()
handle_organs()
else //dead
@@ -958,6 +913,22 @@
adjustToxLoss(-3)
lastpuke = 0
/mob/living/carbon/human/proc/handle_embedded_objects()
for(var/X in bodyparts)
var/obj/item/organ/external/BP = X
for(var/obj/item/I in BP.embedded_objects)
if(prob(I.embedded_pain_chance))
BP.take_damage(I.w_class*I.embedded_pain_multiplier)
to_chat(src, "<span class='userdanger'>[I] embedded in your [BP.name] hurts!</span>")
if(prob(I.embedded_fall_chance))
BP.take_damage(I.w_class*I.embedded_fall_pain_multiplier)
BP.embedded_objects -= I
I.forceMove(get_turf(src))
visible_message("<span class='danger'>[I] falls out of [name]'s [BP.name]!</span>","<span class='userdanger'>[I] falls out of your [BP.name]!</span>")
if(!has_embedded_objects())
clear_alert("embeddedobject")
/mob/living/carbon/human/handle_changeling()
if(mind)
if(mind.changeling)
@@ -969,64 +940,13 @@
if(hud_used)
hud_used.lingchemdisplay.invisibility = 101
/mob/living/carbon/human/handle_shock()
..()
if(status_flags & GODMODE)
return 0 //godmode
if(species && species.flags & NO_PAIN)
return
if(health <= config.health_threshold_softcrit)// health 0 makes you immediately collapse
shock_stage = max(shock_stage, 61)
if(traumatic_shock >= 100)
shock_stage += 1
else
shock_stage = min(shock_stage, 160)
shock_stage = max(shock_stage-1, 0)
return
if(shock_stage == 10)
to_chat(src, "<font color='red'><b>"+pick("It hurts so much!", "You really need some painkillers..", "Dear god, the pain!"))
if(shock_stage >= 30)
if(shock_stage == 30) custom_emote(1,"is having trouble keeping their eyes open.")
EyeBlurry(2)
Stuttering(5)
if(shock_stage == 40)
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
if(shock_stage >=60)
if(shock_stage == 60) custom_emote(1,"falls limp.")
if(prob(2))
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
Weaken(20)
if(shock_stage >= 80)
if(prob(5))
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
Weaken(20)
if(shock_stage >= 120)
if(prob(2))
to_chat(src, "<font color='red'><b>"+pick("You black out!", "You feel like you could die any moment now.", "You're about to lose consciousness."))
Paralyse(5)
if(shock_stage == 150)
custom_emote(1,"can no longer stand, collapsing!")
Weaken(20)
if(shock_stage >= 150)
Weaken(20)
/mob/living/carbon/human/proc/handle_pulse()
if(mob_master.current_cycle % 5)
return pulse //update pulse every 5 life ticks (~1 tick/sec, depending on server load)
if(species && species.flags & NO_BLOOD)
if(NO_BLOOD in species.species_traits)
return PULSE_NONE //No blood, no pulse.
if(stat == DEAD)
@@ -1037,8 +957,7 @@
var/temp = PULSE_NORM
var/blood_type = get_blood_name()
if(round(vessel.get_reagent_amount(blood_type)) <= BLOOD_VOLUME_BAD) //how much blood do we have
if(blood_volume <= BLOOD_VOLUME_BAD)//how much blood do we have
temp = PULSE_THREADY //not enough :(
if(status_flags & FAKEDEATH)
@@ -1089,20 +1008,20 @@
makeSkeleton()
return //No puking over skeletons, they don't smell at all!
if(!isturf(loc))
return
for(var/mob/living/carbon/human/H in range(decaylevel, src))
if(prob(2))
if(istype(loc,/obj/item/bodybag))
return
var/obj/item/clothing/mask/M = H.wear_mask
if(M && (M.flags_cover & MASKCOVERSMOUTH))
return
if(H.species && H.species.flags & NO_BREATHE)
if(NO_BREATHE in species.species_traits)
return //no puking if you can't smell!
// Humans can lack a mind datum, y'know
if(H.mind && H.mind.assigned_role == "Detective")
if(H.mind && (H.mind.assigned_role == "Detective" || H.mind.assigned_role == "Coroner"))
return //too cool for puke
to_chat(H, "<spawn class='warning'>You smell something foul...")
to_chat(H, "<span class='warning'>You smell something foul...</span>")
H.fakevomit()
/mob/living/carbon/human/proc/handle_heartbeat()
@@ -1122,7 +1041,7 @@
if(heartbeat >= rate)
heartbeat = 0
src << sound('sound/effects/electheart.ogg',0,0,0,30)//Credit to GhostHack (www.ghosthack.de) for sound.
src << sound('sound/effects/electheart.ogg',0,0,CHANNEL_HEARTBEAT,30)//Credit to GhostHack (www.ghosthack.de) for sound.
else
heartbeat++
@@ -1141,9 +1060,9 @@
if(heartbeat >= rate)
heartbeat = 0
if(H.status & ORGAN_ASSISTED)
src << sound('sound/effects/pacemakebeat.ogg',0,0,0,50)
src << sound('sound/effects/pacemakebeat.ogg',0,0,CHANNEL_HEARTBEAT,50)
else
src << sound('sound/effects/singlebeat.ogg',0,0,0,50)
src << sound('sound/effects/singlebeat.ogg',0,0,CHANNEL_HEARTBEAT,50)
else
heartbeat++
@@ -1177,7 +1096,9 @@
/mob/living/carbon/human/proc/can_heartattack()
if(species.flags & (NO_BLOOD|NO_INTORGANS))
if(NO_BLOOD in species.species_traits)
return FALSE
if(NO_INTORGANS in species.species_traits)
return FALSE
return TRUE
@@ -1185,8 +1106,11 @@
if(!can_heartattack())
return FALSE
var/obj/item/organ/internal/heart/heart = get_int_organ(/obj/item/organ/internal/heart)
if(istype(heart) && heart.beating)
return FALSE
if(istype(heart))
if(heart.status & ORGAN_DEAD)
return TRUE
if(heart.beating)
return FALSE
return TRUE
/mob/living/carbon/human/proc/set_heartattack(status)
@@ -0,0 +1,75 @@
/mob/living/carbon/human/var/traumatic_shock = 0
/mob/living/carbon/human/var/shock_stage = 0
// proc to find out in how much pain the mob is at the moment
/mob/living/carbon/human/proc/updateshock()
traumatic_shock = getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss()
// broken or ripped off organs will add quite a bit of pain
for(var/thing in bodyparts)
var/obj/item/organ/external/BP = thing
if(BP.status & ORGAN_BROKEN && !(BP.status & ORGAN_SPLINTED) || BP.open)
traumatic_shock += 15
if(reagents)
for(var/datum/reagent/R in reagents.reagent_list)
if(R.shock_reduction)
traumatic_shock = max(0, traumatic_shock - R.shock_reduction) // now you too can varedit cyanide to reduce shock by 1000 - Iamgoofball
if(drunk)
traumatic_shock = max(0, traumatic_shock - 10)
return traumatic_shock
/mob/living/carbon/human/proc/handle_shock()
if(status_flags & GODMODE) //godmode
return
if(NO_PAIN in species.species_traits)
return
updateshock()
if(health <= config.health_threshold_softcrit)// health 0 makes you immediately collapse
shock_stage = max(shock_stage, 61)
if(traumatic_shock >= 100)
shock_stage += 1
else
shock_stage = min(shock_stage, 160)
shock_stage = max(shock_stage-1, 0)
return
if(shock_stage == 10)
to_chat(src, "<font color='red'><b>"+pick("It hurts so much!", "You really need some painkillers..", "Dear god, the pain!"))
if(shock_stage >= 30)
if(shock_stage == 30)
custom_emote(1,"is having trouble keeping their eyes open.")
EyeBlurry(2)
Stuttering(5)
if(shock_stage == 40)
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
if(shock_stage >=60)
if(shock_stage == 60)
custom_emote(1,"falls limp.")
if(prob(2))
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
Weaken(20)
if(shock_stage >= 80)
if(prob(5))
to_chat(src, "<font color='red'><b>"+pick("The pain is excrutiating!", "Please, just end the pain!", "Your whole body is going numb!"))
Weaken(20)
if(shock_stage >= 120)
if(prob(2))
to_chat(src, "<font color='red'><b>"+pick("You black out!", "You feel like you could die any moment now.", "You're about to lose consciousness."))
Paralyse(5)
if(shock_stage == 150)
custom_emote(1,"can no longer stand, collapsing!")
Weaken(20)
if(shock_stage >= 150)
Weaken(20)
@@ -18,11 +18,10 @@
"eyes" = /obj/item/organ/internal/eyes/abductor //3 darksight.
)
flags = HAS_LIPS | NO_BLOOD | NO_BREATHE | NOGUNS
species_traits = list(NO_BLOOD, NO_BREATHE, VIRUSIMMUNE, NOGUNS)
oxy_mod = 0
virus_immune = 1
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
@@ -36,7 +36,7 @@
"antennae" = /obj/item/organ/internal/wryn/hivenode
)
flags = IS_WHITELISTED | HAS_LIPS | NO_BREATHE | HAS_SKIN_COLOR | NO_SCAN | HIVEMIND
species_traits = list(IS_WHITELISTED, NO_BREATHE, HAS_SKIN_COLOR, NO_SCAN, HIVEMIND)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
dietflags = DIET_HERB //bees feed off nectar, so bee people feed off plants too
@@ -58,7 +58,7 @@
/datum/species/wryn/handle_attack_hand(var/mob/living/carbon/human/H, var/mob/living/carbon/human/M)
var/obj/item/organ/external/head/head_organ = H.get_organ("head")
if(M.a_intent == I_HARM)
if(M.a_intent == INTENT_HARM)
if(H.handcuffed)
if(!H.get_int_organ(/obj/item/organ/internal/wryn/hivenode)) return
var/turf/p_loc = M.loc
@@ -99,7 +99,7 @@
burn_mod = 4 // holy shite, poor guys wont survive half a second cooking smores
brute_mod = 2 // damn, double wham, double dam
oxy_mod = 0
flags = IS_WHITELISTED | NO_BREATHE | NO_BLOOD | NO_PAIN | HAS_LIPS | NO_SCAN
species_traits = list(LIPS, IS_WHITELISTED, NO_BREATHE, NO_BLOOD, NO_PAIN, NO_SCAN, RADIMMUNE)
dietflags = DIET_OMNI //still human at their core, so they maintain their eating habits and diet
//Default styles for created mobs.
@@ -110,8 +110,7 @@
"heart" = /obj/item/organ/internal/heart,
"crystallized brain" = /obj/item/organ/internal/brain/crystal,
"eyes" = /obj/item/organ/internal/eyes/luminescent_crystal, //Standard darksight of 2.
"strange crystal" = /obj/item/organ/internal/nucleation/strange_crystal,
"resonant crystal" = /obj/item/organ/internal/nucleation/resonant_crystal
"strange crystal" = /obj/item/organ/internal/nucleation/strange_crystal
)
vision_organ = /obj/item/organ/internal/eyes/luminescent_crystal
@@ -6,11 +6,10 @@
deform = 'icons/mob/human_races/r_golem.dmi'
default_language = "Galactic Common"
flags = NO_BREATHE | NO_BLOOD | RADIMMUNE | NOGUNS
species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE, NOGUNS)
oxy_mod = 0
virus_immune = 1
dietflags = DIET_OMNI //golems can eat anything because they are magic or something
reagent_tag = PROCESS_ORG
@@ -24,7 +24,7 @@
female_scream_sound = 'sound/goonstation/voice/monkey_scream.ogg'
tail = "chimptail"
bodyflags = FEET_PADDED | HAS_TAIL
bodyflags = HAS_TAIL
reagent_tag = PROCESS_ORG
//Has standard darksight of 2.
@@ -155,9 +155,6 @@
reagent_tag = PROCESS_ORG
tail = null
bodyflags = FEET_PADDED
/datum/species/monkey/unathi
name = "Stok"
name_plural = "Stok"
@@ -172,4 +169,4 @@
base_color = "#000000"
reagent_tag = PROCESS_ORG
bodyflags = FEET_CLAWS | HAS_TAIL
bodyflags = HAS_TAIL
@@ -6,7 +6,7 @@
//language = "Clatter"
unarmed_type = /datum/unarmed_attack/punch
flags = IS_WHITELISTED | NO_BLOOD | NOTRANSSTING
species_traits = list(IS_WHITELISTED, NO_BLOOD, NOTRANSSTING)
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
@@ -49,9 +49,12 @@
var/tank_slot_name = "suit storage"
switch(assigned_role)
if("Scientist","Geneticist","Roboticist")
if("Scientist","Roboticist")
suit=/obj/item/clothing/suit/space/eva/plasmaman/science
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/science
if("Geneticist")
suit=/obj/item/clothing/suit/space/eva/plasmaman/science/geneticist
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/science/geneticist
if("Research Director")
suit=/obj/item/clothing/suit/space/eva/plasmaman/science/rd
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/science/rd
@@ -90,7 +93,7 @@
if("Nanotrasen Representative")
suit = /obj/item/clothing/suit/space/eva/plasmaman/nt_rep
helm = /obj/item/clothing/head/helmet/space/eva/plasmaman/nt_rep
if("Medical Doctor","Brig Physician")
if("Medical Doctor","Brig Physician","Virologist")
suit=/obj/item/clothing/suit/space/eva/plasmaman/medical
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/medical
H.equip_or_collect(new /obj/item/device/flashlight/pen(H), slot_in_backpack)
@@ -103,6 +106,12 @@
if("Chief Medical Officer")
suit=/obj/item/clothing/suit/space/eva/plasmaman/medical/cmo
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/medical/cmo
if("Coroner")
suit=/obj/item/clothing/suit/space/eva/plasmaman/medical/coroner
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/medical/coroner
if("Virologist")
suit=/obj/item/clothing/suit/space/eva/plasmaman/medical/virologist
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/medical/virologist
if("Bartender", "Chef")
suit=/obj/item/clothing/suit/space/eva/plasmaman/service
helm=/obj/item/clothing/head/helmet/space/eva/plasmaman/service
@@ -157,8 +166,7 @@
if(Toxins_pp < safe_plasma_min)
if(prob(20))
spawn(0)
H.emote("gasp")
H.emote("gasp")
if(Toxins_pp > 0)
var/ratio = safe_plasma_min/Toxins_pp
H.adjustOxyLoss(min(5*ratio, HUMAN_MAX_OXYLOSS)) // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!)
@@ -189,8 +197,7 @@
if(world.time - H.co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
H.adjustOxyLoss(8)
if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
spawn(0)
H.emote("cough")
H.emote("cough")
else
H.co2overloadtime = 0
@@ -204,8 +211,7 @@
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
else if(SA_pp > 0.15) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0)
H.emote(pick("giggle", "laugh"))
H.emote(pick("giggle", "laugh"))
SA.moles = 0
if(abs(310.15 - breath.temperature) > 50) // Hot air hurts :(
@@ -17,12 +17,10 @@
"eyes" = /obj/item/organ/internal/eyes/shadow //8 darksight.
)
flags = NO_BLOOD | NO_BREATHE | RADIMMUNE
species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE)
oxy_mod = 0
virus_immune = 1
dietflags = DIET_OMNI //the mutation process allowed you to now digest all foods regardless of initial race
reagent_tag = PROCESS_ORG
suicide_messages = list(
@@ -13,11 +13,10 @@
blood_color = "#FFFFFF"
flesh_color = "#E6E6C6"
flags = NO_BREATHE | NO_BLOOD | RADIMMUNE
species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE)
oxy_mod = 0
virus_immune = 1 //why is this a var and not a flag?
dietflags = DIET_OMNI
reagent_tag = PROCESS_ORG
@@ -45,6 +45,7 @@
var/reagent_tag //Used for metabolizing reagents.
var/hunger_drain = HUNGER_FACTOR
var/digestion_ratio = 1 //How quickly the species digests/absorbs reagents.
var/taste_sensitivity = TASTE_SENSITIVITY_NORMAL //the most widely used factor; humans use a different one
var/siemens_coeff = 1 //base electrocution coefficient
@@ -76,6 +77,8 @@
var/brain_mod = 1 // Brain damage damage reduction/amplification
var/stun_mod = 1 // If a species is more/less impacated by stuns/weakens/paralysis
var/blood_damage_type = OXY //What type of damage does this species take if it's low on blood?
var/total_health = 100
var/punchdamagelow = 0 //lowest possible punch damage
var/punchdamagehigh = 9 //highest possible punch damage
@@ -89,7 +92,8 @@
var/list/allowed_consumed_mobs = list() //If a species can consume mobs, put the type of mobs it can consume here.
var/flags = 0 // Various specific features.
var/list/species_traits = list()
var/clothing_flags = 0 // Underwear and socks.
var/exotic_blood
var/bodyflags = 0
@@ -108,7 +112,6 @@
var/icon/icon_template
var/is_small
var/show_ssd = 1
var/virus_immune
var/can_revive_by_healing // Determines whether or not this species can be revived by simply healing them
var/has_gender = TRUE
@@ -227,8 +230,7 @@
if(O2_pp < atmos_requirements["min_oxy"])
if(prob(20))
spawn(0)
H.emote("gasp")
H.emote("gasp")
H.failed_last_breath = 1
if(O2_pp > 0)
@@ -250,8 +252,7 @@
if(N2_pp < atmos_requirements["min_nitro"])
if(prob(20))
spawn(0)
H.emote("gasp")
H.emote("gasp")
H.failed_last_breath = 1
if(N2_pp > 0)
@@ -273,8 +274,7 @@
if(Tox_pp < atmos_requirements["min_tox"])
if(prob(20))
spawn(0)
H.emote("gasp")
H.emote("gasp")
H.failed_last_breath = 1
if(Tox_pp > 0)
@@ -297,8 +297,7 @@
if(CO2_pp < atmos_requirements["min_co2"])
if(prob(20))
spawn(0)
H.emote("gasp")
H.emote("gasp")
H.failed_last_breath = 1
if(CO2_pp)
@@ -316,8 +315,7 @@
if(world.time - H.co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good!
H.adjustOxyLoss(8)
if(prob(20)) // Lets give them some chance to know somethings not right though I guess.
spawn(0)
H.emote("cough")
H.emote("cough")
else
H.clear_alert("co2")
H.co2overloadtime = 0
@@ -343,8 +341,7 @@
H.AdjustSleeping(8, bound_lower = 0, bound_upper = 10)
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
if(prob(20))
spawn(0)
H.emote(pick("giggle", "laugh"))
H.emote(pick("giggle", "laugh"))
handle_temperature(breath, H)
return 1
@@ -399,9 +396,6 @@
if(has_gravity(H))
gravity = 1
if(H.embedded_flag)
H.handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
if(!ignoreslow && gravity)
if(slowdown)
. = slowdown
@@ -473,7 +467,11 @@
// Return 1 if it should do normal processing too
// Return 0 if it shouldn't deplete and do its normal effect
// Other return values will cause weird badness
/datum/species/proc/handle_reagents(var/mob/living/carbon/human/H, var/datum/reagent/R)
/datum/species/proc/handle_reagents(mob/living/carbon/human/H, datum/reagent/R)
if(R.id == exotic_blood)
H.blood_volume = min(H.blood_volume + round(R.volume, 0.1), BLOOD_VOLUME_NORMAL)
H.reagents.del_reagent(R.id)
return 0
return 1
// For special snowflake species effects
@@ -519,7 +517,6 @@
var/attack_sound = "punch"
var/miss_sound = 'sound/weapons/punchmiss.ogg'
var/sharp = 0
var/edge = 0
/datum/unarmed_attack/punch
attack_verb = list("punch")
@@ -535,7 +532,6 @@
attack_sound = 'sound/weapons/slice.ogg'
miss_sound = 'sound/weapons/slashmiss.ogg'
sharp = 1
edge = 1
/datum/unarmed_attack/claws/armalis
attack_verb = list("slash", "claw")
@@ -590,7 +586,7 @@
if(SCREWYHUD_DEAD) H.healths.icon_state = "health7"
if(SCREWYHUD_HEALTHY) H.healths.icon_state = "health0"
else
switch(100 - ((flags & NO_PAIN) ? 0 : H.traumatic_shock) - H.staminaloss)
switch(100 - ((NO_PAIN in species_traits) ? 0 : H.traumatic_shock) - H.staminaloss)
if(100 to INFINITY) H.healths.icon_state = "health0"
if(80 to 100) H.healths.icon_state = "health1"
if(60 to 80) H.healths.icon_state = "health2"
@@ -743,3 +739,9 @@ It'll return null if the organ doesn't correspond, so include null checks when u
if(H.see_override) //Override all
H.see_invisible = H.see_override
/datum/species/proc/water_act(mob/living/carbon/human/M, volume, temperature, source)
if(temperature >= 330)
M.bodytemperature = M.bodytemperature + (temperature - M.bodytemperature)
if(temperature <= 280)
M.bodytemperature = M.bodytemperature - (M.bodytemperature - temperature)
@@ -6,7 +6,7 @@
primitive_form = "Monkey"
path = /mob/living/carbon/human/human
language = "Sol Common"
flags = HAS_LIPS | CAN_BE_FAT
species_traits = list(LIPS, CAN_BE_FAT)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_SKIN_TONE | HAS_BODY_MARKINGS
dietflags = DIET_OMNI
@@ -38,9 +38,9 @@
else, frequently even their own lives. They prefer warmer temperatures than most species and \
their native tongue is a heavy hissing laungage called Sinta'Unathi."
flags = HAS_LIPS
species_traits = list(LIPS)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_CLAWS | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_BODY_MARKINGS | HAS_HEAD_MARKINGS | HAS_SKIN_COLOR | HAS_ALT_HEADS | TAIL_WAGGING
bodyflags = HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_BODY_MARKINGS | HAS_HEAD_MARKINGS | HAS_SKIN_COLOR | HAS_ALT_HEADS | TAIL_WAGGING
dietflags = DIET_CARN
cold_level_1 = 280 //Default 260 - Lower is better
@@ -110,10 +110,11 @@
primitive_form = "Farwa"
flags = HAS_LIPS | CAN_BE_FAT
species_traits = list(LIPS, CAN_BE_FAT)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_PADDED | HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING | HAS_FUR
bodyflags = HAS_TAIL | HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS | HAS_SKIN_COLOR | TAIL_WAGGING
dietflags = DIET_OMNI
taste_sensitivity = TASTE_SENSITIVITY_SHARP
reagent_tag = PROCESS_ORG
flesh_color = "#AFA59E"
base_color = "#424242"
@@ -160,15 +161,18 @@
to the degree it can cause conflict with more rigorous and strict authorities. They speak a guttural language known as 'Canilunzt' \
which has a heavy emphasis on utilizing tail positioning and ear twitches to communicate intent."
flags = HAS_LIPS
species_traits = list(LIPS)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_PADDED | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR | HAS_FUR
bodyflags = HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_HEAD_ACCESSORY | HAS_MARKINGS | HAS_SKIN_COLOR
dietflags = DIET_OMNI
taste_sensitivity = TASTE_SENSITIVITY_SHARP
reagent_tag = PROCESS_ORG
flesh_color = "#966464"
base_color = "#CF4D2F"
butt_sprite = "vulp"
scream_verb = "yelps"
has_organ = list(
"heart" = /obj/item/organ/internal/heart,
"lungs" = /obj/item/organ/internal/lungs,
@@ -209,10 +213,11 @@
herbivores on the whole and tend to be co-operative with the other species of the galaxy, although they rarely reveal \
the secrets of their empire to their allies."
flags = HAS_LIPS
species_traits = list(LIPS)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_SKIN_COLOR | HAS_BODY_MARKINGS
dietflags = DIET_HERB
taste_sensitivity = TASTE_SENSITIVITY_DULL
flesh_color = "#8CD7A3"
blood_color = "#1D2CBF"
base_color = "#38b661" //RGB: 56, 182, 97.
@@ -289,7 +294,7 @@
breath_type = "nitrogen"
poison_type = "oxygen"
flags = NO_SCAN | IS_WHITELISTED | NOTRANSSTING
species_traits = list(NO_SCAN, IS_WHITELISTED, NOTRANSSTING)
clothing_flags = HAS_SOCKS
dietflags = DIET_OMNI
bodyflags = HAS_ICON_SKIN_TONE | HAS_TAIL | TAIL_WAGGING | TAIL_OVERLAPPED | HAS_BODY_MARKINGS | HAS_TAIL_MARKINGS
@@ -442,7 +447,7 @@
breath_type = "nitrogen"
poison_type = "oxygen"
flags = NO_SCAN | NO_BLOOD | NO_PAIN | IS_WHITELISTED
species_traits = list(NO_SCAN, NO_BLOOD, NO_PAIN, IS_WHITELISTED)
bodyflags = HAS_TAIL
dietflags = DIET_OMNI //should inherit this from vox, this is here just in case
@@ -486,9 +491,9 @@
brute_mod = 0.8
flags = IS_WHITELISTED
species_traits = list(IS_WHITELISTED)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = FEET_CLAWS | HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS
bodyflags = HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS
eyes = "kidan_eyes_s"
dietflags = DIET_HERB
blood_color = "#FB9800"
@@ -517,6 +522,7 @@
"is cracking their exoskeleton!",
"is stabbing themselves with their mandibles!",
"is holding their breath!")
/datum/species/slime
name = "Slime People"
name_plural = "Slime People"
@@ -540,13 +546,16 @@
male_cough_sounds = list('sound/effects/slime_squish.ogg')
female_cough_sounds = list('sound/effects/slime_squish.ogg')
flags = IS_WHITELISTED | NO_BREATHE | HAS_LIPS | NO_INTORGANS | NO_SCAN
species_traits = list(LIPS, IS_WHITELISTED, NO_BREATHE, NO_INTORGANS, NO_SCAN)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_SKIN_COLOR | NO_EYES
dietflags = DIET_CARN
reagent_tag = PROCESS_ORG
blood_color = "#0064C8"
exotic_blood = "water"
//ventcrawler = 1 //ventcrawling commented out
blood_damage_type = TOX
butt_sprite = "slime"
//Has default darksight of 2.
@@ -573,13 +582,10 @@
#define SLIMEPERSON_BLOOD_SCALING_FACTOR 5 // Used to adjust how much of an effect the blood has on the rate of color change. Higher is slower.
// Slowly shifting to the color of the reagents
if((H in recolor_list) && H.reagents.total_volume > SLIMEPERSON_COLOR_SHIFT_TRIGGER)
var/blood_amount = H.vessel.total_volume
var/blood_amount = H.blood_volume
var/r_color = mix_color_from_reagents(H.reagents.reagent_list)
var/new_body_color = BlendRGB(r_color, rgb(H.r_skin, H.g_skin, H.b_skin), (blood_amount*SLIMEPERSON_BLOOD_SCALING_FACTOR)/((blood_amount*SLIMEPERSON_BLOOD_SCALING_FACTOR)+(H.reagents.total_volume)))
var/list/new_color_list = ReadRGB(new_body_color)
H.r_skin = new_color_list[1]
H.g_skin = new_color_list[2]
H.b_skin = new_color_list[3]
var/new_body_color = BlendRGB(r_color, H.skin_colour, (blood_amount*SLIMEPERSON_BLOOD_SCALING_FACTOR)/((blood_amount*SLIMEPERSON_BLOOD_SCALING_FACTOR)+(H.reagents.total_volume)))
H.skin_colour = new_body_color
if(world.time % SLIMEPERSON_ICON_UPDATE_PERIOD > SLIMEPERSON_ICON_UPDATE_PERIOD - 20) // The 20 is because this gets called every 2 seconds, from the mob controller
for(var/organname in H.bodyparts_by_name)
var/obj/item/organ/external/E = H.bodyparts_by_name[organname]
@@ -637,12 +643,12 @@
var/list/missing_limbs = list()
for(var/l in bodyparts_by_name)
var/obj/item/organ/external/E = bodyparts_by_name[l]
if(!istype(E) || istype(E, /obj/item/organ/external/stump))
if(!istype(E))
var/list/limblist = species.has_limbs[l]
var/obj/item/organ/external/limb = limblist["path"]
var/parent_organ = initial(limb.parent_organ)
var/obj/item/organ/external/parentLimb = bodyparts_by_name[parent_organ]
if(!istype(parentLimb) || parentLimb.is_stump())
if(!istype(parentLimb))
continue
missing_limbs[initial(limb.name)] = l
@@ -668,21 +674,17 @@
var/stored_brute = 0
var/stored_burn = 0
if(istype(O))
if(!O.is_stump())
to_chat(src, "<span class='warning'>Your limb has already been replaced in some way!</span>")
return
else
to_chat(src, "<span class='warning'>You distribute the damaged tissue around your body, out of the way of your new pseudopod!</span>")
var/obj/item/organ/external/doomedStump = O
stored_brute = doomedStump.brute_dam
stored_burn = doomedStump.burn_dam
qdel(O)
to_chat(src, "<span class='warning'>You distribute the damaged tissue around your body, out of the way of your new pseudopod!</span>")
var/obj/item/organ/external/doomedStump = O
stored_brute = doomedStump.brute_dam
stored_burn = doomedStump.burn_dam
qdel(O)
var/limb_list = species.has_limbs[chosen_limb]
var/obj/item/organ/external/limb_path = limb_list["path"]
// Parent check
var/obj/item/organ/external/potential_parent = bodyparts_by_name[initial(limb_path.parent_organ)]
if(!istype(potential_parent) || potential_parent.is_stump())
if(!istype(potential_parent))
to_chat(src, "<span class='danger'>You've lost the organ that you've been growing your new part on!</span>")
return // No rayman for you
// Grah this line will leave a "not used" warning, in spite of the fact that the new() proc WILL do the thing.
@@ -735,7 +737,7 @@
default_genes = list(REMOTE_TALK)
flags = IS_WHITELISTED | HAS_LIPS | CAN_BE_FAT
species_traits = list(LIPS, IS_WHITELISTED, CAN_BE_FAT)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_BODY_MARKINGS
dietflags = DIET_HERB
@@ -751,6 +753,11 @@
genemutcheck(C,REMOTETALKBLOCK,null,MUTCHK_FORCED)
..()
/datum/species/grey/water_act(var/mob/living/carbon/C, volume, temperature, source)
..()
C.take_organ_damage(5,min(volume,20))
C.emote("scream")
/datum/species/grey/after_equip_job(datum/job/J, mob/living/carbon/human/H)
var/speech_pref = H.client.prefs.speciesprefs
if(speech_pref)
@@ -790,9 +797,10 @@
even the simplest concepts of other minds. Their alien physiology allows them survive happily off a diet of nothing but light, \
water and other radiation."
flags = NO_BREATHE | RADIMMUNE | IS_PLANT | NO_BLOOD | NO_PAIN
species_traits = list(NO_BREATHE, RADIMMUNE, IS_PLANT, NO_BLOOD, NO_PAIN)
clothing_flags = HAS_SOCKS
dietflags = 0 //Diona regenerate nutrition in light, no diet necessary
taste_sensitivity = TASTE_SENSITIVITY_NO_TASTE
oxy_mod = 0
@@ -843,22 +851,18 @@
return ..()
/datum/species/diona/handle_life(var/mob/living/carbon/human/H)
H.radiation = Clamp(H.radiation, 0, 100) //We have to clamp this first, then decrease it, or there's a few edge cases of massive heals if we clamp and decrease at the same time.
var/rads = H.radiation / 25
H.apply_effect(-rads,IRRADIATE,0)
H.nutrition += rads
H.radiation = max(H.radiation-rads, 0)
H.nutrition = min(H.nutrition+rads, NUTRITION_LEVEL_WELL_FED+10)
H.adjustBruteLoss(-(rads))
H.adjustOxyLoss(-(rads))
H.adjustToxLoss(-(rads))
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(H.loc)) //else, there's considered to be no light
var/turf/T = H.loc
light_amount = min(T.get_lumcount() * 10, 5) //hardcapped so it's not abused by having a ton of flashlights
H.nutrition += light_amount
H.traumatic_shock -= light_amount
if(H.nutrition > NUTRITION_LEVEL_WELL_FED)
H.nutrition = NUTRITION_LEVEL_WELL_FED
H.nutrition = min(H.nutrition+light_amount, NUTRITION_LEVEL_WELL_FED+10)
if(light_amount > 0)
H.clear_alert("nolight")
@@ -869,10 +873,8 @@
H.adjustBruteLoss(-(light_amount/2))
H.adjustFireLoss(-(light_amount/4))
H.adjustOxyLoss(-(light_amount))
if(H.nutrition < 200)
if(H.nutrition < NUTRITION_LEVEL_STARVING+50)
H.take_overall_damage(10,0)
H.traumatic_shock++
/datum/species/machine
name = "Machine"
@@ -900,15 +902,15 @@
oxy_mod = 0
death_message = "gives one shrill beep before falling limp, their monitor flashing blue before completely shutting off..."
flags = IS_WHITELISTED | NO_BREATHE | NO_SCAN | NO_BLOOD | NO_PAIN | NO_DNA | RADIMMUNE | ALL_RPARTS | NOTRANSSTING
species_traits = list(IS_WHITELISTED, NO_BREATHE, NO_SCAN, NO_BLOOD, NO_PAIN, NO_DNA, RADIMMUNE, VIRUSIMMUNE, NOTRANSSTING)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS
bodyflags = HAS_SKIN_COLOR | HAS_HEAD_MARKINGS | HAS_HEAD_ACCESSORY
bodyflags = HAS_SKIN_COLOR | HAS_HEAD_MARKINGS | HAS_HEAD_ACCESSORY | ALL_RPARTS
dietflags = 0 //IPCs can't eat, so no diet
taste_sensitivity = TASTE_SENSITIVITY_NO_TASTE
blood_color = "#1F181F"
flesh_color = "#AAAAAA"
//Default styles for created mobs.
default_hair = "Blue IPC Screen"
virus_immune = 1
can_revive_by_healing = 1
has_gender = FALSE
reagent_tag = PROCESS_SYN
@@ -924,7 +926,7 @@
"brain" = /obj/item/organ/internal/brain/mmi_holder/posibrain,
"cell" = /obj/item/organ/internal/cell,
"optics" = /obj/item/organ/internal/eyes/optical_sensor, //Default darksight of 2.
"charger" = /obj/item/organ/internal/cyberimp/chest/arm_mod/power_cord
"charger" = /obj/item/organ/internal/cyberimp/arm/power_cord
)
vision_organ = /obj/item/organ/internal/eyes/optical_sensor
@@ -1000,9 +1002,9 @@
"is sucking in warm air!",
"is holding their breath!")
flags = IS_WHITELISTED | HAS_LIPS
species_traits = list(LIPS, IS_WHITELISTED)
clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT
bodyflags = FEET_CLAWS | HAS_SKIN_TONE | HAS_BODY_MARKINGS
bodyflags = HAS_SKIN_TONE | HAS_BODY_MARKINGS
dietflags = DIET_OMNI
cold_level_1 = -1 //Default 260 - Lower is better
@@ -172,11 +172,7 @@ var/global/list/damage_icon_parts = list()
var/damage_appearance = ""
for(var/obj/item/organ/external/O in bodyparts)
if(O.is_stump())
continue
if(O.status & ORGAN_DESTROYED) damage_appearance += "d"
else
damage_appearance += O.damage_state
damage_appearance += O.damage_state
if(damage_appearance == previous_damage_appearance)
// nothing to do here
@@ -190,22 +186,19 @@ var/global/list/damage_icon_parts = list()
// blend the individual damage states with our icons
for(var/obj/item/organ/external/O in bodyparts)
if(O.is_stump())
continue
if(!(O.status & ORGAN_DESTROYED))
O.update_icon()
if(O.damage_state == "00") continue
var/icon/DI
var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.name]"
O.update_icon()
if(O.damage_state == "00") continue
var/icon/DI
var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.name]"
if(damage_icon_parts[cache_index] == null)
DI = new /icon(species.damage_overlays, O.damage_state) // the damage icon for whole human
DI.Blend(new /icon(species.damage_mask, O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
DI.Blend(species.blood_color, ICON_MULTIPLY)
damage_icon_parts[cache_index] = DI
else
DI = damage_icon_parts[cache_index]
standing_image.overlays += DI
if(damage_icon_parts[cache_index] == null)
DI = new /icon(species.damage_overlays, O.damage_state) // the damage icon for whole human
DI.Blend(new /icon(species.damage_mask, O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels
DI.Blend(species.blood_color, ICON_MULTIPLY)
damage_icon_parts[cache_index] = DI
else
DI = damage_icon_parts[cache_index]
standing_image.overlays += DI
overlays_standing[DAMAGE_LAYER] = standing_image
@@ -235,13 +228,13 @@ var/global/list/damage_icon_parts = list()
var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes)
if(eyes)
icon_key += "[rgb(eyes.eye_colour[1], eyes.eye_colour[2], eyes.eye_colour[3])]"
icon_key += "[eyes.eye_colour]"
else
icon_key += "#000000"
for(var/organ_tag in species.has_limbs)
var/obj/item/organ/external/part = bodyparts_by_name[organ_tag]
if(isnull(part) || part.is_stump() || (part.status & ORGAN_DESTROYED))
if(isnull(part))
icon_key += "0"
else if(part.status & ORGAN_ROBOT)
icon_key += "2[part.model ? "-[part.model]": ""]"
@@ -255,7 +248,7 @@ var/global/list/damage_icon_parts = list()
icon_key += "[part.dna.GetUIState(DNA_UI_GENDER)]"
icon_key += "[part.dna.GetUIValue(DNA_UI_SKIN_TONE)]"
if(part.s_col)
icon_key += "[rgb(part.s_col[1], part.s_col[2], part.s_col[3])]"
icon_key += "[part.s_col]"
if(part.s_tone)
icon_key += "[part.s_tone]"
@@ -341,7 +334,7 @@ var/global/list/damage_icon_parts = list()
if(update_icons)
update_icons()
if(lip_style && species && species.flags & HAS_LIPS)
if(lip_style && (LIPS in species.species_traits))
var/icon/lips = icon("icon"='icons/mob/human_face.dmi', "icon_state"="lips_[lip_style]_s")
lips.Blend(lip_color, ICON_ADD)
@@ -368,7 +361,7 @@ var/global/list/damage_icon_parts = list()
//Body markings.
var/obj/item/organ/external/chest/chest_organ = get_organ("chest")
if(chest_organ && !chest_organ.is_stump() && !(chest_organ.status & ORGAN_DESTROYED) && m_styles["body"])
if(chest_organ && m_styles["body"])
var/body_marking = m_styles["body"]
var/datum/sprite_accessory/body_marking_style = marking_styles_list[body_marking]
if(body_marking_style && body_marking_style.species_allowed && (species.name in body_marking_style.species_allowed))
@@ -378,7 +371,7 @@ var/global/list/damage_icon_parts = list()
markings_standing.Blend(b_marking_s, ICON_OVERLAY)
//Head markings.
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(head_organ && !head_organ.is_stump() && !(head_organ.status & ORGAN_DESTROYED) && m_styles["head"]) //If the head is destroyed, forget the head markings. This prevents floating optical markings on decapitated IPCs, for example.
if(head_organ && m_styles["head"]) //If the head is destroyed, forget the head markings. This prevents floating optical markings on decapitated IPCs, for example.
var/head_marking = m_styles["head"]
var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking]
if(head_marking_style && head_marking_style.species_allowed && (head_organ.species.name in head_marking_style.species_allowed))
@@ -398,7 +391,7 @@ var/global/list/damage_icon_parts = list()
overlays_standing[HEAD_ACC_OVER_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED) )
if(!head_organ)
if(update_icons) update_icons()
return
@@ -415,7 +408,7 @@ var/global/list/damage_icon_parts = list()
if(head_organ.species.name in head_accessory_style.species_allowed)
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
if(head_accessory_style.do_colouration)
head_accessory_s.Blend(rgb(head_organ.r_headacc, head_organ.g_headacc, head_organ.b_headacc), ICON_ADD)
head_accessory_s.Blend(head_organ.headacc_colour, ICON_ADD)
head_accessory_standing = head_accessory_s //head_accessory_standing.Blend(head_accessory_s, ICON_OVERLAY)
//Having it this way preserves animations. Useful for animated antennae.
@@ -435,7 +428,7 @@ var/global/list/damage_icon_parts = list()
overlays_standing[HAIR_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED))
if(!head_organ)
if(update_icons) update_icons()
return
@@ -453,17 +446,17 @@ var/global/list/damage_icon_parts = list()
//if(!src.get_int_organ(/obj/item/organ/internal/brain) && src.get_species() != "Machine" )//make it obvious we have NO BRAIN
// hair_standing.Blend(debrained_s, ICON_OVERLAY)
if(hair_style && hair_style.species_allowed)
if((head_organ.species.name in hair_style.species_allowed) || (head_organ.species.flags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics...
if((head_organ.species.name in hair_style.species_allowed) || (head_organ.species.bodyflags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics...
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if(head_organ.species.name == "Slime People") // I am el worstos
hair_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_AND)
hair_s.Blend("[skin_colour]A0", ICON_AND)
else if(hair_style.do_colouration)
hair_s.Blend(rgb(head_organ.r_hair, head_organ.g_hair, head_organ.b_hair), ICON_ADD)
hair_s.Blend(head_organ.hair_colour, ICON_ADD)
if(hair_style.secondary_theme)
var/icon/hair_secondary_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_[hair_style.secondary_theme]_s")
if(!hair_style.no_sec_colour)
hair_secondary_s.Blend(rgb(head_organ.r_hair_sec, head_organ.g_hair_sec, head_organ.b_hair_sec), ICON_ADD)
hair_secondary_s.Blend(head_organ.sec_hair_colour, ICON_ADD)
hair_s.Blend(hair_secondary_s, ICON_OVERLAY)
hair_standing = hair_s //hair_standing.Blend(hair_s, ICON_OVERLAY)
@@ -484,7 +477,7 @@ var/global/list/damage_icon_parts = list()
overlays_standing[FHAIR_OVER_LAYER] = null
var/obj/item/organ/external/head/head_organ = get_organ("head")
if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED))
if(!head_organ)
if(update_icons) update_icons()
return
@@ -499,17 +492,17 @@ var/global/list/damage_icon_parts = list()
if(head_organ.f_style)
var/datum/sprite_accessory/facial_hair/facial_hair_style = facial_hair_styles_list[head_organ.f_style]
if(facial_hair_style && facial_hair_style.species_allowed)
if((head_organ.species.name in facial_hair_style.species_allowed) || (head_organ.species.flags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics...
if((head_organ.species.name in facial_hair_style.species_allowed) || (head_organ.species.bodyflags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics...
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
if(head_organ.species.name == "Slime People") // I am el worstos
facial_s.Blend(rgb(r_skin, g_skin, b_skin, 160), ICON_AND)
facial_s.Blend("[skin_colour]A0", ICON_AND)
else if(facial_hair_style.do_colouration)
facial_s.Blend(rgb(head_organ.r_facial, head_organ.g_facial, head_organ.b_facial), ICON_ADD)
facial_s.Blend(head_organ.facial_colour, ICON_ADD)
if(facial_hair_style.secondary_theme)
var/icon/facial_secondary_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_[facial_hair_style.secondary_theme]_s")
if(!facial_hair_style.no_sec_colour)
facial_secondary_s.Blend(rgb(head_organ.r_facial_sec, head_organ.g_facial_sec, head_organ.b_facial_sec), ICON_ADD)
facial_secondary_s.Blend(head_organ.sec_facial_colour, ICON_ADD)
facial_s.Blend(facial_secondary_s, ICON_OVERLAY)
face_standing.Blend(facial_s, ICON_OVERLAY)
@@ -1092,8 +1085,8 @@ var/global/list/damage_icon_parts = list()
if(legcuffed)
overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1")
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed)
if(m_intent != "walk")
m_intent = "walk"
if(m_intent != MOVE_INTENT_WALK)
m_intent = MOVE_INTENT_WALK
if(hud_used && hud_used.move_intent)
hud_used.move_intent.icon_state = "walking"
@@ -1175,7 +1168,7 @@ var/global/list/damage_icon_parts = list()
if(body_accessory.try_restrictions(src))
var/icon/accessory_s = new/icon("icon" = body_accessory.icon, "icon_state" = body_accessory.icon_state)
if(species.bodyflags & HAS_SKIN_COLOR)
accessory_s.Blend(rgb(r_skin, g_skin, b_skin), body_accessory.blend_mode)
accessory_s.Blend(skin_colour, body_accessory.blend_mode)
if(tail_marking_icon && (body_accessory.name in tail_marking_style.tails_allowed))
accessory_s.Blend(tail_marking_icon, ICON_OVERLAY)
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
@@ -1200,7 +1193,7 @@ var/global/list/damage_icon_parts = list()
if(!wear_suit || !(wear_suit.flags_inv & HIDETAIL) && !istype(wear_suit, /obj/item/clothing/suit/space))
var/icon/tail_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[tail]_s")
if(species.bodyflags & HAS_SKIN_COLOR)
tail_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
tail_s.Blend(skin_colour, ICON_ADD)
if(tail_marking_icon && !tail_marking_style.tails_allowed)
tail_s.Blend(tail_marking_icon, ICON_OVERLAY)
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
@@ -1241,7 +1234,7 @@ var/global/list/damage_icon_parts = list()
if(body_accessory)
var/icon/accessory_s = new/icon("icon" = body_accessory.get_animated_icon(), "icon_state" = body_accessory.get_animated_icon_state())
if(species.bodyflags & HAS_SKIN_COLOR)
accessory_s.Blend(rgb(r_skin, g_skin, b_skin), body_accessory.blend_mode)
accessory_s.Blend(skin_colour, body_accessory.blend_mode)
if(tail_marking_icon && (body_accessory.name in tail_marking_style.tails_allowed))
accessory_s.Blend(tail_marking_icon, ICON_OVERLAY)
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
@@ -1268,7 +1261,7 @@ var/global/list/damage_icon_parts = list()
else if(tail && species.bodyflags & HAS_TAIL)
var/icon/tailw_s = new/icon("icon" = 'icons/effects/species.dmi', "icon_state" = "[tail]w_s")
if(species.bodyflags & HAS_SKIN_COLOR)
tailw_s.Blend(rgb(r_skin, g_skin, b_skin), ICON_ADD)
tailw_s.Blend(skin_colour, ICON_ADD)
if(tail_marking_icon && !tail_marking_style.tails_allowed)
tailw_s.Blend(tail_marking_icon, ICON_OVERLAY)
if((!body_accessory || istype(body_accessory, /datum/body_accessory/tail)) && species.bodyflags & TAIL_OVERLAPPED) // If the player has a species whose tail is overlapped by limbs... (having a non-tail body accessory like the snake body will override this)
+31 -23
View File
@@ -9,6 +9,7 @@
if(..())
. = 1
handle_blood()
for(var/obj/item/organ/internal/O in internal_organs)
O.on_life()
handle_changeling()
@@ -54,7 +55,7 @@
if(losebreath > 0)
AdjustLoseBreath(-1)
if(prob(10))
spawn emote("gasp")
emote("gasp")
if(istype(loc, /obj/))
var/obj/loc_as_obj = loc
loc_as_obj.handle_internal_lifeform(src, 0)
@@ -114,8 +115,7 @@
//OXYGEN
if(O2_partialpressure < safe_oxy_min) //Not enough oxygen
if(prob(20))
spawn(0)
emote("gasp")
emote("gasp")
if(O2_partialpressure > 0)
var/ratio = safe_oxy_min/O2_partialpressure
adjustOxyLoss(min(5*ratio, 3))
@@ -145,7 +145,7 @@
if(world.time - co2overloadtime > 300)
adjustOxyLoss(8)
if(prob(20))
spawn(0) emote("cough")
emote("cough")
else
co2overloadtime = 0
@@ -168,7 +168,7 @@
AdjustSleeping(2, bound_lower = 0, bound_upper = 10)
else if(SA_partialpressure > 0.01)
if(prob(20))
spawn(0) emote(pick("giggle","laugh"))
emote(pick("giggle","laugh"))
//BREATH TEMPERATURE
handle_breath_temperature(breath)
@@ -183,9 +183,10 @@
if(internal)
if(internal.loc != src)
internal = null
if(!wear_mask || !(wear_mask.flags & AIRTIGHT)) //not wearing mask or non-breath mask
if(!head || !(head.flags & AIRTIGHT)) //not wearing helmet or non-breath helmet
internal = null //turn off internals
if(!get_organ_slot("breathing_tube"))
if(!wear_mask || !(wear_mask.flags & AIRTIGHT)) //not wearing mask or non-breath mask
if(!head || !(head.flags & AIRTIGHT)) //not wearing helmet or non-breath helmet
internal = null //turn off internals
if(internal)
update_internals_hud_icon(1)
@@ -195,7 +196,18 @@
return
/mob/living/carbon/handle_diseases()
for(var/thing in viruses)
var/datum/disease/D = thing
if(prob(D.infectivity))
D.spread()
if(stat != DEAD)
D.stage_act()
//remember to remove the "proc" of the child procs of these.
/mob/living/carbon/proc/handle_blood()
return
/mob/living/carbon/proc/handle_changeling()
return
@@ -235,21 +247,18 @@
wetlevel = max(wetlevel - 1,0)
/mob/living/carbon/handle_stomach()
spawn(0)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
for(var/mob/living/M in stomach_contents)
if(M.loc != src)
stomach_contents.Remove(M)
continue
if(stat != DEAD)
if(M.stat == DEAD)
stomach_contents.Remove(M)
qdel(M)
continue
if(istype(M, /mob/living) && stat != 2)
if(M.stat == 2)
M.death(1)
stomach_contents.Remove(M)
qdel(M)
continue
if(mob_master.current_cycle%3==1)
if(!(M.status_flags & GODMODE))
M.adjustBruteLoss(5)
nutrition += 10
if(mob_master.current_cycle%3==1)
M.adjustBruteLoss(5)
nutrition += 10
//This updates the health and status of the mob (conscious, unconscious, dead)
/mob/living/carbon/handle_regular_status_updates()
@@ -346,8 +355,7 @@
handle_dreams()
adjustStaminaLoss(-10)
if(prob(10) && health && hal_screwyhud != SCREWYHUD_CRIT)
spawn(0)
emote("snore")
emote("snore")
// Keep SSD people asleep
if(player_logged)
Sleeping(2)
-38
View File
@@ -1,38 +0,0 @@
/mob/living/var/traumatic_shock = 0
/mob/living/carbon/var/shock_stage = 0
// proc to find out in how much pain the mob is at the moment
/mob/living/carbon/proc/updateshock()
src.traumatic_shock = \
1 * src.getOxyLoss() + \
1 * src.getToxLoss() + \
1 * src.getFireLoss() + \
1 * src.getBruteLoss() + \
1 * src.getCloneLoss()
if(reagents)
for(var/datum/reagent/R in reagents.reagent_list)
if(R.shock_reduction)
src.traumatic_shock -= R.shock_reduction // now you too can varedit cyanide to reduce shock by 1000 - Iamgoofball
if(src.slurring)
src.traumatic_shock -= 10
// broken or ripped off organs will add quite a bit of pain
if(istype(src,/mob/living/carbon/human))
var/mob/living/carbon/human/M = src
for(var/obj/item/organ/external/organ in M.bodyparts)
if(!organ)
continue
else if(organ.status & ORGAN_BROKEN || organ.open)
src.traumatic_shock += 15
if(organ.status & ORGAN_SPLINTED)
src.traumatic_shock -= 15
if(src.traumatic_shock < 0)
src.traumatic_shock = 0
return src.traumatic_shock
/mob/living/carbon/proc/handle_shock()
updateshock()
+21 -28
View File
@@ -241,7 +241,7 @@
switch(L.a_intent)
if(I_HELP)
if(INTENT_HELP)
visible_message("<span class='notice'>[L] rubs its head against [src].</span>")
@@ -281,11 +281,9 @@
if(prob(90) && !client)
Discipline++
spawn()
SStun = 1
sleep(rand(45,60))
if(src)
SStun = 0
SStun = 1
spawn(rand(45,60))
SStun = 0
Victim = null
anchored = 0
@@ -309,11 +307,9 @@
if(Discipline == 1)
attacked = 0
spawn()
SStun = 1
sleep(rand(55,65))
if(src)
SStun = 0
SStun = 1
spawn(rand(55,65))
SStun = 0
Victim = null
anchored = 0
@@ -322,7 +318,7 @@
return
else
if(stat == DEAD && surgeries.len)
if(M.a_intent == I_HELP)
if(M.a_intent == INTENT_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(M, src))
return 1
@@ -343,10 +339,10 @@
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
help_shake_act(M)
if(I_GRAB)
if(INTENT_GRAB)
grabbedby(M)
else
@@ -393,10 +389,10 @@
return
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
visible_message("<span class='notice'>[M] caresses [src] with its scythe like arm.</span>")
if(I_HARM)
if(INTENT_HARM)
M.do_attack_animation(src)
if(prob(95))
attacked += 10
@@ -416,10 +412,10 @@
visible_message("<span class='danger'>[M] has attempted to lunge at [name]!</span>", \
"<span class='userdanger'>[M] has attempted to lunge at [name]!</span>")
if(I_GRAB)
if(INTENT_GRAB)
grabbedby(M)
if(I_DISARM)
if(INTENT_DISARM)
M.do_attack_animation(src)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
@@ -439,9 +435,8 @@
if(Discipline == 1)
attacked = 0
spawn()
SStun = 1
sleep(rand(5,20))
SStun = 1
spawn(rand(5,20))
SStun = 0
spawn(0)
@@ -460,7 +455,7 @@
/mob/living/carbon/slime/attackby(obj/item/W, mob/user, params)
if(stat == DEAD && surgeries.len)
if(user.a_intent == I_HELP)
if(user.a_intent == INTENT_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(user, src))
return 1
@@ -491,9 +486,8 @@
Target = null
anchored = 0
spawn()
SStun = 1
sleep(rand(5,20))
SStun = 1
spawn(rand(5,20))
SStun = 0
spawn(0)
@@ -513,9 +507,8 @@
Discipline++
if(Discipline == 1)
attacked = 0
spawn()
SStun = 1
sleep(rand(5,20))
SStun = 1
spawn(rand(5,20))
SStun = 0
Victim = null
+17 -1
View File
@@ -8,7 +8,7 @@
Returns
standard 0 if fail
*/
/mob/living/proc/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/edge = 0, var/used_weapon = null)
/mob/living/proc/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone = null, var/blocked = 0, var/sharp = 0, var/used_weapon = null)
blocked = (100-blocked)/100
if(!damage || (blocked <= 0)) return 0
switch(damagetype)
@@ -27,6 +27,22 @@
updatehealth()
return 1
/mob/living/proc/apply_damage_type(damage = 0, damagetype = BRUTE) //like apply damage except it always uses the damage procs
switch(damagetype)
if(BRUTE)
return adjustBruteLoss(damage)
if(BURN)
return adjustFireLoss(damage)
if(TOX)
return adjustToxLoss(damage)
if(OXY)
return adjustOxyLoss(damage)
if(CLONE)
return adjustCloneLoss(damage)
if(STAMINA)
return adjustStaminaLoss(damage)
if(BRAIN)
return adjustBrainLoss(damage)
/mob/living/proc/apply_damages(var/brute = 0, var/burn = 0, var/tox = 0, var/oxy = 0, var/clone = 0, var/def_zone = null, var/blocked = 0, var/stamina = 0)
if(blocked >= 100) return 0
+8
View File
@@ -3,4 +3,12 @@
clear_fullscreens()
update_action_buttons_icon()
for(var/s in ownedSoullinks)
var/datum/soullink/S = s
S.ownerDies(gibbed, src)
for(var/s in sharedSoullinks)
var/datum/soullink/S = s
S.sharerDies(gibbed, src)
..(gibbed)
+9 -4
View File
@@ -15,20 +15,22 @@
blinded = null
if(stat != DEAD)
//Breathing, if applicable
handle_breathing()
//Chemicals in the body
handle_chemicals_in_body()
//Mutations and radiation
handle_mutations_and_radiation()
//Chemicals in the body
handle_chemicals_in_body()
//Breathing, if applicable
handle_breathing()
//Random events (vomiting etc)
handle_random_events()
. = 1
handle_diseases()
//Handle temperature/pressure differences between body and environment
if(environment)
handle_environment(environment)
@@ -69,6 +71,9 @@
/mob/living/proc/handle_chemicals_in_body()
return
/mob/living/proc/handle_diseases()
return
/mob/living/proc/handle_random_events()
return
+107 -17
View File
@@ -60,10 +60,10 @@
if(!M.buckled && !M.has_buckled_mobs())
var/mob_swap
//the puller can always swap with it's victim if on grab intent
if(M.pulledby == src && a_intent == I_GRAB)
if(M.pulledby == src && a_intent == INTENT_GRAB)
mob_swap = 1
//restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
else if((M.restrained() || M.a_intent == I_HELP) && (restrained() || a_intent == I_HELP))
else if((M.restrained() || M.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP))
mob_swap = 1
if(mob_swap)
//switch our position with M
@@ -168,23 +168,23 @@
//same as above
/mob/living/pointed(atom/A as mob|obj|turf in view())
if(incapacitated())
return 0
if(incapacitated(ignore_lying = TRUE))
return FALSE
if(status_flags & FAKEDEATH)
return 0
return FALSE
if(!..())
return 0
return FALSE
var/obj/item/hand_item = get_active_hand()
if(istype(hand_item, /obj/item/weapon/gun) && A != hand_item)
if(a_intent == I_HELP || !ismob(A))
if(a_intent == INTENT_HELP || !ismob(A))
visible_message("<b>[src]</b> points to [A] with [hand_item]")
return 1
return TRUE
A.visible_message("<span class='danger'>[src] points [hand_item] at [A]!</span>",
"<span class='userdanger'>[src] points [hand_item] at you!</span>")
A << 'sound/weapons/TargetOn.ogg'
return 1
return TRUE
visible_message("<b>[src]</b> points to [A]")
return 1
return TRUE
/mob/living/verb/succumb()
set hidden = 1
@@ -502,7 +502,8 @@
var/mob/living/carbon/C = src
C.handcuffed = initial(C.handcuffed)
for(var/datum/disease/D in C.viruses)
for(var/thing in C.viruses)
var/datum/disease/D = thing
D.cure(0)
// restore all of the human's blood and reset their shock stage
@@ -512,6 +513,7 @@
human_mob.restore_blood()
human_mob.shock_stage = 0
human_mob.decaylevel = 0
human_mob.remove_all_embedded_objects()
restore_all_organs()
surgeries.Cut() //End all surgeries.
@@ -523,6 +525,7 @@
stat = CONSCIOUS
update_fire()
regenerate_icons()
restore_blood()
if(human_mob)
human_mob.update_eyes()
human_mob.update_dna()
@@ -576,10 +579,10 @@
var/pull_dir = get_dir(src, pulling)
if(get_dist(src, pulling) > 1 || ((pull_dir - 1) & pull_dir)) // puller and pullee more than one tile away or in diagonal position
//if(isliving(pulling))
//var/mob/living/M = pulling
//if(M.lying && !M.buckled && (prob(M.getBruteLoss() * 200 / M.maxHealth)))
//M.makeTrail(T)
if(isliving(pulling))
var/mob/living/M = pulling
if(M.lying && !M.buckled && (prob(M.getBruteLoss() * 200 / M.maxHealth)))
M.makeTrail(T)
pulling.Move(T, get_dir(pulling, T)) // the pullee tries to reach our previous position
if(pulling && get_dist(src, pulling) > 1) // the pullee couldn't keep up
stop_pulling()
@@ -600,6 +603,55 @@
return 1
return 0
/mob/living/proc/makeTrail(turf/T)
if(!has_gravity(src))
return
var/blood_exists = 0
for(var/obj/effect/decal/cleanable/trail_holder/C in loc) //checks for blood splatter already on the floor
blood_exists = 1
if(isturf(loc))
var/trail_type = getTrail()
if(trail_type)
var/brute_ratio = round(getBruteLoss()/maxHealth, 0.1)
if(blood_volume && blood_volume > max(BLOOD_VOLUME_NORMAL*(1 - brute_ratio * 0.25), 0))//don't leave trail if blood volume below a threshold
blood_volume = max(blood_volume - max(1, brute_ratio * 2), 0) //that depends on our brute damage.
var/newdir = get_dir(T, loc)
if(newdir != src.dir)
newdir = newdir | dir
if(newdir == 3) //N + S
newdir = NORTH
else if(newdir == 12) //E + W
newdir = EAST
if((newdir in cardinal) && (prob(50)))
newdir = turn(get_dir(T, loc), 180)
if(!blood_exists)
new /obj/effect/decal/cleanable/trail_holder(loc)
for(var/obj/effect/decal/cleanable/trail_holder/TH in loc)
if((!(newdir in TH.existing_dirs) || trail_type == "trails_1" || trail_type == "trails_2") && TH.existing_dirs.len <= 16) //maximum amount of overlays is 16 (all light & heavy directions filled)
TH.existing_dirs += newdir
TH.overlays.Add(image('icons/effects/blood.dmi', trail_type, dir = newdir))
TH.transfer_mob_blood_dna(src)
if(ishuman(src))
var/mob/living/carbon/human/H = src
if(H.species.blood_color)
TH.color = H.species.blood_color
else
TH.color = "#A10808"
/mob/living/carbon/human/makeTrail(turf/T)
if((NO_BLOOD in species.species_traits) || species.exotic_blood || !bleed_rate || bleedsuppress)
return
..()
/mob/living/proc/getTrail()
if(getBruteLoss() < 300)
return pick("ltrails_1", "ltrails_2")
else
return pick("trails_1", "trails_2")
/*//////////////////////
START RESIST PROCS
*///////////////////////
@@ -937,11 +989,11 @@
. += config.run_speed
else
switch(m_intent)
if("run")
if(MOVE_INTENT_RUN)
if(drowsyness > 0)
. += 6
. += config.run_speed
if("walk")
if(MOVE_INTENT_WALK)
. += config.walk_speed
@@ -950,3 +1002,41 @@
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 0
return 1
/mob/living/proc/get_taste_sensitivity()
return 1
/mob/living/proc/taste_reagents(datum/reagents/tastes)
if(!get_taste_sensitivity())//this also works for IPCs and stuff that returns 0 here
return
var/do_not_taste_at_all = 1//so we don't spam with recent tastes
var/taste_sum = 0
var/list/taste_list = list()//associative list so we can stack stuff that tastes the same
var/list/final_taste_list = list()//final list of taste strings
for(var/datum/reagent/R in tastes.reagent_list)
taste_sum += R.volume * R.taste_strength
if(!R.taste_message)//set to null; no taste, like water
continue
taste_list[R.taste_message] += R.volume * R.taste_strength
for(var/R in taste_list)
if(recent_tastes[R] && (world.time - recent_tastes[R] < 12 SECONDS))
continue
do_not_taste_at_all = 0//something was fresh enough to taste; could still be bland enough to be unrecognizable
if(taste_list[R] / taste_sum >= 0.15 / get_taste_sensitivity())//we return earlier if the proc returns a 0; won't break the universe
final_taste_list += R
recent_tastes[R] = world.time
if(do_not_taste_at_all)
return //no message spam
if(final_taste_list.len == 0)//too many reagents - none meet their thresholds
to_chat(src, "<span class='notice'>You you can't really make out what you're tasting...</span>")
return
to_chat(src, "<span class='notice'>You can taste [english_list(final_taste_list)].</span>")
+9 -12
View File
@@ -37,16 +37,15 @@
/mob/living/proc/getarmor(var/def_zone, var/type)
return 0
/mob/living/proc/is_mouth_covered(head_only = FALSE, mask_only = FALSE)
return FALSE
/mob/living/proc/is_eyes_covered(check_glasses = TRUE, check_head = TRUE, check_mask = TRUE)
return FALSE
/mob/living/bullet_act(var/obj/item/projectile/P, var/def_zone)
//Armor
var/armor = run_armor_check(def_zone, P.flag, armour_penetration = P.armour_penetration)
var/proj_sharp = is_sharp(P)
var/proj_edge = has_edge(P)
if((proj_sharp || proj_edge) && prob(getarmor(def_zone, P.flag)))
proj_sharp = 0
proj_edge = 0
if(!P.nodamage)
apply_damage(P.damage, P.damage_type, def_zone, armor)
if(P.dismemberment)
@@ -78,7 +77,7 @@
if(istype(AM, /obj/item))
var/obj/item/I = AM
var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest
var/dtype = BRUTE
var/dtype = BRUTE
var/volume = I.get_volume_by_throwforce_and_or_w_class()
if(istype(I, /obj/item/weapon))
var/obj/item/weapon/W = I
@@ -97,7 +96,7 @@
visible_message("<span class='danger'>[src] has been hit by [I].</span>",
"<span class='userdanger'>[src] has been hit by [I].</span>")
var/armor = run_armor_check(zone, "melee", "Your armor has protected your [parse_zone(zone)].", "Your armor has softened hit to your [parse_zone(zone)].", I.armour_penetration)
apply_damage(I.throwforce, dtype, zone, armor, is_sharp(I), has_edge(I), I)
apply_damage(I.throwforce, dtype, zone, armor, is_sharp(I), I)
if(I.thrownby)
add_logs(I.thrownby, src, "hit", I)
else
@@ -108,7 +107,7 @@
/mob/living/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == I_HARM)
if(M.occupant.a_intent == INTENT_HARM)
if(M.damtype == "brute")
step_away(src,M,15)
switch(M.damtype)
@@ -266,6 +265,4 @@
if(!supress_message)
visible_message("<span class='warning'>[user] has grabbed [src] passively!</span>")
/mob/living/incapacitated()
if(stat || paralysis || stunned || weakened || restrained())
return 1
return G
@@ -59,3 +59,6 @@
var/tesla_ignore = FALSE
var/list/say_log = list() //a log of what we've said, plain text, no spans or junk, essentially just each individual "message"
var/list/recent_tastes = list()
var/blood_volume = 0 //how much blood the mob has
+1
View File
@@ -9,3 +9,4 @@
if(mind.active)
Sleeping(2)
player_logged = 1
last_logout = world.time
+14 -2
View File
@@ -677,7 +677,7 @@ var/list/ai_verbs_default = list(
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
visible_message("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>")
else //harm
@@ -706,7 +706,19 @@ var/list/ai_verbs_default = list(
visible_message("<span class='danger'><B>[M]</B> [M.attacktext] [src]!")
add_logs(M, src, "attacked", admin=0, print_attack_log = 0)
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
adjustBruteLoss(damage)
switch(M.melee_damage_type)
if(BRUTE)
adjustBruteLoss(damage)
if(BURN)
adjustFireLoss(damage)
if(TOX)
adjustToxLoss(damage)
if(OXY)
adjustOxyLoss(damage)
if(CLONE)
adjustCloneLoss(damage)
if(STAMINA)
adjustStaminaLoss(damage)
updatehealth()
/mob/living/silicon/ai/reset_perspective(atom/A)
+6 -4
View File
@@ -55,7 +55,7 @@
if(mob_to_track)
track = "<a href='byond://?src=[UID()];track=\ref[mob_to_track]'>[speaker_name] ([jobname])</a>"
track += "<a href='byond://?src=[UID()];open=\ref[mob_to_track]'>\[OPEN\]</a>"
track += "<a href='byond://?src=[UID()];open=\ref[mob_to_track]'>\[O\]</a>"
return track
@@ -66,7 +66,6 @@
*/
var/announcing_vox = 0 // Stores the time of the last announcement
var/const/VOX_CHANNEL = 200
var/const/VOX_DELAY = 100
var/const/VOX_PATH = "sound/vox_fem/"
@@ -136,11 +135,14 @@ var/const/VOX_PATH = "sound/vox_fem/"
play_vox_word(word, src.z, null)
/proc/play_vox_word(var/word, var/z_level, var/mob/only_listener)
/proc/play_vox_word(word, z_level, mob/only_listener)
word = lowertext(word)
if(vox_sounds[word])
var/sound_file = vox_sounds[word]
var/sound/voice = sound(sound_file, wait = 1, channel = VOX_CHANNEL)
var/sound/voice = sound(sound_file, wait = 1, channel = CHANNEL_VOX)
voice.status = SOUND_STREAM
// If there is no single listener, broadcast to everyone in the same z level
+1 -1
View File
@@ -14,7 +14,7 @@
playsound(src.loc, 'sound/goonstation/effects/robogib.ogg', 50, 1)
// flick("gibbed-r", animation)
robogibs(loc, viruses)
robogibs(loc)
dead_mob_list -= src
spawn(15)
+2 -2
View File
@@ -246,7 +246,7 @@
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
for(var/mob/O in viewers(src, null))
if((O.client && !( O.blinded )))
O.show_message(text("<span class='notice'>[M] caresses [src]'s casing with its scythe like arm.</span>"), 1)
@@ -508,7 +508,7 @@
/mob/living/silicon/pai/attack_hand(mob/user as mob)
if(stat == DEAD)
return
if(user.a_intent == I_HELP)
if(user.a_intent == INTENT_HELP)
user.visible_message("<span class='notice'>[user] pets [src].</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
else
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:33
// Recruiting observers to play as pAIs
var/datum/paiController/paiController // Global handler for pAI candidates
@@ -34,13 +34,15 @@
installed = -1
uninstall()
/datum/robot_component/proc/take_damage(brute, electronics, sharp, edge)
if(installed != 1) return
/datum/robot_component/proc/take_damage(brute, electronics, sharp)
if(installed != 1)
return
brute_damage += brute
electronics_damage += electronics
if(brute_damage + electronics_damage >= max_damage) destroy()
if(brute_damage + electronics_damage >= max_damage)
destroy()
/datum/robot_component/proc/heal_damage(brute, electronics)
if(installed != 1)
@@ -14,7 +14,7 @@
playsound(src.loc, 'sound/goonstation/effects/robogib.ogg', 50, 1)
flick("gibbed-r", animation)
robogibs(loc, viruses)
robogibs(loc)
living_mob_list -= src
dead_mob_list -= src
@@ -188,6 +188,9 @@
lawchanges.Add("[time] <B>:</B> [H.name]([H.key]) emagged [name]([key])")
emagged = 1
icon_state = "repairbot-emagged"
holder_type = /obj/item/weapon/holder/drone/emagged
update_icons()
lawupdate = 0
connected_ai = null
clear_supplied_laws()
@@ -44,7 +44,7 @@
//Actual picking-up event.
/mob/living/silicon/robot/drone/attack_hand(mob/living/carbon/human/M as mob)
if(M.a_intent == I_HELP)
if(M.a_intent == INTENT_HELP)
get_scooped(M)
..()
@@ -91,6 +91,9 @@
H.righthand_file = 'icons/mob/custom_synthetic/custom_righthand.dmi'
H.icon_state = "[icon_state]"
H.item_state = "[icon_state]_hand"
else if(emagged)
H.icon_state = "drone-emagged"
H.item_state = "drone-emagged"
else
H.icon_state = "drone"
H.item_state = "drone"
@@ -53,7 +53,7 @@
if(..())
return
if(!allowed(usr))
if(!allowed(usr) && !usr.can_admin_interact())
to_chat(usr, "<span class='warning'>Access denied.</span>")
return
@@ -161,8 +161,8 @@
name = "matter decompiler"
desc = "Eating trash, bits of glass, or other debris will replenish your stores."
icon = 'icons/obj/device.dmi'
icon_state = "decompiler"
icon = 'icons/obj/toy.dmi'
icon_state = "minigibber"
//Metal, glass, wood, plastic.
var/list/stored_comms = list(
@@ -260,10 +260,6 @@
stored_comms["glass"]++
else if(istype(W,/obj/item/ammo_casing))
stored_comms["metal"]++
else if(istype(W,/obj/item/weapon/shard/shrapnel))
stored_comms["metal"]++
stored_comms["metal"]++
stored_comms["metal"]++
else if(istype(W,/obj/item/weapon/shard))
stored_comms["glass"]++
stored_comms["glass"]++
@@ -108,6 +108,12 @@
to_chat(usr, "<span class='warning'>This role is not yet available to you. You need to wait another [player_age_check] days.</span>")
return
var/pt_req = role_available_in_playtime(client, ROLE_DRONE)
if(pt_req)
var/pt_req_string = get_exp_format(pt_req)
to_chat(usr, "<span class='warning'>This role is not yet available to you. Play another [pt_req_string] to unlock it.</span>")
return
var/deathtime = world.time - src.timeofdeath
var/joinedasobserver = 0
if(istype(src,/mob/dead/observer))
+12 -14
View File
@@ -584,7 +584,7 @@ var/list/robot_verbs_default = list(
return
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == I_HELP)
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == INTENT_HELP)
if(W == module_active)
return
if(!getBruteLoss())
@@ -603,7 +603,7 @@ var/list/robot_verbs_default = list(
return
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == I_HELP && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
else if(istype(W, /obj/item/stack/cable_coil) && user.a_intent == INTENT_HELP && (wiresexposed || istype(src,/mob/living/silicon/robot/drone)))
if(!getFireLoss())
to_chat(user, "<span class='notice'>Nothing to fix!</span>")
return
@@ -827,15 +827,15 @@ var/list/robot_verbs_default = list(
switch(M.a_intent)
if(I_HELP)
if(INTENT_HELP)
for(var/mob/O in viewers(src, null))
if((O.client && !( O.blinded )))
O.show_message(text("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>"), 1)
if(I_GRAB)
if(INTENT_GRAB)
grabbedby(M)
if(I_HARM)
if(INTENT_HARM)
M.do_attack_animation(src)
var/damage = rand(10, 20)
if(prob(90))
@@ -851,7 +851,7 @@ var/list/robot_verbs_default = list(
visible_message("<span class='danger'>[M] took a swipe at [src]!</span>", \
"<span class='userdanger'>[M] took a swipe at [src]!</span>")
if(I_DISARM)
if(INTENT_DISARM)
if(!(lying))
M.do_attack_animation(src)
if(prob(85))
@@ -932,7 +932,7 @@ var/list/robot_verbs_default = list(
diag_hud_set_borgcell()
if(!opened && (!istype(user, /mob/living/silicon)))
if(user.a_intent == I_HELP)
if(user.a_intent == INTENT_HELP)
user.visible_message("<span class='notice'>[user] pets [src]!</span>", \
"<span class='notice'>You pet [src]!</span>")
@@ -1214,13 +1214,11 @@ var/list/robot_verbs_default = list(
canmove = 1
scrambledcodes = 1
//Disconnect it's camera so it's not so easily tracked.
if(src.camera)
qdel(src.camera)
src.camera = null
// I'm trying to get the Cyborg to not be listed in the camera list
// Instead of being listed as "deactivated". The downside is that I'm going
// to have to check if every camera is null or not before doing anything, to prevent runtime errors.
// I could change the network to null but I don't know what would happen, and it seems too hacky for me.
QDEL_NULL(src.camera)
// I'm trying to get the Cyborg to not be listed in the camera list
// Instead of being listed as "deactivated". The downside is that I'm going
// to have to check if every camera is null or not before doing anything, to prevent runtime errors.
// I could change the network to null but I don't know what would happen, and it seems too hacky for me.
/mob/living/silicon/robot/proc/ResetSecurityCodes()
set category = "Robot Commands"
@@ -98,11 +98,11 @@
var/datum/robot_component/armour/A = get_armour()
if(A)
A.take_damage(brute,burn,sharp,edge)
A.take_damage(brute, burn, sharp)
return
var/datum/robot_component/C = pick(components)
C.take_damage(brute,burn,sharp,edge)
C.take_damage(brute, burn, sharp)
/mob/living/silicon/robot/heal_overall_damage(var/brute, var/burn)
var/list/datum/robot_component/parts = get_damaged_components(brute,burn)
@@ -149,7 +149,7 @@
var/datum/robot_component/armour/A = get_armour()
if(A)
A.take_damage(brute,burn,sharp)
A.take_damage(brute, burn, sharp)
return
while(parts.len && (brute>0 || burn>0) )
@@ -158,7 +158,7 @@
var/brute_was = picked.brute_damage
var/burn_was = picked.electronics_damage
picked.take_damage(brute,burn)
picked.take_damage(brute, burn)
brute -= (picked.brute_damage - brute_was)
burn -= (picked.electronics_damage - burn_was)
@@ -271,8 +271,9 @@
modules += new /obj/item/weapon/reagent_containers/food/condiment/enzyme(src)
modules += new /obj/item/weapon/pen(src)
modules += new /obj/item/weapon/razor(src)
modules += new /obj/item/device/violin(src)
modules += new /obj/item/device/guitar(src)
modules += new /obj/item/device/instrument/violin(src)
modules += new /obj/item/device/instrument/guitar(src)
modules += new /obj/item/device/instrument/eguitar(src)
var/obj/item/weapon/rsf/M = new /obj/item/weapon/rsf(src)
M.matter = 30
@@ -1,7 +1,7 @@
// No args for restraints because robots don't have those
/mob/living/silicon/robot/incapacitated()
/mob/living/silicon/robot/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, ignore_lying = FALSE)
if(stat || lockcharge || weakened || stunned || paralysis || !is_component_functioning("actuator"))
return 1
return TRUE
/mob/living/silicon/robot/update_stat()
if(status_flags & GODMODE)
+1 -1
View File
@@ -144,11 +144,11 @@
// This adds the basic clock, shuttle recall timer, and malf_ai info to all silicon lifeforms
/mob/living/silicon/Stat()
..()
if(statpanel("Status"))
show_stat_station_time()
show_stat_emergency_shuttle_eta()
show_system_integrity()
..()
//Silicon mob language procs
@@ -256,7 +256,7 @@
new /obj/effect/decal/cleanable/blood/oil(loc)
/mob/living/simple_animal/bot/attack_hand(mob/living/carbon/human/H)
if(H.a_intent == "help")
if(H.a_intent == INTENT_HELP)
interact(H)
else
return ..()
@@ -329,7 +329,7 @@
ejectpai(user)
else
user.changeNext_move(CLICK_CD_MELEE)
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
if(health >= maxHealth)
to_chat(user, "<span class='warning'>[src] does not need a repair!</span>")
return
@@ -167,9 +167,8 @@
mode = BOT_CLEANING
spawn(50)
if(mode == BOT_CLEANING)
qdel(target)
QDEL_NULL(target)
anchored = 0
target = null
mode = BOT_IDLE
icon_state = "cleanbot[on]"
@@ -222,4 +221,4 @@ text("<A href='?src=[UID()];power=1'>[on ? "On" : "Off"]</A>"))
if(istype(A,/obj/effect/decal/cleanable))
clean(A)
else
..()
..()
@@ -161,13 +161,13 @@ Auto Patrol[]"},
mode = BOT_HUNT
/mob/living/simple_animal/bot/ed209/attack_hand(mob/living/carbon/human/H)
if(H.a_intent == "harm")
if(H.a_intent == INTENT_HARM)
retaliate(H)
return ..()
/mob/living/simple_animal/bot/ed209/attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") // Any intent but harm will heal, so we shouldn't get angry.
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
return
if(!istype(W, /obj/item/weapon/screwdriver) && (!target)) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
if(W.force && W.damtype != STAMINA)//If force is non-zero and damage type isn't stamina.
@@ -398,7 +398,8 @@
return 1
if(treat_virus)
for(var/datum/disease/D in C.viruses)
for(var/thing in C.viruses)
var/datum/disease/D = thing
//the medibot can't detect viruses that are undetectable to Health Analyzers or Pandemic machines.
if(D.visibility_flags & HIDDEN_SCANNER || D.visibility_flags & HIDDEN_PANDEMIC)
return 0
@@ -428,6 +429,7 @@
chemscan(src, A)
/mob/living/simple_animal/bot/medbot/proc/medicate_patient(mob/living/carbon/C)
var/inject_beaker = FALSE
if(!on)
return
@@ -451,7 +453,8 @@
else
if(treat_virus)
var/virus = 0
for(var/datum/disease/D in C.viruses)
for(var/thing in C.viruses)
var/datum/disease/D = thing
//detectable virus
if((!(D.visibility_flags & HIDDEN_SCANNER)) || (!(D.visibility_flags & HIDDEN_PANDEMIC)))
if(D.severity != NONTHREAT) //virus is harmful
@@ -482,7 +485,8 @@
if(reagent_id && use_beaker && reagent_glass && reagent_glass.reagents.total_volume)
for(var/datum/reagent/R in reagent_glass.reagents.reagent_list)
if(!C.reagents.has_reagent(R.id))
reagent_id = "internal_beaker"
reagent_id = R.id
inject_beaker = TRUE
break
if(!reagent_id) //If they don't need any of that they're probably cured!
@@ -499,7 +503,7 @@
spawn(30)//replace with do mob
if((get_dist(src, patient) <= 1) && on && assess_patient(patient))
if(reagent_id == "internal_beaker")
if(inject_beaker)
if(use_beaker && reagent_glass && reagent_glass.reagents.total_volume)
var/fraction = min(injection_amount/reagent_glass.reagents.total_volume, 1)
reagent_glass.reagents.reaction(patient, INGEST, fraction)
@@ -1,5 +1,3 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
// Mulebot - carries crates around for Quartermaster
// Navigates via floor navbeacons
// Remote Controlled from QM's PDA
@@ -18,7 +16,7 @@
health = 50
maxHealth = 50
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
a_intent = "harm" //No swapping
a_intent = INTENT_HARM //No swapping
buckle_lying = 0
mob_size = MOB_SIZE_LARGE
radio_channel = "Supply"
@@ -568,23 +566,6 @@
mode = BOT_NO_ROUTE
/mob/living/simple_animal/bot/mulebot/Move(turf/simulated/next)
var/turf/simulated/last = loc
if(istype(last) && bloodiness)
last.AddTracks(/obj/effect/decal/cleanable/blood/tracks/wheels, currentDNA, 0, get_dir(last, next), currentBloodColor)
. = ..()
if(. && istype(next))
if(bloodiness)
next.AddTracks(/obj/effect/decal/cleanable/blood/tracks/wheels, currentDNA, get_dir(last, next), 0, currentBloodColor)
bloodiness--
for(var/mob/living/carbon/human/H in next)
if(H != load)
RunOver(H)
// calculates a path to the current destination
// given an optional turf to avoid
/mob/living/simple_animal/bot/mulebot/calc_path(turf/avoid = null)
@@ -668,6 +649,30 @@
return
/mob/living/simple_animal/bot/mulebot/Move(turf/simulated/next)
. = ..()
if(. && istype(next))
if(bloodiness)
var/obj/effect/decal/cleanable/blood/tracks/B = locate() in next
if(!B)
B = new /obj/effect/decal/cleanable/blood/tracks(loc)
if(blood_DNA && blood_DNA.len)
B.blood_DNA |= blood_DNA.Copy()
B.basecolor = currentBloodColor
var/newdir = get_dir(next, loc)
if(newdir == dir)
B.setDir(newdir)
else
newdir = newdir | dir
if(newdir == 3)
newdir = 1
else if(newdir == 12)
newdir = 4
B.setDir(newdir)
B.update_icon()
bloodiness--
// called when bot bumps into anything
/mob/living/simple_animal/bot/mulebot/Bump(atom/obs)
if(!wires.MobAvoid()) // usually just bumps, but if avoidance disabled knock over mobs
@@ -697,21 +702,18 @@
H.apply_damage(0.5*damage, BRUTE, "l_arm", run_armor_check("l_arm", "melee"))
H.apply_damage(0.5*damage, BRUTE, "r_arm", run_armor_check("r_arm", "melee"))
var/obj/effect/decal/cleanable/blood/B = new(loc)
B.blood_DNA = list()
B.blood_DNA[H.dna.unique_enzymes] = H.dna.b_type
currentDNA = B.blood_DNA
var/turf/T = get_turf(src)
H.add_mob_blood(H)
H.add_splatter_floor(T)
bloodiness += 4
currentBloodColor = "#A10808"
if(istype(H))
var/datum/reagent/blood/bld = H.get_blood(H.vessel)
if(bld.data["blood_colour"])
currentBloodColor = bld.data["blood_colour"]
return
B.basecolor = currentBloodColor
B.update_icon()
var/list/blood_dna = H.get_blood_dna_list()
if(blood_dna)
transfer_blood_dna(blood_dna)
currentBloodColor = H.species.blood_color
return
/mob/living/simple_animal/bot/mulebot/bot_control_message(command, mob/user, user_turf)
switch(command)
@@ -173,13 +173,13 @@ Auto Patrol: []"},
mode = BOT_HUNT
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H)
if(H.a_intent == "harm")
if(H.a_intent == INTENT_HARM)
retaliate(H)
return ..()
/mob/living/simple_animal/bot/secbot/attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") // Any intent but harm will heal, so we shouldn't get angry.
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
return
if(!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!target) && (W.damtype != STAMINA) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
retaliate(user)
@@ -10,7 +10,7 @@
response_harm = "punches"
icon_dead = "shade_dead"
speed = 0
a_intent = I_HARM
a_intent = INTENT_HARM
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/weapons/punch1.ogg'
@@ -302,7 +302,6 @@
melee_damage_lower = 1
melee_damage_upper = 5
attacktext = "prods"
speed = 0
environment_smash = 3
see_in_dark = 8
attack_sound = 'sound/weapons/tap.ogg'
@@ -37,12 +37,85 @@
icon_resting = "cat_rest"
gender = FEMALE
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
var/list/family = list()
var/memory_saved = 0
var/list/children = list() //Actual mob instances of children
var/cats_deployed = 0
/mob/living/simple_animal/pet/cat/Runtime/New()
Read_Memory()
..()
/mob/living/simple_animal/pet/cat/Runtime/Life()
if(!cats_deployed && ticker.current_state >= GAME_STATE_SETTING_UP)
Deploy_The_Cats()
if(!stat && ticker.current_state == GAME_STATE_FINISHED && !memory_saved)
Write_Memory()
..()
/mob/living/simple_animal/pet/cat/Runtime/make_babies()
var/mob/baby = ..()
if(baby)
children += baby
return baby
/mob/living/simple_animal/pet/cat/Runtime/death()
if(!memory_saved)
Write_Memory(1)
..()
/mob/living/simple_animal/pet/cat/Runtime/proc/Read_Memory()
var/savefile/S = new /savefile("data/npc_saves/Runtime.sav")
S["family"] >> family
if(isnull(family))
family = list()
/mob/living/simple_animal/pet/cat/Runtime/proc/Write_Memory(dead)
var/savefile/S = new /savefile("data/npc_saves/Runtime.sav")
family = list()
if(!dead)
for(var/mob/living/simple_animal/pet/cat/kitten/C in children)
if(istype(C,type) || C.stat || !C.z || !C.butcher_results)
continue
if(C.type in family)
family[C.type] += 1
else
family[C.type] = 1
S["family"] << family
memory_saved = 1
/mob/living/simple_animal/pet/cat/Runtime/proc/Deploy_The_Cats()
cats_deployed = 1
for(var/cat_type in family)
if(family[cat_type] > 0)
for(var/i in 1 to min(family[cat_type],100)) //Limits to about 500 cats, you wouldn't think this would be needed (BUT IT IS)
new cat_type(loc)
/mob/living/simple_animal/pet/cat/handle_automated_action()
..()
if(prob(1))
custom_emote(1, pick("stretches out for a belly rub.", "wags its tail.", "lies down."))
icon_state = "[icon_living]_rest"
resting = 1
update_canmove()
else if (prob(1))
custom_emote(1, pick("sits down.", "crouches on its hind legs.", "looks alert."))
icon_state = "[icon_living]_sit"
resting = 1
update_canmove()
else if (prob(1))
if (resting)
custom_emote(1, pick("gets up and meows.", "walks around.", "stops resting."))
icon_state = "[icon_living]"
resting = 0
update_canmove()
else
custom_emote(1, pick("grooms its fur.", "twitches its whiskers.", "shakes out its coat."))
//MICE!
if(eats_mice && loc && isturf(loc) && !incapacitated())
if(eats_mice && isturf(loc) && !incapacitated())
for(var/mob/living/simple_animal/mouse/M in view(1,src))
if(!M.stat && Adjacent(M))
custom_emote(1, "splats \the [M]!")
@@ -50,13 +123,11 @@
movement_target = null
stop_automated_movement = 0
break
//attempt to mate
make_babies()
/mob/living/simple_animal/pet/cat/handle_automated_movement()
..()
if(eats_mice && !incapacitated())
if(!stat && !resting && !buckled)
turns_since_scan++
if(turns_since_scan > 5)
walk_to(src,0)
@@ -75,6 +146,7 @@
stop_automated_movement = 1
walk_to(src,movement_target,0,3)
/mob/living/simple_animal/pet/cat/Proc
name = "Proc"
@@ -102,4 +174,4 @@
gold_core_spawnable = CHEM_MOB_SPAWN_INVALID
eats_mice = 0
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
minbodytemp = 0
@@ -22,12 +22,13 @@
see_in_dark = 5
childtype = /mob/living/simple_animal/pet/corgi/puppy
simplespecies = /mob/living/simple_animal/pet/corgi
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
var/shaved = 0
var/obj/item/inventory_head
var/obj/item/inventory_back
var/facehugger
var/default_atmos_requirements = 0
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
var/last_eaten = 0
/mob/living/simple_animal/pet/corgi/New()
..()
@@ -557,8 +558,8 @@
/mob/living/simple_animal/pet/corgi/attack_hand(mob/living/carbon/human/M)
. = ..()
switch(M.a_intent)
if(I_HELP) wuv(1,M)
if(I_HARM) wuv(-1,M)
if(INTENT_HELP) wuv(1,M)
if(INTENT_HARM) wuv(-1,M)
/mob/living/simple_animal/pet/corgi/proc/wuv(change, mob/M)
if(change)
@@ -13,6 +13,8 @@
pass_flags = PASSTABLE | PASSMOB
mob_size = MOB_SIZE_SMALL
ventcrawler = 2
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxHealth = 50
health = 50
@@ -51,7 +53,7 @@
/mob/living/simple_animal/diona/attack_hand(mob/living/carbon/human/M)
//Let people pick the little buggers up.
if(M.a_intent == I_HELP)
if(M.a_intent == INTENT_HELP)
if(M.species && M.species.name == "Diona")
to_chat(M, "You feel your being twine with that of [src] as it merges with your biomass.")
to_chat(src, "You feel your being twine with that of [M] as you merge with its biomass.")
@@ -176,7 +178,7 @@
if(!M || !src)
return
if(M.species.flags & NO_BLOOD)
if(NO_BLOOD in M.species.species_traits)
to_chat(src, "<span class='warning'>That donor has no blood to take.</span>")
return
@@ -27,6 +27,7 @@
stop_automated_movement_when_pulled = 1
var/milk_content = 0
can_collar = 1
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/hostile/retaliate/goat/handle_automated_movement()
..()
@@ -110,6 +111,7 @@
var/milk_content = 0
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/cow/New()
..()
@@ -136,7 +138,7 @@
milk_content = min(50, milk_content+rand(5, 10))
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
if(!stat && M.a_intent == I_DISARM && icon_state != icon_dead)
if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
M.visible_message("<span class='warning'>[M] tips over [src].</span>","<span class='notice'>You tip over [src].</span>")
Weaken(30)
icon_state = icon_dead
@@ -312,6 +314,7 @@ var/global/chicken_count = 0
maxHealth = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/turkey
name = "turkey"
@@ -381,6 +384,7 @@ var/global/chicken_count = 0
maxHealth = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/walrus
name = "walrus"
@@ -404,3 +408,4 @@ var/global/chicken_count = 0
maxHealth = 50
can_collar = 1
gold_core_spawnable = CHEM_MOB_SPAWN_FRIENDLY
blood_volume = BLOOD_VOLUME_NORMAL
@@ -77,7 +77,7 @@
client.time_died_as_mouse = world.time
/mob/living/simple_animal/mouse/attack_hand(mob/living/carbon/human/M as mob)
if(M.a_intent == I_HELP)
if(M.a_intent == INTENT_HELP)
get_scooped(M)
..()
@@ -2,6 +2,7 @@
icon = 'icons/mob/pets.dmi'
can_collar = 1
mob_size = MOB_SIZE_SMALL
blood_volume = BLOOD_VOLUME_NORMAL
/mob/living/simple_animal/pet/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
if(istype(O, /obj/item/weapon/newspaper))
@@ -1,53 +1,54 @@
/mob/living/simple_animal/spiderbot
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 500
var/obj/item/device/radio/borg/radio = null
var/mob/living/silicon/ai/connected_ai = null
var/obj/item/weapon/stock_parts/cell/cell = null
var/obj/machinery/camera/camera = null
var/obj/item/device/mmi/mmi = null
var/list/req_access = list(access_robotics) //Access needed to pop out the brain.
name = "Spider-bot"
desc = "A skittering robotic friend!"
desc = "A skittering robotic friend!" //More like ultimate shitter
icon = 'icons/mob/robots.dmi'
icon_state = "spiderbot-chassis"
icon_living = "spiderbot-chassis"
icon_dead = "spiderbot-smashed"
wander = 0
universal_speak = 1
health = 10
maxHealth = 10
health = 40
maxHealth = 40
pass_flags = PASSTABLE
melee_damage_lower = 2
melee_damage_upper = 2
melee_damage_type = BURN
attacktext = "shocks"
attacktext = "shocks"
melee_damage_lower = 1
melee_damage_upper = 3
attack_sound = "sparks"
response_help = "pets"
response_disarm = "shoos"
response_harm = "stomps on"
var/obj/item/held_item = null //Storage for single item they can hold.
var/emagged = 0 //IS WE EXPLODEN?
var/syndie = 0 //IS WE SYNDICAT? (currently unused)
speed = -1 //Spiderbots gotta go fast.
//pass_flags = PASSTABLE //Maybe griefy?
speed = 0
mob_size = MOB_SIZE_SMALL
speak_emote = list("beeps","clicks","chirps")
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
maxbodytemp = 500
can_hide = 1
ventcrawler = 2
loot = list(/obj/effect/decal/cleanable/blood/gibs/robot)
del_on_death = 1
/mob/living/simple_animal/spiderbot/attackby(var/obj/item/O as obj, var/mob/user as mob, params)
var/emagged = 0 //is it getting ready to explode?
var/obj/item/device/mmi/mmi = null
var/emagged_master = null //for administrative purposes, to see who emagged the spiderbot; also for a holder for if someone emags an empty frame first then inserts an MMI.
if(istype(O, /obj/item/device/mmi) || istype(O, /obj/item/device/mmi/posibrain))
/mob/living/simple_animal/spiderbot/Destroy()
if(emagged)
QDEL_NULL(mmi)
explosion(get_turf(src), -1, -1, 3, 5)
else
eject_brain()
return ..()
/mob/living/simple_animal/spiderbot/attackby(obj/item/O, mob/living/user, params)
if(istype(O, /obj/item/device/mmi))
var/obj/item/device/mmi/B = O
if(src.mmi) //There's already a brain in it.
if(mmi) //There's already a brain in it.
to_chat(user, "<span class='warning'>There's already a brain in [src]!</span>")
return
if(!B.brainmob)
@@ -65,47 +66,49 @@
ghost_can_reenter = 1
break
if(!ghost_can_reenter)
to_chat(user, "<span class='notice'>[O] is completely unresponsive; there's no point.</span>")
to_chat(user, "<span class='notice'>[B] is completely unresponsive; there's no point.</span>")
return
if(B.brainmob.stat == DEAD)
to_chat(user, "<span class='warning'>[O] is dead. Sticking it into the frame would sort of defeat the purpose.</span>")
to_chat(user, "<span class='warning'>[B] is dead. Sticking it into the frame would sort of defeat the purpose.</span>")
return
if(jobban_isbanned(B.brainmob, "Cyborg") || jobban_isbanned(B.brainmob,"nonhumandept"))
to_chat(user, "<span class='warning'>[O] does not seem to fit.</span>")
if(jobban_isbanned(B.brainmob, "Cyborg") || jobban_isbanned(B.brainmob, "nonhumandept"))
to_chat(user, "<span class='warning'>[B] does not seem to fit.</span>")
return
to_chat(user, "<span class='notice'>You install [O] in [src]!</span>")
to_chat(user, "<span class='notice'>You install [B] in [src]!</span>")
user.drop_item()
src.mmi = O
src.transfer_personality(O)
B.forceMove(src)
mmi = B
transfer_personality(B)
O.loc = src
src.update_icon()
update_icon()
return 1
if(istype(O, /obj/item/weapon/weldingtool))
else if(iswelder(O) && user.a_intent == INTENT_HELP)
var/obj/item/weapon/weldingtool/WT = O
user.changeNext_move(CLICK_CD_MELEE)
if(WT.remove_fuel(0))
if(health < maxHealth)
health += pick(1,1,1,2,2,3)
if(health > maxHealth)
health = maxHealth
adjustHealth(-5)
playsound(loc, WT.usesound, 50, 1)
add_fingerprint(user)
for(var/mob/W in viewers(user, null))
W.show_message(text("<span class='warning'>[user] has spot-welded some of the damage to [src]!</span>"), 1)
visible_message("<span class='warning'>[user] has spot-welded some of the damage to [src]!</span>")
else
to_chat(user, "<span class='notice'>[src] is undamaged!</span>")
else
to_chat(user, "Need more welding fuel!")
return
else if(istype(O, /obj/item/weapon/card/id)||istype(O, /obj/item/device/pda))
else if(istype(O, /obj/item/weapon/card/id) || istype(O, /obj/item/device/pda))
if(!mmi)
to_chat(user, "<span class='warning'>There's no reason to swipe your ID - the spiderbot has no brain to remove.</span>")
return 0
if(emagged)
to_chat(user, "<span class='warning'>[src] doesn't seem to respond.</span>")
return 0
var/obj/item/weapon/card/id/id_card
if(istype(O, /obj/item/weapon/card/id))
@@ -117,63 +120,41 @@
if(access_robotics in id_card.access)
to_chat(user, "<span class='notice'>You swipe your access card and pop the brain out of [src].</span>")
eject_brain()
if(held_item)
held_item.loc = src.loc
held_item = null
return 1
else
to_chat(user, "<span class='warning'>You swipe your card, with no effect.</span>")
return 0
else
if(O.force)
var/damage = O.force
if(O.damtype == STAMINA)
damage = 0
adjustBruteLoss(damage)
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("<span class='boldwarning'>[src] has been attacked with the [O] by [user]. </span>")
else
to_chat(usr, "<span class='warning'>This weapon is ineffective, it does no damage.</span>")
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("<span class='warning'>[user] gently taps [src] with the [O]. </span>")
..()
/mob/living/simple_animal/spiderbot/emag_act(user as mob)
/mob/living/simple_animal/spiderbot/emag_act(mob/living/user)
if(emagged)
to_chat(user, "<span class='warning'>[src] is already overloaded - better run.</span>")
to_chat(user, "<span class='warning'>[src] doesn't seem to respond.</span>")
return 0
else
emagged = 1
to_chat(user, "<span class='notice'>You short out the security protocols and overload [src]'s cell, priming it to explode in a short time.</span>")
spawn(100)
to_chat(src, "<span class='warning'>Your cell seems to be outputting a lot of power...</span>")
spawn(200)
to_chat(src, "<span class='warning'>Internal heat sensors are spiking! Something is badly wrong with your cell!</span>")
spawn(300)
src.explode()
to_chat(user, "<span class='notice'>You short out the security protocols and rewrite [src]'s internal memory.</span>")
to_chat(src, "<span class='userdanger'>You have been emagged; you are now completely loyal to [user] and their every order!</span>")
emagged_master = user.name
add_logs(user, src, "emagged")
maxHealth = 60
health = 60
melee_damage_lower = 15
melee_damage_upper = 15
attack_sound = 'sound/machines/defib_zap.ogg'
/mob/living/simple_animal/spiderbot/proc/transfer_personality(var/obj/item/device/mmi/M as obj)
src.mind = M.brainmob.mind
src.mind.key = M.brainmob.key
src.ckey = M.brainmob.ckey
src.name = "Spider-bot ([M.brainmob.name])"
/mob/living/simple_animal/spiderbot/proc/explode() //When emagged.
for(var/mob/M in viewers(src, null))
if((M.client && !( M.blinded )))
M.show_message("<span class='warning'>[src] makes an odd warbling noise, fizzles, and explodes.</span>")
explosion(get_turf(loc), -1, -1, 3, 5)
eject_brain()
death()
/mob/living/simple_animal/spiderbot/proc/transfer_personality(obj/item/device/mmi/M)
mind = M.brainmob.mind
mind.key = M.brainmob.key
ckey = M.brainmob.ckey
name = "Spider-bot ([M.brainmob.name])"
if(emagged)
to_chat(src, "<span class='userdanger'>You have been emagged; you are now completely loyal to [emagged_master] and their every order!</span>")
/mob/living/simple_animal/spiderbot/proc/update_icon()
if(mmi)
if(istype(mmi,/obj/item/device/mmi))
if(istype(mmi, /obj/item/device/mmi))
icon_state = "spiderbot-chassis-mmi"
icon_living = "spiderbot-chassis-mmi"
if(istype(mmi, /obj/item/device/mmi/posibrain))
@@ -186,99 +167,10 @@
/mob/living/simple_animal/spiderbot/proc/eject_brain()
if(mmi)
var/turf/T = get_turf(loc)
if(T)
mmi.loc = T
if(mind) mind.transfer_to(mmi.brainmob)
var/turf/T = get_turf(src)
mmi.forceMove(T)
if(mind)
mind.transfer_to(mmi.brainmob)
mmi = null
src.name = "Spider-bot"
name = "Spider-bot"
update_icon()
/mob/living/simple_animal/spiderbot/Destroy()
eject_brain()
return ..()
/mob/living/simple_animal/spiderbot/New()
radio = new /obj/item/device/radio/borg(src)
camera = new /obj/machinery/camera(src)
camera.c_tag = "Spiderbot-[real_name]"
camera.network = list("SS13")
..()
/mob/living/simple_animal/spiderbot/death(gibbed)
if(camera)
camera.status = 0
if(held_item)
held_item.forceMove(src.loc)
held_item = null
..()
//Cannibalized from the parrot mob. ~Zuhayr
/mob/living/simple_animal/spiderbot/verb/drop_held_item()
set name = "Drop held item"
set category = "Spiderbot"
set desc = "Drop the item you're holding."
if(stat)
return
if(!held_item)
to_chat(usr, "<span class='warning'>You have nothing to drop!</span>")
return 0
if(istype(held_item, /obj/item/weapon/grenade))
visible_message("<span class='warning'>[src] launches \the [held_item]!</span>", "<span class='warning'>You launch \the [held_item]!</span>", "You hear a skittering noise and a thump!")
var/obj/item/weapon/grenade/G = held_item
G.loc = src.loc
G.prime()
held_item = null
return 1
visible_message("<span class='notice'>[src] drops \the [held_item]!</span>", "<span class='notice'>You drop \the [held_item]!</span>", "You hear a skittering noise and a soft thump.")
held_item.loc = src.loc
held_item = null
return 1
return
/mob/living/simple_animal/spiderbot/verb/get_item()
set name = "Pick up item"
set category = "Spiderbot"
set desc = "Allows you to take a nearby small item."
if(stat)
return -1
if(held_item)
to_chat(src, "<span class='warning'>You are already holding \the [held_item]</span>")
return 1
var/list/items = list()
for(var/obj/item/I in view(1,src))
if(I.loc != src && I.w_class <= WEIGHT_CLASS_SMALL)
items.Add(I)
var/obj/selection = input("Select an item.", "Pickup") in items
if(selection)
for(var/obj/item/I in view(1, src))
if(selection == I)
held_item = selection
selection.loc = src
visible_message("<span class='notice'>[src] scoops up \the [held_item]!</span>", "<span class='notice'>You grab \the [held_item]!</span>", "You hear a skittering noise and a clink.")
return held_item
to_chat(src, "<span class='warning'>\The [selection] is too far away.</span>")
return 0
to_chat(src, "<span class='warning'>There is nothing of interest to take.</span>")
return 0
/mob/living/simple_animal/spiderbot/examine(mob/user)
..(user)
if(src.held_item)
to_chat(user, "It is carrying \a [src.held_item] [bicon(src.held_item)].")
@@ -18,7 +18,7 @@
melee_damage_upper = 25
attacktext = "slashes"
speak_emote = list("hisses")
a_intent = I_HARM
a_intent = INTENT_HARM
attack_sound = 'sound/weapons/bladeslice.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
@@ -141,7 +141,7 @@
name = "lusty xenomorph maid"
melee_damage_lower = 0
melee_damage_upper = 0
a_intent = "help"
a_intent = INTENT_HELP
friendly = "caresses"
environment_smash = 0
icon_state = "maid"
@@ -98,10 +98,8 @@
/mob/living/simple_animal/hostile/proc/ListTargets()//Step 1, find out what we can see
. = list()
if(!search_objects)
var/list/Mobs = hearers(vision_range, targets_from) - src //Remove self, so we don't suicide
. += Mobs
. = hearers(vision_range, targets_from) - src //Remove self, so we don't suicide
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha, /obj/spacepod))
@@ -109,8 +107,7 @@
if(can_see(targets_from, HM, vision_range))
. += HM
else
var/list/Objects = oview(vision_range, targets_from)
. += Objects
. = oview(vision_range, targets_from)
/mob/living/simple_animal/hostile/proc/FindTarget(var/list/possible_targets, var/HasTargetsList = 0)//Step 2, filter down possible targets to things we actually care about
. = list()
@@ -7,7 +7,7 @@
icon_dead = "null"
melee_damage_lower = 5
melee_damage_upper = 5
a_intent = "harm"
a_intent = INTENT_HARM
attacktext = "gores"
maxHealth = 100
health = 100
@@ -5,7 +5,7 @@
desc = "Attack the weak point for massive damage."
health = 1000
maxHealth = 1000
a_intent = "harm"
a_intent = INTENT_HARM
sentience_type = SENTIENCE_BOSS
environment_smash = 3
luminosity = 3
@@ -228,4 +228,4 @@
/proc/ClearScore(client/player)
world.SetScores(player.ckey, "", global.medal_hub, global.medal_pass)
#undef MEDAL_PREFIX
#undef MEDAL_PREFIX
@@ -19,7 +19,7 @@
melee_damage_upper = 0
attacktext = "barrels into"
attack_sound = 'sound/weapons/punch1.ogg'
a_intent = I_HELP
a_intent = INTENT_HELP
speak_emote = list("screeches")
throw_message = "sinks in slowly, before being pushed out of "
status_flags = CANPUSH
@@ -203,9 +203,9 @@
reagents.reaction(C, INGEST, fraction)
reagents.trans_to(C, volume)
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood/proc/link_host(mob/living/carbon/human/H)
faction = list("\ref[src]", "\ref[H]") // Hostile to everyone except the host.
H.vessel.trans_to(src, 30)
/mob/living/simple_animal/hostile/asteroid/hivelordbrood/blood/proc/link_host(mob/living/carbon/C)
faction = list("\ref[src]", "\ref[C]") // Hostile to everyone except the host.
C.transfer_blood_to(src, 30)
color = mix_color_from_reagents(reagents.reagent_list)
// Legion
@@ -11,7 +11,7 @@
response_disarm = "shoves"
response_harm = "strikes"
status_flags = 0
a_intent = I_HARM
a_intent = INTENT_HARM
var/throw_message = "bounces off of"
var/icon_aggro = null // for swapping to when we get aggressive
see_in_dark = 8
@@ -68,7 +68,7 @@
melee_damage_lower = 12
melee_damage_upper = 12
attacktext = "bites into"
a_intent = I_HARM
a_intent = INTENT_HARM
speak_emote = list("chitters")
attack_sound = 'sound/weapons/bladeslice.ogg'
aggro_vision_range = 9

Some files were not shown because too many files have changed in this diff Show More