mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 07:35:31 +01:00
Replaced display_name with name, worked on severing limbs and damage propagation.
This commit is contained in:
@@ -44,19 +44,18 @@
|
||||
else
|
||||
user << "This one seems particularly lifeless. Perhaps it will regain some of its luster later.."
|
||||
|
||||
/obj/item/organ/brain/removed(var/mob/living/target,var/mob/living/user)
|
||||
/obj/item/organ/brain/removed(var/mob/living/user)
|
||||
|
||||
..()
|
||||
|
||||
var/mob/living/simple_animal/borer/borer = target.has_brain_worms()
|
||||
var/mob/living/simple_animal/borer/borer = owner.has_brain_worms()
|
||||
|
||||
if(borer)
|
||||
borer.detatch() //Should remove borer if the brain is removed - RR
|
||||
|
||||
var/mob/living/carbon/human/H = target
|
||||
var/obj/item/organ/brain/B = src
|
||||
if(istype(B) && istype(H))
|
||||
B.transfer_identity(target)
|
||||
if(istype(B) && istype(owner))
|
||||
B.transfer_identity(owner)
|
||||
|
||||
/obj/item/organ/brain/replaced(var/mob/living/target)
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if (H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
H << "\red You can't use your [temp.display_name]"
|
||||
H << "\red You can't use your [temp.name]"
|
||||
return
|
||||
|
||||
for(var/datum/disease/D in viruses)
|
||||
@@ -187,7 +187,7 @@
|
||||
status = "weirdly shapen."
|
||||
if(status == "")
|
||||
status = "OK"
|
||||
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.display_name,status),1)
|
||||
src.show_message(text("\t []My [] is [].",status=="OK"?"\blue ":"\red ",org.name,status),1)
|
||||
if((SKELETON in H.mutations) && (!H.w_uniform) && (!H.wear_suit))
|
||||
H.play_xylophone()
|
||||
else if (on_fire)
|
||||
|
||||
@@ -6,12 +6,11 @@
|
||||
I.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
||||
|
||||
for(var/obj/item/organ/external/E in src.organs)
|
||||
if(istype(E, /obj/item/organ/external/chest))
|
||||
if(E.cannot_amputate)
|
||||
E.removed()
|
||||
del(E)
|
||||
continue
|
||||
// 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(1,1)
|
||||
E.droplimb()
|
||||
|
||||
..(species.gibbed_anim)
|
||||
gibs(loc, viruses, dna, null, species.flesh_color, species.blood_color)
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
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 [t_his] [o.display_name]!</span>\n"
|
||||
msg += "<span class='warning'>[t_He] [t_has] a splint on [t_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"
|
||||
@@ -254,30 +254,30 @@
|
||||
for(var/obj/item/organ/external/temp in organs)
|
||||
if(temp)
|
||||
if(temp.status & ORGAN_DESTROYED)
|
||||
is_destroyed["[temp.display_name]"] = 1
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'><b>[t_He] is missing [t_his] [temp.display_name].</b></span>\n"
|
||||
is_destroyed["[temp.name]"] = 1
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'><b>[t_He] is missing [t_his] [temp.name].</b></span>\n"
|
||||
continue
|
||||
if(temp.status & ORGAN_ROBOT)
|
||||
if(!(temp.brute_dam + temp.burn_dam))
|
||||
if(!species.flags & IS_SYNTHETIC)
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]!</span>\n"
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]!</span>\n"
|
||||
continue
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = "<span class='warning'>[t_He] has a robot [temp.display_name]. It has"
|
||||
wound_flavor_text["[temp.name]"] = "<span class='warning'>[t_He] has a robot [temp.name]. It has"
|
||||
if(temp.brute_dam) switch(temp.brute_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.display_name]"] += " some dents"
|
||||
wound_flavor_text["[temp.name]"] += " some dents"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.display_name]"] += pick(" a lot of dents"," severe denting")
|
||||
wound_flavor_text["[temp.name]"] += pick(" a lot of dents"," severe denting")
|
||||
if(temp.brute_dam && temp.burn_dam)
|
||||
wound_flavor_text["[temp.display_name]"] += " and"
|
||||
wound_flavor_text["[temp.name]"] += " and"
|
||||
if(temp.burn_dam) switch(temp.burn_dam)
|
||||
if(0 to 20)
|
||||
wound_flavor_text["[temp.display_name]"] += " some burns"
|
||||
wound_flavor_text["[temp.name]"] += " some burns"
|
||||
if(21 to INFINITY)
|
||||
wound_flavor_text["[temp.display_name]"] += pick(" a lot of burns"," severe melting")
|
||||
if(wound_flavor_text["[temp.display_name]"])
|
||||
wound_flavor_text["[temp.display_name]"] += "!</span>\n"
|
||||
wound_flavor_text["[temp.name]"] += pick(" a lot of burns"," severe melting")
|
||||
if(wound_flavor_text["[temp.name]"])
|
||||
wound_flavor_text["[temp.name]"] += "!</span>\n"
|
||||
else if(temp.wounds.len > 0)
|
||||
var/list/wound_descriptors = list()
|
||||
for(var/datum/wound/W in temp.wounds)
|
||||
@@ -325,14 +325,14 @@
|
||||
else if(flavor_text.len > 1 && text > 1)
|
||||
flavor_text_string += ","
|
||||
flavor_text_string += flavor_text[text]
|
||||
flavor_text_string += " on [t_his] [temp.display_name].</span><br>"
|
||||
wound_flavor_text["[temp.display_name]"] = flavor_text_string
|
||||
flavor_text_string += " on [t_his] [temp.name].</span><br>"
|
||||
wound_flavor_text["[temp.name]"] = flavor_text_string
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = ""
|
||||
wound_flavor_text["[temp.name]"] = ""
|
||||
if(temp.status & ORGAN_BLEEDING)
|
||||
is_bleeding["[temp.display_name]"] = 1
|
||||
is_bleeding["[temp.name]"] = 1
|
||||
else
|
||||
wound_flavor_text["[temp.display_name]"] = ""
|
||||
wound_flavor_text["[temp.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.
|
||||
|
||||
@@ -938,8 +938,6 @@
|
||||
O.status &= ~ORGAN_SPLINTED
|
||||
O.status &= ~ORGAN_CUT_AWAY
|
||||
O.status &= ~ORGAN_ATTACHABLE
|
||||
if (!O.amputated)
|
||||
O.status &= ~ORGAN_DESTROYED
|
||||
O.wounds.Cut()
|
||||
O.heal_damage(1000,1000,1,1)
|
||||
|
||||
@@ -1060,11 +1058,11 @@
|
||||
var/msg = null
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
msg ="<span class='warning'>A spike of pain jolts your [organ.display_name] as you bump [O] inside.</span>"
|
||||
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.display_name] painfully.</span>"
|
||||
msg ="<span class='warning'>Your movement jostles [O] in your [organ.name] painfully.</span>"
|
||||
if(3)
|
||||
msg ="<span class='warning'>[O] in your [organ.display_name] twists painfully as you move.</span>"
|
||||
msg ="<span class='warning'>[O] in your [organ.name] twists painfully as you move.</span>"
|
||||
src << msg
|
||||
|
||||
organ.take_damage(rand(1,3), 0, 0)
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
|
||||
if(H.hand)
|
||||
temp = H.organs_by_name["l_hand"]
|
||||
if(temp && !temp.is_usable())
|
||||
H << "\red You can't use your [temp.display_name]."
|
||||
if(!temp || !temp.is_usable())
|
||||
H << "\red You can't use your hand."
|
||||
return
|
||||
|
||||
..()
|
||||
@@ -100,6 +100,10 @@
|
||||
var/hit_zone = H.zone_sel.selecting
|
||||
var/obj/item/organ/external/affecting = get_organ(hit_zone)
|
||||
|
||||
if(!affecting || affecting.status & ORGAN_DESTROYED)
|
||||
M << "<span class='danger'>They are missing that limb!</span>"
|
||||
return
|
||||
|
||||
switch(src.a_intent)
|
||||
if("help")
|
||||
// We didn't see this coming, so we get the full blow
|
||||
@@ -157,7 +161,7 @@
|
||||
miss_type = 1
|
||||
|
||||
if(!miss_type && block)
|
||||
attack_message = "[H] went for [src]'s [affecting.display_name] but was blocked!"
|
||||
attack_message = "[H] went for [src]'s [affecting.name] but was blocked!"
|
||||
miss_type = 2
|
||||
|
||||
// See what attack they use
|
||||
|
||||
@@ -170,21 +170,21 @@
|
||||
if (candidates.len)
|
||||
var/obj/item/organ/external/O = pick(candidates)
|
||||
O.mutate()
|
||||
src << "<span class = 'notice'>Something is not right with your [O.display_name]...</span>"
|
||||
src << "<span class = 'notice'>Something is not right with your [O.name]...</span>"
|
||||
return
|
||||
else
|
||||
if (prob(heal_prob))
|
||||
for (var/obj/item/organ/external/O in organs)
|
||||
if (O.status & ORGAN_MUTATED)
|
||||
O.unmutate()
|
||||
src << "<span class = 'notice'>Your [O.display_name] is shaped normally again.</span>"
|
||||
src << "<span class = 'notice'>Your [O.name] is shaped normally again.</span>"
|
||||
return
|
||||
|
||||
if (getCloneLoss() < 1)
|
||||
for (var/obj/item/organ/external/O in organs)
|
||||
if (O.status & ORGAN_MUTATED)
|
||||
O.unmutate()
|
||||
src << "<span class = 'notice'>Your [O.display_name] is shaped normally again.</span>"
|
||||
src << "<span class = 'notice'>Your [O.name] is shaped normally again.</span>"
|
||||
BITSET(hud_updateflag, HEALTH_HUD)
|
||||
|
||||
// Defined here solely to take species flags into account without having to recast at mob/living level.
|
||||
|
||||
@@ -70,10 +70,10 @@ emp_act
|
||||
|
||||
u_equip(c_hand)
|
||||
if (affected.status & ORGAN_ROBOT)
|
||||
emote("me", 1, "drops what they were holding, their [affected.display_name] malfunctioning!")
|
||||
emote("me", 1, "drops what they were holding, their [affected.name] malfunctioning!")
|
||||
else
|
||||
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
|
||||
emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : emote_scream ]drops what they were holding in their [affected.display_name]!")
|
||||
emote("me", 1, "[(species && species.flags & NO_PAIN) ? "" : emote_scream ]drops what they were holding in their [affected.name]!")
|
||||
|
||||
..(stun_amount, agony_amount, def_zone)
|
||||
|
||||
@@ -189,12 +189,12 @@ emp_act
|
||||
return 0
|
||||
|
||||
var/obj/item/organ/external/affecting = get_organ(target_zone)
|
||||
if (!affecting)
|
||||
return 0
|
||||
if(affecting.status & ORGAN_DESTROYED)
|
||||
user << "What [affecting.display_name]?"
|
||||
return 0
|
||||
var/hit_area = affecting.display_name
|
||||
|
||||
if (!affecting || affecting.status & ORGAN_DESTROYED || istype(affecting, /obj/item/organ/external/stump))
|
||||
user << "<span class='danger'>They are missing that limb!</span>"
|
||||
return
|
||||
|
||||
var/hit_area = affecting.name
|
||||
|
||||
if((user != src) && check_shields(I.force, "the [I.name]"))
|
||||
return 0
|
||||
@@ -204,9 +204,9 @@ emp_act
|
||||
user << "\red That limb isn't robotic."
|
||||
return
|
||||
if(affecting.sabotaged)
|
||||
user << "\red [src]'s [affecting.display_name] is already sabotaged!"
|
||||
user << "\red [src]'s [affecting.name] is already sabotaged!"
|
||||
else
|
||||
user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.display_name] and short out the safeties."
|
||||
user << "\red You sneakily slide [I] into the dataport on [src]'s [affecting.name] and short out the safeties."
|
||||
var/obj/item/weapon/card/emag/emag = I
|
||||
emag.uses--
|
||||
affecting.sabotaged = 1
|
||||
@@ -328,7 +328,7 @@ emp_act
|
||||
return
|
||||
|
||||
var/obj/item/organ/external/affecting = get_organ(zone)
|
||||
var/hit_area = affecting.display_name
|
||||
var/hit_area = affecting.name
|
||||
|
||||
src.visible_message("\red [src] has been hit in the [hit_area] by [O].")
|
||||
var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") //I guess "melee" is the best fit here
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
//Moving around with fractured ribs won't do you any good
|
||||
if (E.is_broken() && E.internal_organs && prob(15))
|
||||
var/obj/item/organ/I = pick(E.internal_organs)
|
||||
custom_pain("You feel broken bones moving in your [E.display_name]!", 1)
|
||||
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
|
||||
|
||||
@@ -105,6 +105,20 @@
|
||||
"eyes" = /obj/item/organ/eyes
|
||||
)
|
||||
|
||||
var/list/has_limbs = list(
|
||||
/obj/item/organ/external/chest,
|
||||
/obj/item/organ/external/groin,
|
||||
/obj/item/organ/external/head,
|
||||
/obj/item/organ/external/arm,
|
||||
/obj/item/organ/external/arm/right,
|
||||
/obj/item/organ/external/leg,
|
||||
/obj/item/organ/external/leg/right,
|
||||
/obj/item/organ/external/hand,
|
||||
/obj/item/organ/external/hand/right,
|
||||
/obj/item/organ/external/foot,
|
||||
/obj/item/organ/external/foot/right
|
||||
)
|
||||
|
||||
/datum/species/New()
|
||||
if(hud_type)
|
||||
hud = new hud_type()
|
||||
@@ -156,18 +170,8 @@
|
||||
H.organs_by_name = list()
|
||||
H.internal_organs_by_name = list()
|
||||
|
||||
//This is a basic humanoid limb setup.
|
||||
H.organs_by_name["chest"] = new/obj/item/organ/external/chest(H)
|
||||
H.organs_by_name["groin"] = new/obj/item/organ/external/groin(H)
|
||||
H.organs_by_name["head"] = new/obj/item/organ/external/head(H)
|
||||
H.organs_by_name["l_arm"] = new/obj/item/organ/external/arm(H)
|
||||
H.organs_by_name["r_arm"] = new/obj/item/organ/external/arm/right(H)
|
||||
H.organs_by_name["r_leg"] = new/obj/item/organ/external/leg(H)
|
||||
H.organs_by_name["l_leg"] = new/obj/item/organ/external/leg/right(H)
|
||||
H.organs_by_name["l_hand"] = new/obj/item/organ/external/hand(H)
|
||||
H.organs_by_name["r_hand"] = new/obj/item/organ/external/hand/right(H)
|
||||
H.organs_by_name["l_foot"] = new/obj/item/organ/external/foot(H)
|
||||
H.organs_by_name["r_foot"] = new/obj/item/organ/external/foot/right(H)
|
||||
for(var/limb_type in has_limbs)
|
||||
new limb_type(H)
|
||||
|
||||
for(var/organ in has_organ)
|
||||
var/organ_type = has_organ[organ]
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
attack_damage = Clamp(attack_damage, 1, 5)
|
||||
|
||||
if(target == user)
|
||||
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] \himself in the [affecting.display_name]!</span>")
|
||||
user.visible_message("<span class='danger'>[user] [pick(attack_verb)] \himself in the [affecting.name]!</span>")
|
||||
return 0
|
||||
|
||||
switch(zone)
|
||||
@@ -47,9 +47,9 @@
|
||||
else
|
||||
// ----- BODY ----- //
|
||||
switch(attack_damage)
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.display_name]!</span>")
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.display_name]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] [pick("deep into", "into", "across")] [target]'s [affecting.display_name]!</span>")
|
||||
if(1 to 2) user.visible_message("<span class='danger'>[user] scratched [target]'s [affecting.name]!</span>")
|
||||
if(3 to 4) user.visible_message("<span class='danger'>[user] [pick(attack_verb)] [pick("", "", "the side of")] [target]'s [affecting.name]!</span>")
|
||||
if(5) user.visible_message("<span class='danger'>[user] tears \his [pick(attack_noun)] [pick("deep into", "into", "across")] [target]'s [affecting.name]!</span>")
|
||||
|
||||
/datum/unarmed_attack/claws/strong
|
||||
attack_verb = list("slashed")
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
if (E.status & ORGAN_BROKEN)
|
||||
if (prob(mend_prob))
|
||||
if (E.mend_fracture())
|
||||
H << "<span class='alium'>You feel something mend itself inside your [E.display_name].</span>"
|
||||
H << "<span class='alium'>You feel something mend itself inside your [E.name].</span>"
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
|
||||
/datum/unarmed_attack/proc/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
var/obj/item/organ/external/affecting = target.get_organ(zone)
|
||||
user.visible_message("<span class='warning'>[user] [pick(attack_verb)] [target] in the [affecting.display_name]!</span>")
|
||||
user.visible_message("<span class='warning'>[user] [pick(attack_verb)] [target] in the [affecting.name]!</span>")
|
||||
playsound(user.loc, attack_sound, 25, 1, -1)
|
||||
|
||||
/datum/unarmed_attack/bite
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
/datum/unarmed_attack/punch/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
var/obj/item/organ/external/affecting = target.get_organ(zone)
|
||||
var/organ = affecting.display_name
|
||||
var/organ = affecting.name
|
||||
|
||||
attack_damage = Clamp(attack_damage, 1, 5) // We expect damage input of 1 to 5 for this proc. But we leave this check juuust in case.
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
|
||||
/datum/unarmed_attack/kick/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
var/obj/item/organ/external/affecting = target.get_organ(zone)
|
||||
var/organ = affecting.display_name
|
||||
var/organ = affecting.name
|
||||
|
||||
attack_damage = Clamp(attack_damage, 1, 5)
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
/datum/unarmed_attack/stomp/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
var/obj/item/organ/external/affecting = target.get_organ(zone)
|
||||
var/organ = affecting.display_name
|
||||
var/organ = affecting.name
|
||||
var/obj/item/clothing/shoes = user.shoes
|
||||
|
||||
attack_damage = Clamp(attack_damage, 1, 5)
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
for(var/obj/item/organ/external/organ in M.organs)
|
||||
if (!organ)
|
||||
continue
|
||||
if((organ.status & ORGAN_DESTROYED) && !organ.amputated)
|
||||
if(istype(organ, /obj/item/organ/external/stump))
|
||||
src.traumatic_shock += 60
|
||||
else if(organ.status & ORGAN_BROKEN || organ.open)
|
||||
src.traumatic_shock += 30
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
if(length(damaged)>0)
|
||||
for(var/obj/item/organ/external/org in damaged)
|
||||
user.show_message(text("\blue \t []: [] - []", \
|
||||
capitalize(org.display_name), \
|
||||
capitalize(org.name), \
|
||||
(org.brute_dam > 0) ? "\red [org.brute_dam]" :0, \
|
||||
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" :0),1)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user