living carbon
This commit is contained in:
@@ -30,7 +30,6 @@
|
||||
unique_name = 1
|
||||
|
||||
var/static/regex/alien_name_regex = new("alien (larva|sentinel|drone|hunter|praetorian|queen)( \\(\\d+\\))?")
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/carbon/alien/Initialize()
|
||||
verbs += /mob/living/proc/mob_sleep
|
||||
|
||||
@@ -1,126 +1,126 @@
|
||||
|
||||
/mob/living/carbon/alien/get_eye_protection()
|
||||
return ..() + 2 //potential cyber implants + natural eye protection
|
||||
|
||||
/mob/living/carbon/alien/get_ear_protection()
|
||||
return 2 //no ears
|
||||
|
||||
/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush)
|
||||
|
||||
/mob/living/carbon/alien/get_eye_protection()
|
||||
return ..() + 2 //potential cyber implants + natural eye protection
|
||||
|
||||
/mob/living/carbon/alien/get_ear_protection()
|
||||
return 2 //no ears
|
||||
|
||||
/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush)
|
||||
..(AM, skipcatch = TRUE, hitpush = FALSE)
|
||||
|
||||
|
||||
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
|
||||
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
|
||||
In all, this is a lot like the monkey code. /N
|
||||
*/
|
||||
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M)
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
resting = 0
|
||||
AdjustStun(-60)
|
||||
AdjustKnockdown(-60)
|
||||
AdjustUnconscious(-60)
|
||||
AdjustSleeping(-100)
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake [p_them()] up!</span>")
|
||||
|
||||
if ("grab")
|
||||
grabbedby(M)
|
||||
|
||||
else
|
||||
if(health > 0)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
adjustBruteLoss(1)
|
||||
add_logs(M, src, "attacked")
|
||||
updatehealth()
|
||||
else
|
||||
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
return attack_alien(L)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M)
|
||||
if(..()) //to allow surgery to return properly.
|
||||
return 0
|
||||
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
help_shake_act(M)
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
if ("harm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
return 1
|
||||
if("disarm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_paw(mob/living/carbon/monkey/M)
|
||||
if(..())
|
||||
if (stat != DEAD)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
apply_damage(rand(1, 3), BRUTE, affecting)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
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)
|
||||
|
||||
/mob/living/carbon/alien/attack_slime(mob/living/simple_animal/slime/M)
|
||||
if(..()) //successful slime attack
|
||||
var/damage = rand(5, 35)
|
||||
if(M.is_adult)
|
||||
damage = rand(10, 40)
|
||||
adjustBruteLoss(damage)
|
||||
add_logs(M, src, "attacked")
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/ex_act(severity, target, origin)
|
||||
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
return
|
||||
..()
|
||||
switch (severity)
|
||||
if (1)
|
||||
gib()
|
||||
return
|
||||
|
||||
if (2)
|
||||
take_overall_damage(60, 60)
|
||||
adjustEarDamage(30,120)
|
||||
|
||||
if(3)
|
||||
take_overall_damage(30,0)
|
||||
if(prob(50))
|
||||
Unconscious(20)
|
||||
adjustEarDamage(15,60)
|
||||
|
||||
/mob/living/carbon/alien/soundbang_act(intensity = 1, stun_pwr = 20, damage_pwr = 5, deafen_pwr = 15)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/alien/acid_act(acidpwr, acid_volume)
|
||||
return 0//aliens are immune to acid.
|
||||
|
||||
|
||||
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
|
||||
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
|
||||
In all, this is a lot like the monkey code. /N
|
||||
*/
|
||||
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M)
|
||||
if(isturf(loc) && istype(loc.loc, /area/start))
|
||||
to_chat(M, "No attacking people at spawn, you jackass.")
|
||||
return
|
||||
|
||||
switch(M.a_intent)
|
||||
|
||||
if ("help")
|
||||
resting = 0
|
||||
AdjustStun(-60)
|
||||
AdjustKnockdown(-60)
|
||||
AdjustUnconscious(-60)
|
||||
AdjustSleeping(-100)
|
||||
visible_message("<span class='notice'>[M.name] nuzzles [src] trying to wake [p_them()] up!</span>")
|
||||
|
||||
if ("grab")
|
||||
grabbedby(M)
|
||||
|
||||
else
|
||||
if(health > 0)
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
|
||||
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
|
||||
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
|
||||
"<span class='userdanger'>[M.name] bites [src]!</span>", null, COMBAT_MESSAGE_RANGE)
|
||||
adjustBruteLoss(1)
|
||||
add_logs(M, src, "attacked")
|
||||
updatehealth()
|
||||
else
|
||||
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
return attack_alien(L)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_hand(mob/living/carbon/human/M)
|
||||
if(..()) //to allow surgery to return properly.
|
||||
return 0
|
||||
|
||||
switch(M.a_intent)
|
||||
if("help")
|
||||
help_shake_act(M)
|
||||
if("grab")
|
||||
grabbedby(M)
|
||||
if ("harm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
return 1
|
||||
if("disarm")
|
||||
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_paw(mob/living/carbon/monkey/M)
|
||||
if(..())
|
||||
if (stat != DEAD)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
apply_damage(rand(1, 3), BRUTE, affecting)
|
||||
|
||||
|
||||
/mob/living/carbon/alien/attack_animal(mob/living/simple_animal/M)
|
||||
. = ..()
|
||||
if(.)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
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)
|
||||
|
||||
/mob/living/carbon/alien/attack_slime(mob/living/simple_animal/slime/M)
|
||||
if(..()) //successful slime attack
|
||||
var/damage = rand(5, 35)
|
||||
if(M.is_adult)
|
||||
damage = rand(10, 40)
|
||||
adjustBruteLoss(damage)
|
||||
add_logs(M, src, "attacked")
|
||||
updatehealth()
|
||||
|
||||
/mob/living/carbon/alien/ex_act(severity, target, origin)
|
||||
if(origin && istype(origin, /datum/spacevine_mutation) && isvineimmune(src))
|
||||
return
|
||||
..()
|
||||
switch (severity)
|
||||
if (1)
|
||||
gib()
|
||||
return
|
||||
|
||||
if (2)
|
||||
take_overall_damage(60, 60)
|
||||
adjustEarDamage(30,120)
|
||||
|
||||
if(3)
|
||||
take_overall_damage(30,0)
|
||||
if(prob(50))
|
||||
Unconscious(20)
|
||||
adjustEarDamage(15,60)
|
||||
|
||||
/mob/living/carbon/alien/soundbang_act(intensity = 1, stun_pwr = 20, damage_pwr = 5, deafen_pwr = 15)
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/alien/acid_act(acidpwr, acid_volume)
|
||||
return 0//aliens are immune to acid.
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
..()
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/movement_delay()
|
||||
. = -1 //hunters are sanic
|
||||
. = -1 //hunters are sanic
|
||||
. += ..() //but they still need to slow down on stun
|
||||
|
||||
|
||||
|
||||
@@ -48,4 +48,4 @@
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='notice'>We already have an alive queen.</span>")
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -18,4 +18,4 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/sentinel/movement_delay()
|
||||
. = ..()
|
||||
. = ..()
|
||||
|
||||
@@ -20,4 +20,4 @@
|
||||
if(istype(node)) // just in case someone would ever add a diffirent node to hivenode slot
|
||||
node.queen_death()
|
||||
|
||||
return ..()
|
||||
return ..()
|
||||
@@ -41,7 +41,7 @@
|
||||
var/list/dat = list()
|
||||
dat += {"
|
||||
<HR>
|
||||
<B><FONT size=3>[name]</FONT></B>
|
||||
<span class='big bold'>[name]</span>
|
||||
<HR>"}
|
||||
for(var/i in 1 to held_items.len)
|
||||
var/obj/item/I = get_item_for_held_index(i)
|
||||
|
||||
@@ -65,4 +65,4 @@
|
||||
|
||||
/mob/living/carbon/alien/larva/stripPanelEquip(obj/item/what, mob/who)
|
||||
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
return
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
icon_state = "xgibmid2"
|
||||
var/list/alien_powers = list()
|
||||
|
||||
/obj/item/organ/alien/New()
|
||||
/obj/item/organ/alien/Initialize()
|
||||
. = ..()
|
||||
for(var/A in alien_powers)
|
||||
if(ispath(A))
|
||||
alien_powers -= A
|
||||
alien_powers += new A(src)
|
||||
..()
|
||||
|
||||
/obj/item/organ/alien/Insert(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
GLOB.carbon_list += src
|
||||
|
||||
/mob/living/carbon/Destroy()
|
||||
//This must be done first, so the mob ghosts correctly before DNA etc is nulled
|
||||
//This must be done first, so the mob ghosts correctly before DNA etc is nulled
|
||||
. = ..()
|
||||
|
||||
QDEL_LIST(internal_organs)
|
||||
@@ -365,16 +365,9 @@
|
||||
to_chat(src, "<span class='notice'>You successfully [cuff_break ? "break" : "remove"] [I].</span>")
|
||||
|
||||
if(cuff_break)
|
||||
. = !((I == handcuffed) || (I == legcuffed))
|
||||
qdel(I)
|
||||
if(I == handcuffed)
|
||||
handcuffed = null
|
||||
update_handcuffed()
|
||||
return
|
||||
else if(I == legcuffed)
|
||||
legcuffed = null
|
||||
update_inv_legcuffed()
|
||||
return
|
||||
return TRUE
|
||||
return
|
||||
|
||||
else
|
||||
if(I == handcuffed)
|
||||
@@ -518,7 +511,7 @@
|
||||
health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute
|
||||
update_stat()
|
||||
if(((maxHealth - total_burn) < HEALTH_THRESHOLD_DEAD) && stat == DEAD )
|
||||
become_husk()
|
||||
become_husk("burn")
|
||||
med_hud_set_health()
|
||||
|
||||
/mob/living/carbon/update_sight()
|
||||
|
||||
@@ -78,7 +78,6 @@
|
||||
send_item_attack_message(I, user, affecting.name)
|
||||
if(I.force)
|
||||
apply_damage(I.force, I.damtype, affecting)
|
||||
damage_clothes(I.force, I.damtype, "melee", affecting.body_zone)
|
||||
if(I.damtype == BRUTE && affecting.status == BODYPART_ORGANIC)
|
||||
if(prob(33))
|
||||
I.add_mob_blood(src)
|
||||
@@ -308,9 +307,13 @@
|
||||
if(prob(eyes.eye_damage - 20))
|
||||
if(!has_disability(DISABILITY_NEARSIGHT))
|
||||
to_chat(src, "<span class='warning'>Your eyes start to burn badly!</span>")
|
||||
become_nearsighted(EYE_DAMAGE)
|
||||
|
||||
else if(prob(eyes.eye_damage - 25))
|
||||
if(!has_disability(DISABILITY_BLIND))
|
||||
to_chat(src, "<span class='warning'>You can't see anything!</span>")
|
||||
become_blind(EYE_DAMAGE)
|
||||
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Your eyes are really starting to hurt. This can't be good for you!</span>")
|
||||
if(has_bane(BANE_LIGHT))
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
if(stat == SOFT_CRIT)
|
||||
. += SOFTCRIT_ADD_SLOWDOWN
|
||||
|
||||
|
||||
/mob/living/carbon/slip(knockdown_amount, obj/O, lube)
|
||||
if(movement_type & FLYING)
|
||||
return 0
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(H.dna && H.dna.species && (H.dna.features["wings"] != "None"))
|
||||
return TRUE
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/OpenWings()
|
||||
if(!dna || !dna.species)
|
||||
return
|
||||
|
||||
@@ -198,14 +198,13 @@
|
||||
msg += "[t_He] [t_is] plump and delicious looking - Like a fat little piggy. A tasty piggy.\n"
|
||||
else
|
||||
msg += "[t_He] [t_is] quite chubby.\n"
|
||||
|
||||
switch(disgust)
|
||||
if(DISGUST_LEVEL_GROSS to DISGUST_LEVEL_VERYGROSS)
|
||||
msg += "[t_He] looks a bit grossed out.\n"
|
||||
msg += "[t_He] look[p_s()] a bit grossed out.\n"
|
||||
if(DISGUST_LEVEL_VERYGROSS to DISGUST_LEVEL_DISGUSTED)
|
||||
msg += "[t_He] looks really grossed out.\n"
|
||||
msg += "[t_He] look[p_s()] really grossed out.\n"
|
||||
if(DISGUST_LEVEL_DISGUSTED to INFINITY)
|
||||
msg += "[t_He] looks disgusted.\n"
|
||||
msg += "[t_He] look[p_s()] extremely disgusted.\n"
|
||||
|
||||
if(blood_volume < BLOOD_VOLUME_SAFE)
|
||||
msg += "[t_He] [t_has] pale skin.\n"
|
||||
@@ -310,6 +309,7 @@
|
||||
R = find_record("name", perpname, GLOB.data_core.security)
|
||||
if(R)
|
||||
criminal = R.fields["criminal"]
|
||||
|
||||
msg += "<span class='deptradio'>Criminal status:</span> <a href='?src=[REF(src)];hud=s;status=1'>\[[criminal]\]</a>\n"
|
||||
msg += "<span class='deptradio'>Security record:</span> <a href='?src=[REF(src)];hud=s;view=1'>\[View\]</a> "
|
||||
msg += "<a href='?src=[REF(src)];hud=s;add_crime=1'>\[Add crime\]</a> "
|
||||
|
||||
@@ -264,7 +264,7 @@
|
||||
// Display a warning if the user mocks up
|
||||
to_chat(src, "<span class='warning'>You feel your [pocket_side] pocket being fumbled with!</span>")
|
||||
|
||||
..()
|
||||
..()
|
||||
|
||||
|
||||
///////HUDs///////
|
||||
@@ -577,8 +577,8 @@
|
||||
threatcount += 2
|
||||
|
||||
//Check for dresscode violations
|
||||
if(istype(head, /obj/item/clothing/head/wizard) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/wizard) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/syndi) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/shielded/syndi))
|
||||
threatcount += 6
|
||||
if(istype(head, /obj/item/clothing/head/wizard) || istype(head, /obj/item/clothing/head/helmet/space/hardsuit/wizard))
|
||||
threatcount += 2
|
||||
|
||||
//Check for nonhuman scum
|
||||
if(dna && dna.species.id && !(dna.species.id in list("human" , "lizard", "mammal", "avian", "aquatic", "insect")))
|
||||
@@ -590,7 +590,7 @@
|
||||
|
||||
//Agent cards lower threatlevel.
|
||||
if(istype(idcard, /obj/item/card/id/syndicate))
|
||||
threatcount -= 2
|
||||
threatcount -= 5
|
||||
|
||||
return threatcount
|
||||
|
||||
@@ -847,7 +847,8 @@
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/human/update_gravity(has_gravity,override = 0)
|
||||
override = dna.species.override_float
|
||||
if(dna && dna.species) //prevents a runtime while a human is being monkeyfied
|
||||
override = dna.species.override_float
|
||||
..()
|
||||
|
||||
/mob/living/carbon/human/vomit(lost_nutrition = 10, blood = 0, stun = 1, distance = 0, message = 1, toxic = 0)
|
||||
|
||||
@@ -44,7 +44,10 @@
|
||||
if(mind.martial_art && mind.martial_art.deflection_chance) //Some martial arts users can deflect projectiles!
|
||||
if(prob(mind.martial_art.deflection_chance))
|
||||
if(!lying && dna && !dna.check_mutation(HULK)) //But only if they're not lying down, and hulks can't do it
|
||||
visible_message("<span class='danger'>[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
|
||||
if(mind.martial_art.deflection_chance >= 100) //if they can NEVER be hit, lets clue sec in ;)
|
||||
visible_message("<span class='danger'>[src] deflects the projectile; [p_they()] can't be hit with ranged weapons!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>[src] deflects the projectile!</span>", "<span class='userdanger'>You deflect the projectile!</span>")
|
||||
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, 1)
|
||||
return 0
|
||||
|
||||
@@ -180,7 +183,6 @@
|
||||
visible_message("<span class='danger'>[message]</span>", \
|
||||
"<span class='userdanger'>[message]</span>")
|
||||
adjustBruteLoss(15)
|
||||
damage_clothes(15, BRUTE, "melee")
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/attack_hand(mob/user)
|
||||
@@ -200,7 +202,8 @@
|
||||
return 0
|
||||
|
||||
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stunned instead.
|
||||
if(dropItemToGround(get_active_held_item()))
|
||||
var/obj/item/I = get_active_held_item()
|
||||
if(I && dropItemToGround(I))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] disarmed [src]!</span>")
|
||||
@@ -221,7 +224,6 @@
|
||||
return 0
|
||||
if(stat != DEAD)
|
||||
apply_damage(damage, BRUTE, affecting, run_armor_check(affecting, "melee"))
|
||||
damage_clothes(damage, BRUTE, "melee", affecting.body_zone)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/attack_alien(mob/living/carbon/alien/humanoid/M)
|
||||
@@ -251,10 +253,10 @@
|
||||
if(!dismembering_strike(M, M.zone_selected)) //Dismemberment successful
|
||||
return 1
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
damage_clothes(damage, BRUTE, "melee", affecting.body_zone)
|
||||
|
||||
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stun instead.
|
||||
if(dropItemToGround(get_active_held_item()))
|
||||
var/obj/item/I = get_active_held_item()
|
||||
if(I && dropItemToGround(I))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||
visible_message("<span class='danger'>[M] disarmed [src]!</span>", \
|
||||
"<span class='userdanger'>[M] disarmed [src]!</span>")
|
||||
@@ -279,7 +281,6 @@
|
||||
affecting = get_bodypart("chest")
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
damage_clothes(damage, BRUTE, "melee", affecting.body_zone)
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_animal(mob/living/simple_animal/M)
|
||||
@@ -296,7 +297,6 @@
|
||||
affecting = get_bodypart("chest")
|
||||
var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration)
|
||||
apply_damage(damage, M.melee_damage_type, affecting, armor)
|
||||
damage_clothes(damage, M.melee_damage_type, "melee", affecting.body_zone)
|
||||
|
||||
|
||||
/mob/living/carbon/human/attack_slime(mob/living/simple_animal/slime/M)
|
||||
@@ -317,7 +317,6 @@
|
||||
affecting = get_bodypart("chest")
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
damage_clothes(damage, BRUTE, "melee", affecting.body_zone)
|
||||
|
||||
/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
|
||||
|
||||
@@ -335,11 +334,9 @@
|
||||
Unconscious(20)
|
||||
update |= temp.receive_damage(dmg, 0)
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
damage_clothes(dmg, BRUTE, "melee", temp.body_zone)
|
||||
if("fire")
|
||||
update |= temp.receive_damage(0, dmg)
|
||||
playsound(src, 'sound/items/welder.ogg', 50, 1)
|
||||
damage_clothes(dmg, BURN, "melee", temp.body_zone)
|
||||
if("tox")
|
||||
M.mech_toxin_damage(src)
|
||||
else
|
||||
@@ -374,6 +371,9 @@
|
||||
throw_at(throw_target, 200, 4)
|
||||
damage_clothes(400 - bomb_armor, BRUTE, "bomb")
|
||||
else
|
||||
for(var/I in contents)
|
||||
var/atom/A = I
|
||||
A.ex_act(severity)
|
||||
gib()
|
||||
return
|
||||
|
||||
|
||||
@@ -91,17 +91,6 @@
|
||||
return wear_id.GetID()
|
||||
|
||||
|
||||
/mob/living/carbon/human/abiotic(full_body = 0)
|
||||
var/abiotic_hands = FALSE
|
||||
for(var/obj/item/I in held_items)
|
||||
if(!(I.flags_1 & NODROP_1))
|
||||
abiotic_hands = TRUE
|
||||
break
|
||||
if(full_body && abiotic_hands && ((back && !(back.flags_1&NODROP_1)) || (wear_mask && !(wear_mask.flags_1&NODROP_1)) || (head && !(head.flags_1&NODROP_1)) || (shoes && !(shoes.flags_1&NODROP_1)) || (w_uniform && !(w_uniform.flags_1&NODROP_1)) || (wear_suit && !(wear_suit.flags_1&NODROP_1)) || (glasses && !(glasses.flags_1&NODROP_1)) || (ears && !(ears.flags_1&NODROP_1)) || (gloves && !(gloves.flags_1&NODROP_1)) ) )
|
||||
return TRUE
|
||||
return abiotic_hands
|
||||
|
||||
|
||||
/mob/living/carbon/human/IsAdvancedToolUser()
|
||||
if(has_disability(DISABILITY_MONKEYLIKE))
|
||||
return FALSE
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
. = 1
|
||||
|
||||
/mob/living/carbon/human/mob_negates_gravity()
|
||||
return ((shoes && shoes.negates_gravity()) || dna.species.negates_gravity(src))
|
||||
return ((shoes && shoes.negates_gravity()) || (dna.species.negates_gravity(src)))
|
||||
|
||||
/mob/living/carbon/human/Move(NewLoc, direct)
|
||||
. = ..()
|
||||
|
||||
@@ -1622,4 +1622,4 @@
|
||||
TRAITS |= TRAIT_ROBUST
|
||||
TRAITS |= TRAIT_SMART
|
||||
faction += "bot_power"
|
||||
. = ..()
|
||||
. = ..()
|
||||
|
||||
@@ -32,8 +32,7 @@
|
||||
handle_arousal()
|
||||
|
||||
if(..()) //not dead
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
HM.on_life(src)
|
||||
handle_active_genes()
|
||||
|
||||
if(stat != DEAD)
|
||||
//heart attack stuff
|
||||
@@ -97,19 +96,18 @@
|
||||
|
||||
failed_last_breath = 1
|
||||
|
||||
if(dna && dna.species)
|
||||
var/datum/species/S = dna.species
|
||||
var/datum/species/S = dna.species
|
||||
|
||||
if(S.breathid == "o2")
|
||||
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
else if(S.breathid == "tox")
|
||||
throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
|
||||
else if(S.breathid == "co2")
|
||||
throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
|
||||
else if(S.breathid == "n2")
|
||||
throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
|
||||
if(S.breathid == "o2")
|
||||
throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy)
|
||||
else if(S.breathid == "tox")
|
||||
throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox)
|
||||
else if(S.breathid == "co2")
|
||||
throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2)
|
||||
else if(S.breathid == "n2")
|
||||
throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro)
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
if(istype(L, /obj/item/organ/lungs))
|
||||
var/obj/item/organ/lungs/lun = L
|
||||
@@ -157,7 +155,7 @@
|
||||
//END FIRE CODE
|
||||
|
||||
|
||||
//This proc returns a number made up of the flags_1 for body parts which you are protected on. (such as HEAD, CHEST, GROIN, etc. See setup.dm for the full list)
|
||||
//This proc returns a number made up of the flags for body parts which you are protected on. (such as HEAD, CHEST, GROIN, etc. See setup.dm for the full list)
|
||||
/mob/living/carbon/human/proc/get_heat_protection_flags(temperature) //Temperature is the temperature you're being exposed to.
|
||||
var/thermal_protection_flags = 0
|
||||
//Handle normal clothing
|
||||
@@ -242,15 +240,14 @@
|
||||
/mob/living/carbon/human/proc/get_cold_protection(temperature)
|
||||
|
||||
if(dna.check_mutation(COLDRES))
|
||||
return 1 //Fully protected from the cold.
|
||||
|
||||
if(dna && (RESISTCOLD in dna.species.species_traits))
|
||||
return 1
|
||||
return TRUE //Fully protected from the cold.
|
||||
|
||||
if(istype(loc, /obj/item/device/dogborg/sleeper))
|
||||
return 1 //freezing to death in sleepers ruins fun.
|
||||
if(ismob(loc))
|
||||
return 1 //because lazy and being inside somemone insulates you from space
|
||||
if(RESISTCOLD in dna.species.species_traits)
|
||||
return TRUE
|
||||
|
||||
temperature = max(temperature, 2.7) //There is an occasional bug where the temperature is miscalculated in ares with a small amount of gas on them, so this is necessary to ensure that that bug does not affect this calculation. Space's temperature is 2.7K and most suits that are intended to protect against any cold, protect down to 2.0K.
|
||||
var/thermal_protection_flags = get_cold_protection_flags(temperature)
|
||||
@@ -347,6 +344,9 @@
|
||||
|
||||
heart.beating = !status
|
||||
|
||||
/mob/living/carbon/human/proc/handle_active_genes()
|
||||
for(var/datum/mutation/human/HM in dna.mutations)
|
||||
HM.on_life(src)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_heart()
|
||||
if(!can_heartattack())
|
||||
|
||||
@@ -29,8 +29,8 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
var/meat = /obj/item/reagent_containers/food/snacks/meat/slab/human //What the species drops on gibbing
|
||||
var/skinned_type
|
||||
var/liked_food = NONE
|
||||
var/disliked_food = NONE
|
||||
var/toxic_food = NONE
|
||||
var/disliked_food = GROSS
|
||||
var/toxic_food = TOXIC
|
||||
var/list/no_equip = list() // slots the race can't equip stuff to
|
||||
var/nojumpsuit = 0 // this is sorta... weird. it basically lets you equip stuff that usually needs jumpsuits without one, like belts and pockets and ids
|
||||
var/blacklisted = 0 //Flag to exclude from green slime core species.
|
||||
@@ -53,7 +53,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
var/damage_overlay_type = "human" //what kind of damage overlays (if any) appear on our species when wounded?
|
||||
var/fixed_mut_color = "" //to use MUTCOLOR with a fixed color that's independent of dna.feature["mcolor"]
|
||||
|
||||
// species flags_1. these can be found in flags_1.dm
|
||||
// species flags. these can be found in flags.dm
|
||||
var/list/species_traits = list()
|
||||
|
||||
var/attack_verb = "punch" // punch-specific attack verb
|
||||
@@ -130,7 +130,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
/datum/species/proc/copy_properties_from(datum/species/old_species)
|
||||
return
|
||||
|
||||
|
||||
//Please override this locally if you want to define when what species qualifies for what rank if human authority is enforced.
|
||||
/datum/species/proc/qualifies_for_rank(rank, list/features)
|
||||
if(rank in GLOB.command_positions)
|
||||
@@ -452,6 +451,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
var/list/standing = list()
|
||||
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
|
||||
|
||||
if(HD && !(H.has_disability(DISABILITY_HUSK)))
|
||||
// lipstick
|
||||
if(H.lip_style && (LIPS in species_traits))
|
||||
@@ -634,7 +634,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
var/image/I
|
||||
|
||||
for(var/layer in relevant_layers)
|
||||
for(var/layer in relevent_layers)
|
||||
var/layertext = mutant_bodyparts_layertext(layer)
|
||||
|
||||
for(var/bodypart in bodyparts_to_add)
|
||||
@@ -1092,7 +1092,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
/datum/species/proc/get_spans()
|
||||
return list()
|
||||
|
||||
/datum/species/proc/check_weakness(obj/item/weapon, mob/living/attacker)
|
||||
/datum/species/proc/check_weakness(obj/item, mob/living/attacker)
|
||||
return 0
|
||||
|
||||
////////
|
||||
@@ -1100,6 +1100,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
////////
|
||||
|
||||
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
|
||||
|
||||
//The fucking DISABILITY_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
|
||||
if(H.has_disability(DISABILITY_FAT))//I share your pain, past coder.
|
||||
if(H.overeatduration < 100)
|
||||
@@ -1477,7 +1478,6 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
var/weakness = H.check_weakness(I, user)
|
||||
apply_damage(I.force * weakness, I.damtype, def_zone, armor_block, H)
|
||||
H.damage_clothes(I.force, I.damtype, "melee", affecting.body_zone)
|
||||
|
||||
H.send_item_attack_message(I, user, hit_area)
|
||||
|
||||
|
||||
@@ -136,4 +136,4 @@
|
||||
H.movement_type &= ~FLYING
|
||||
override_float = FALSE
|
||||
H.pass_flags &= ~PASSTABLE
|
||||
H.CloseWings()
|
||||
H.CloseWings()
|
||||
@@ -16,4 +16,4 @@
|
||||
blacklisted = 1
|
||||
use_skintones = 0
|
||||
species_traits = list(SPECIES_ORGANIC,RADIMMUNE,VIRUSIMMUNE,NOBLOOD,PIERCEIMMUNE,EYECOLOR,NODISMEMBER,NOHUNGER)
|
||||
sexes = 0
|
||||
sexes = 0
|
||||
@@ -595,6 +595,7 @@
|
||||
H.adjustFireLoss(-4)
|
||||
H.reagents.remove_reagent(chem.id, REAGENTS_METABOLISM)
|
||||
|
||||
|
||||
/datum/species/golem/clockwork
|
||||
name = "Clockwork Golem"
|
||||
id = "clockwork golem"
|
||||
@@ -647,6 +648,7 @@
|
||||
dangerous_existence = TRUE
|
||||
random_eligible = FALSE
|
||||
|
||||
|
||||
/datum/species/golem/cloth
|
||||
name = "Cloth Golem"
|
||||
id = "cloth golem"
|
||||
|
||||
@@ -182,7 +182,9 @@
|
||||
var/mob/living/L = AM
|
||||
if(iscyborg(AM))
|
||||
var/mob/living/silicon/robot/borg = AM
|
||||
borg.update_headlamp(TRUE, 100)
|
||||
if(!borg.lamp_cooldown)
|
||||
borg.update_headlamp(TRUE, INFINITY)
|
||||
to_chat(borg, "<span class='danger'>Your headlamp is fried! You'll need a human to help replace it.</span>")
|
||||
else
|
||||
for(var/obj/item/O in AM)
|
||||
if(O.light_range && O.light_power)
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
amount = dna.species.spec_stun(src,amount)
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/cure_husk()
|
||||
/mob/living/carbon/human/cure_husk(list/sources)
|
||||
. = ..()
|
||||
if(.)
|
||||
update_hair()
|
||||
|
||||
/mob/living/carbon/human/become_husk()
|
||||
/mob/living/carbon/human/become_husk(source)
|
||||
if(istype(dna.species, /datum/species/skeleton)) //skeletons shouldn't be husks.
|
||||
cure_husk()
|
||||
return
|
||||
|
||||
@@ -1,142 +1,142 @@
|
||||
/mob/living/carbon/get_item_by_slot(slot_id)
|
||||
switch(slot_id)
|
||||
if(slot_back)
|
||||
return back
|
||||
if(slot_wear_mask)
|
||||
return wear_mask
|
||||
if(slot_neck)
|
||||
return wear_neck
|
||||
if(slot_head)
|
||||
return head
|
||||
if(slot_handcuffed)
|
||||
return handcuffed
|
||||
if(slot_legcuffed)
|
||||
return legcuffed
|
||||
return null
|
||||
|
||||
/mob/living/carbon/proc/equip_in_one_of_slots(obj/item/I, list/slots, qdel_on_fail = 1)
|
||||
for(var/slot in slots)
|
||||
if(equip_to_slot_if_possible(I, slots[slot], qdel_on_fail = 0, disable_warning = TRUE))
|
||||
return slot
|
||||
if(qdel_on_fail)
|
||||
qdel(I)
|
||||
return null
|
||||
|
||||
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
|
||||
/mob/living/carbon/equip_to_slot(obj/item/I, slot)
|
||||
if(!slot)
|
||||
return
|
||||
if(!istype(I))
|
||||
return
|
||||
|
||||
var/index = get_held_index_of_item(I)
|
||||
if(index)
|
||||
held_items[index] = null
|
||||
|
||||
if(I.pulledby)
|
||||
I.pulledby.stop_pulling()
|
||||
|
||||
I.screen_loc = null
|
||||
if(client)
|
||||
client.screen -= I
|
||||
if(observers && observers.len)
|
||||
for(var/M in observers)
|
||||
var/mob/dead/observe = M
|
||||
if(observe.client)
|
||||
observe.client.screen -= I
|
||||
/mob/living/carbon/get_item_by_slot(slot_id)
|
||||
switch(slot_id)
|
||||
if(slot_back)
|
||||
return back
|
||||
if(slot_wear_mask)
|
||||
return wear_mask
|
||||
if(slot_neck)
|
||||
return wear_neck
|
||||
if(slot_head)
|
||||
return head
|
||||
if(slot_handcuffed)
|
||||
return handcuffed
|
||||
if(slot_legcuffed)
|
||||
return legcuffed
|
||||
return null
|
||||
|
||||
/mob/living/carbon/proc/equip_in_one_of_slots(obj/item/I, list/slots, qdel_on_fail = 1)
|
||||
for(var/slot in slots)
|
||||
if(equip_to_slot_if_possible(I, slots[slot], qdel_on_fail = 0, disable_warning = TRUE))
|
||||
return slot
|
||||
if(qdel_on_fail)
|
||||
qdel(I)
|
||||
return null
|
||||
|
||||
//This is an UNSAFE proc. Use mob_can_equip() before calling this one! Or rather use equip_to_slot_if_possible() or advanced_equip_to_slot_if_possible()
|
||||
/mob/living/carbon/equip_to_slot(obj/item/I, slot)
|
||||
if(!slot)
|
||||
return
|
||||
if(!istype(I))
|
||||
return
|
||||
|
||||
var/index = get_held_index_of_item(I)
|
||||
if(index)
|
||||
held_items[index] = null
|
||||
|
||||
if(I.pulledby)
|
||||
I.pulledby.stop_pulling()
|
||||
|
||||
I.screen_loc = null
|
||||
if(client)
|
||||
client.screen -= I
|
||||
if(observers && observers.len)
|
||||
for(var/M in observers)
|
||||
var/mob/dead/observe = M
|
||||
if(observe.client)
|
||||
observe.client.screen -= I
|
||||
I.forceMove(src)
|
||||
I.layer = ABOVE_HUD_LAYER
|
||||
I.plane = ABOVE_HUD_PLANE
|
||||
I.appearance_flags |= NO_CLIENT_COLOR
|
||||
var/not_handled = FALSE
|
||||
switch(slot)
|
||||
if(slot_back)
|
||||
back = I
|
||||
update_inv_back()
|
||||
if(slot_wear_mask)
|
||||
wear_mask = I
|
||||
wear_mask_update(I, toggle_off = 0)
|
||||
if(slot_head)
|
||||
head = I
|
||||
head_update(I)
|
||||
if(slot_neck)
|
||||
wear_neck = I
|
||||
update_inv_neck(I)
|
||||
if(slot_handcuffed)
|
||||
handcuffed = I
|
||||
update_handcuffed()
|
||||
if(slot_legcuffed)
|
||||
legcuffed = I
|
||||
update_inv_legcuffed()
|
||||
if(slot_hands)
|
||||
put_in_hands(I)
|
||||
update_inv_hands()
|
||||
if(slot_in_backpack)
|
||||
var/obj/item/storage/B = back
|
||||
var/prev_jimmies = B.rustle_jimmies
|
||||
B.rustle_jimmies = FALSE //don't conspicously rustle
|
||||
B.handle_item_insertion(I, 1, src)
|
||||
B.rustle_jimmies = prev_jimmies
|
||||
else
|
||||
not_handled = TRUE
|
||||
|
||||
//Item has been handled at this point and equipped callback can be safely called
|
||||
//We cannot call it for items that have not been handled as they are not yet correctly
|
||||
//in a slot (handled further down inheritance chain, probably living/carbon/human/equip_to_slot
|
||||
if(!not_handled)
|
||||
I.equipped(src, slot)
|
||||
|
||||
return not_handled
|
||||
|
||||
/mob/living/carbon/doUnEquip(obj/item/I)
|
||||
. = ..() //Sets the default return value to what the parent returns.
|
||||
if(!. || !I) //We don't want to set anything to null if the parent returned 0.
|
||||
return
|
||||
|
||||
if(I == head)
|
||||
head = null
|
||||
I.layer = ABOVE_HUD_LAYER
|
||||
I.plane = ABOVE_HUD_PLANE
|
||||
I.appearance_flags |= NO_CLIENT_COLOR
|
||||
var/not_handled = FALSE
|
||||
switch(slot)
|
||||
if(slot_back)
|
||||
back = I
|
||||
update_inv_back()
|
||||
if(slot_wear_mask)
|
||||
wear_mask = I
|
||||
wear_mask_update(I, toggle_off = 0)
|
||||
if(slot_head)
|
||||
head = I
|
||||
head_update(I)
|
||||
if(slot_neck)
|
||||
wear_neck = I
|
||||
update_inv_neck(I)
|
||||
if(slot_handcuffed)
|
||||
handcuffed = I
|
||||
update_handcuffed()
|
||||
if(slot_legcuffed)
|
||||
legcuffed = I
|
||||
update_inv_legcuffed()
|
||||
if(slot_hands)
|
||||
put_in_hands(I)
|
||||
update_inv_hands()
|
||||
if(slot_in_backpack)
|
||||
var/obj/item/storage/B = back
|
||||
var/prev_jimmies = B.rustle_jimmies
|
||||
B.rustle_jimmies = FALSE //don't conspicously rustle
|
||||
B.handle_item_insertion(I, 1, src)
|
||||
B.rustle_jimmies = prev_jimmies
|
||||
else
|
||||
not_handled = TRUE
|
||||
|
||||
//Item has been handled at this point and equipped callback can be safely called
|
||||
//We cannot call it for items that have not been handled as they are not yet correctly
|
||||
//in a slot (handled further down inheritance chain, probably living/carbon/human/equip_to_slot
|
||||
if(!not_handled)
|
||||
I.equipped(src, slot)
|
||||
|
||||
return not_handled
|
||||
|
||||
/mob/living/carbon/doUnEquip(obj/item/I)
|
||||
. = ..() //Sets the default return value to what the parent returns.
|
||||
if(!. || !I) //We don't want to set anything to null if the parent returned 0.
|
||||
return
|
||||
|
||||
if(I == head)
|
||||
head = null
|
||||
if(!QDELETED(src))
|
||||
head_update(I)
|
||||
else if(I == back)
|
||||
back = null
|
||||
else if(I == back)
|
||||
back = null
|
||||
if(!QDELETED(src))
|
||||
update_inv_back()
|
||||
else if(I == wear_mask)
|
||||
wear_mask = null
|
||||
else if(I == wear_mask)
|
||||
wear_mask = null
|
||||
if(!QDELETED(src))
|
||||
wear_mask_update(I, toggle_off = 1)
|
||||
if(I == wear_neck)
|
||||
wear_neck = null
|
||||
if(I == wear_neck)
|
||||
wear_neck = null
|
||||
if(!QDELETED(src))
|
||||
update_inv_neck(I)
|
||||
else if(I == handcuffed)
|
||||
handcuffed = null
|
||||
if(buckled && buckled.buckle_requires_restraints)
|
||||
buckled.unbuckle_mob(src)
|
||||
else if(I == handcuffed)
|
||||
handcuffed = null
|
||||
if(buckled && buckled.buckle_requires_restraints)
|
||||
buckled.unbuckle_mob(src)
|
||||
if(!QDELETED(src))
|
||||
update_handcuffed()
|
||||
else if(I == legcuffed)
|
||||
legcuffed = null
|
||||
else if(I == legcuffed)
|
||||
legcuffed = null
|
||||
if(!QDELETED(src))
|
||||
update_inv_legcuffed()
|
||||
|
||||
//handle stuff to update when a mob equips/unequips a mask.
|
||||
/mob/living/proc/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
|
||||
update_inv_wear_mask()
|
||||
|
||||
/mob/living/carbon/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
|
||||
if(C.tint || initial(C.tint))
|
||||
update_tint()
|
||||
update_inv_wear_mask()
|
||||
|
||||
//handle stuff to update when a mob equips/unequips a headgear.
|
||||
/mob/living/carbon/proc/head_update(obj/item/I, forced)
|
||||
if(istype(I, /obj/item/clothing))
|
||||
var/obj/item/clothing/C = I
|
||||
if(C.tint || initial(C.tint))
|
||||
update_tint()
|
||||
update_sight()
|
||||
if(I.flags_inv & HIDEMASK || forced)
|
||||
update_inv_wear_mask()
|
||||
update_inv_head()
|
||||
|
||||
|
||||
//handle stuff to update when a mob equips/unequips a mask.
|
||||
/mob/living/proc/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
|
||||
update_inv_wear_mask()
|
||||
|
||||
/mob/living/carbon/wear_mask_update(obj/item/clothing/C, toggle_off = 1)
|
||||
if(C.tint || initial(C.tint))
|
||||
update_tint()
|
||||
update_inv_wear_mask()
|
||||
|
||||
//handle stuff to update when a mob equips/unequips a headgear.
|
||||
/mob/living/carbon/proc/head_update(obj/item/I, forced)
|
||||
if(istype(I, /obj/item/clothing))
|
||||
var/obj/item/clothing/C = I
|
||||
if(C.tint || initial(C.tint))
|
||||
update_tint()
|
||||
update_sight()
|
||||
if(I.flags_inv & HIDEMASK || forced)
|
||||
update_inv_wear_mask()
|
||||
update_inv_head()
|
||||
|
||||
|
||||
@@ -460,4 +460,4 @@
|
||||
death()
|
||||
var/obj/item/organ/brain/B = getorganslot(ORGAN_SLOT_BRAIN)
|
||||
if(B)
|
||||
B.damaged_brain = TRUE
|
||||
B.damaged_brain = TRUE
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
return FALSE
|
||||
|
||||
// WEAPONS
|
||||
if(istype(I, /obj/item/weapon))
|
||||
if(istype(I, /obj/item))
|
||||
var/obj/item/W = I
|
||||
if(W.force >= best_force)
|
||||
put_in_hands(W)
|
||||
@@ -153,7 +153,7 @@
|
||||
return TRUE
|
||||
|
||||
// have we been disarmed
|
||||
if(!locate(/obj/item/weapon) in held_items)
|
||||
if(!locate(/obj/item) in held_items)
|
||||
best_force = 0
|
||||
|
||||
if(restrained() || blacklistItems[pickupTarget] || (pickupTarget && (pickupTarget.flags_1 & NODROP_1)))
|
||||
@@ -391,7 +391,7 @@
|
||||
|
||||
// attack using a held weapon otherwise bite the enemy, then if we are angry there is a chance we might calm down a little
|
||||
/mob/living/carbon/monkey/proc/monkey_attack(mob/living/L)
|
||||
var/obj/item/Weapon = locate(/obj/item/weapon) in held_items
|
||||
var/obj/item/Weapon = locate(/obj/item) in held_items
|
||||
|
||||
// attack with weapon if we have one
|
||||
if(Weapon)
|
||||
|
||||
@@ -133,7 +133,6 @@
|
||||
|
||||
/mob/living/carbon/monkey/has_smoke_protection()
|
||||
if(wear_mask)
|
||||
|
||||
if(wear_mask.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1)
|
||||
return 1
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
butcher_results = list(/obj/item/reagent_containers/food/snacks/meat/slab/monkey = 5, /obj/item/stack/sheet/animalhide/monkey = 1)
|
||||
type_of_meat = /obj/item/reagent_containers/food/snacks/meat/slab/monkey
|
||||
gib_type = /obj/effect/decal/cleanable/blood/gibs
|
||||
unique_name = 1
|
||||
unique_name = TRUE
|
||||
bodyparts = list(/obj/item/bodypart/chest/monkey, /obj/item/bodypart/head/monkey, /obj/item/bodypart/l_arm/monkey,
|
||||
/obj/item/bodypart/r_arm/monkey, /obj/item/bodypart/r_leg/monkey, /obj/item/bodypart/l_leg/monkey)
|
||||
devourable = TRUE
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/Initialize()
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
if (bodytemperature < 283.222)
|
||||
. += (283.222 - bodytemperature) / 10 * 1.75
|
||||
|
||||
|
||||
var/static/config_monkey_delay
|
||||
if(isnull(config_monkey_delay))
|
||||
config_monkey_delay = CONFIG_GET(number/monkey_delay)
|
||||
@@ -89,13 +89,15 @@
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/IsAdvancedToolUser()//Unless its monkey mode monkeys cant use advanced tools
|
||||
return 0
|
||||
if(mind && is_monkey(mind))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/monkey/reagent_check(datum/reagent/R) //can metabolize all reagents
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/monkey/canBeHandcuffed()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/mob/living/carbon/monkey/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null)
|
||||
if(judgement_criteria & JUDGE_EMAGGED)
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
if(stat != DEAD)
|
||||
var/dmg = rand(1, 5)
|
||||
apply_damage(dmg, BRUTE, affecting)
|
||||
damage_clothes(dmg, BRUTE, "melee", affecting.body_zone)
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/attack_larva(mob/living/carbon/alien/larva/L)
|
||||
if(..()) //successful larva bite.
|
||||
@@ -29,7 +26,6 @@
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
damage_clothes(damage, BRUTE, "melee", affecting.body_zone)
|
||||
|
||||
/mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M)
|
||||
if(..()) //To allow surgery to return properly.
|
||||
@@ -58,7 +54,6 @@
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
damage_clothes(damage, BRUTE, "melee", affecting.body_zone)
|
||||
add_logs(M, src, "attacked")
|
||||
|
||||
else
|
||||
@@ -101,7 +96,6 @@
|
||||
if(!dismembering_strike(M, affecting.body_zone)) //Dismemberment successful
|
||||
return 1
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
damage_clothes(damage, BRUTE, "melee", affecting.body_zone)
|
||||
|
||||
else
|
||||
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
|
||||
@@ -136,9 +130,6 @@
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
apply_damage(damage, M.melee_damage_type, affecting)
|
||||
damage_clothes(damage, M.melee_damage_type, "melee", affecting.body_zone)
|
||||
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/attack_slime(mob/living/simple_animal/slime/M)
|
||||
if(..()) //successful slime attack
|
||||
@@ -152,21 +143,19 @@
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
damage_clothes(damage, BRUTE, "melee", affecting.body_zone)
|
||||
|
||||
|
||||
/mob/living/carbon/monkey/acid_act(acidpwr, acid_volume, bodyzone_hit)
|
||||
. = 1
|
||||
if(!bodyzone_hit || bodyzone_hit == "head")
|
||||
if(wear_mask)
|
||||
if(!(wear_mask.resistance_flags & UNACIDABLE))
|
||||
wear_mask.acid_act(acidpwr)
|
||||
wear_mask.acid_act(acidpwr, acid_volume)
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Your mask protects you from the acid.</span>")
|
||||
return
|
||||
if(head)
|
||||
if(!(head.resistance_flags & UNACIDABLE))
|
||||
head.acid_act(acidpwr)
|
||||
head.acid_act(acidpwr, acid_volume)
|
||||
else
|
||||
to_chat(src, "<span class='warning'>Your hat protects you from the acid.</span>")
|
||||
return
|
||||
|
||||
@@ -74,4 +74,4 @@
|
||||
file_data["relic_hat"] = head ? head.type : null
|
||||
file_data["relic_mask"] = wear_mask ? wear_mask.type : null
|
||||
fdel(json_file)
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
WRITE_FILE(json_file, json_encode(file_data))
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
if(T)
|
||||
. = T.could_speak_in_language(dt)
|
||||
else
|
||||
. = initial(dt.flags_1) & TONGUELESS_SPEECH
|
||||
. = initial(dt.flags) & TONGUELESS_SPEECH
|
||||
|
||||
/mob/living/carbon/Hear(message, atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
|
||||
if(!client)
|
||||
@@ -44,4 +44,4 @@
|
||||
for(var/T in get_traumas())
|
||||
var/datum/brain_trauma/trauma = T
|
||||
message = trauma.on_hear(message, speaker, message_language, raw_message, radio_freq)
|
||||
return ..()
|
||||
return ..()
|
||||
@@ -69,4 +69,10 @@
|
||||
no_vore = FALSE
|
||||
|
||||
/mob/living/simple_animal
|
||||
no_vore = TRUE
|
||||
no_vore = TRUE
|
||||
|
||||
/mob/living/carbon/alien
|
||||
devourable = TRUE
|
||||
|
||||
/mob/living/carbon/monkey
|
||||
devourable = TRUE
|
||||
Reference in New Issue
Block a user