mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 23:17:28 +01:00
More work on adjusting/tweaking/fixing the limb port to make it functional.
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
/mob/living/carbon/human/gib()
|
||||
|
||||
for(var/obj/item/organ/I in internal_organs)
|
||||
var/obj/item/organ/current_organ = I.remove()
|
||||
if(current_organ)
|
||||
if(istype(loc,/turf))
|
||||
current_organ.throw_at(get_edge_target_turf(src,pick(alldirs)),rand(1,3),30)
|
||||
current_organ.removed(src)
|
||||
I.removed()
|
||||
if(istype(loc,/turf))
|
||||
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))
|
||||
|
||||
@@ -64,10 +64,11 @@
|
||||
|
||||
for (var/organ in list("l_leg","l_foot","r_leg","r_foot"))
|
||||
var/obj/item/organ/external/E = organs_by_name[organ]
|
||||
if (E.status & ORGAN_DESTROYED)
|
||||
stance_damage += 2 // let it fail even if just foot&leg
|
||||
else if (E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)) || !E.is_usable())
|
||||
stance_damage += 1
|
||||
if(E)
|
||||
if (E.status & ORGAN_DESTROYED)
|
||||
stance_damage += 2 // let it fail even if just foot&leg
|
||||
else if (E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)) || !E.is_usable())
|
||||
stance_damage += 1
|
||||
|
||||
// Canes and crutches help you stand (if the latter is ever added)
|
||||
// One cane mitigates a broken leg+foot, or a missing foot.
|
||||
|
||||
@@ -142,7 +142,10 @@
|
||||
|
||||
/datum/species/proc/create_organs(var/mob/living/carbon/human/H) //Handles creation of mob organs.
|
||||
|
||||
//Trying to work out why species changes aren't fixing organs properly.
|
||||
for(var/obj/item/organ/organ in H.contents)
|
||||
if((organ in H.organs) || (organ in H.internal_organs))
|
||||
del(organ)
|
||||
|
||||
if(H.organs) H.organs.Cut()
|
||||
if(H.internal_organs) H.internal_organs.Cut()
|
||||
if(H.organs_by_name) H.organs_by_name.Cut()
|
||||
|
||||
@@ -593,7 +593,7 @@ var/list/slot_equipment_priority = list( \
|
||||
if(H.health - H.halloss <= config.health_threshold_softcrit)
|
||||
for(var/name in H.organs_by_name)
|
||||
var/obj/item/organ/external/e = H.organs_by_name[name]
|
||||
if(H.lying)
|
||||
if(e && H.lying)
|
||||
if(((e.status & ORGAN_BROKEN && !(e.status & ORGAN_SPLINTED)) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
|
||||
return 1
|
||||
break
|
||||
|
||||
@@ -226,29 +226,29 @@ var/list/organ_cache = list()
|
||||
take_damage(10,0)
|
||||
return
|
||||
|
||||
/obj/item/organ/proc/removed(var/mob/living/carbon/human/target,var/mob/living/user)
|
||||
/obj/item/organ/proc/removed(var/mob/living/user)
|
||||
|
||||
if(!istype(target))
|
||||
if(!istype(owner))
|
||||
return
|
||||
|
||||
target.internal_organs_by_name[organ_tag] = null
|
||||
target.internal_organs_by_name -= organ_tag
|
||||
target.internal_organs -= src
|
||||
owner.internal_organs_by_name[organ_tag] = null
|
||||
owner.internal_organs_by_name -= organ_tag
|
||||
owner.internal_organs -= src
|
||||
|
||||
var/obj/item/organ/external/affected = target.get_organ(parent_organ)
|
||||
affected.internal_organs -= src
|
||||
var/obj/item/organ/external/affected = owner.get_organ(parent_organ)
|
||||
if(affected) affected.internal_organs -= src
|
||||
|
||||
loc = target.loc
|
||||
loc = owner.loc
|
||||
rejecting = null
|
||||
var/datum/reagent/blood/organ_blood = locate(/datum/reagent/blood) in reagents.reagent_list
|
||||
if(!organ_blood || !organ_blood.data["blood_DNA"])
|
||||
target.vessel.trans_to(src, 5, 1, 1)
|
||||
owner.vessel.trans_to(src, 5, 1, 1)
|
||||
|
||||
if(target && user && vital)
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
target.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [target.name] ([target.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
target.death()
|
||||
if(owner && user && vital)
|
||||
user.attack_log += "\[[time_stamp()]\]<font color='red'> removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
owner.attack_log += "\[[time_stamp()]\]<font color='orange'> had a vital organ ([src]) removed by [user.name] ([user.ckey]) (INTENT: [uppertext(user.a_intent)])</font>"
|
||||
msg_admin_attack("[user.name] ([user.ckey]) removed a vital organ ([src]) from [owner.name] ([owner.ckey]) (INTENT: [uppertext(user.a_intent)]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
owner.death()
|
||||
|
||||
/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target,var/obj/item/organ/external/affected)
|
||||
|
||||
@@ -314,10 +314,3 @@ var/list/organ_cache = list()
|
||||
if(!robotic && user.a_intent == "help" && user.zone_sel.selecting == "mouth")
|
||||
bitten(user)
|
||||
return
|
||||
|
||||
/obj/item/organ/proc/remove(var/mob/user)
|
||||
if(user)
|
||||
src.loc = get_turf(user)
|
||||
else
|
||||
src.loc = get_turf(owner)
|
||||
return src
|
||||
|
||||
@@ -107,14 +107,14 @@
|
||||
organ_tag = "brain"
|
||||
desc = "A disgusting space slug."
|
||||
|
||||
/obj/item/organ/borer/removed(var/mob/living/target,var/mob/living/user)
|
||||
/obj/item/organ/borer/removed(var/mob/living/user)
|
||||
|
||||
..()
|
||||
|
||||
var/mob/living/simple_animal/borer/B = target.has_brain_worms()
|
||||
var/mob/living/simple_animal/borer/B = owner.has_brain_worms()
|
||||
if(B)
|
||||
B.leave_host()
|
||||
B.ckey = target.ckey
|
||||
B.ckey = owner.ckey
|
||||
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
var/list/obj/item/organ/external/children
|
||||
|
||||
// Internal organs of this body part
|
||||
var/list/obj/item/organ/internal_organs
|
||||
var/list/internal_organs = list()
|
||||
|
||||
var/damage_msg = "\red You feel an intense pain"
|
||||
var/broken_description
|
||||
@@ -620,7 +620,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
if(parent)
|
||||
parent.children -= src
|
||||
src.removed(owner)
|
||||
src.removed()
|
||||
|
||||
if(parent)
|
||||
spawn(1)
|
||||
@@ -808,7 +808,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
H.drop_item()
|
||||
W.loc = owner
|
||||
|
||||
/obj/item/organ/external/removed(var/mob/living/user)
|
||||
/obj/item/organ/external/removed()
|
||||
|
||||
var/is_robotic = status & ORGAN_ROBOT
|
||||
..()
|
||||
@@ -823,12 +823,12 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
// Attached organs also fly off.
|
||||
for(var/obj/item/organ/external/O in children)
|
||||
O.removed(owner)
|
||||
O.removed()
|
||||
O.loc = src //TODO: generate entire limb icons from contents.
|
||||
|
||||
// Grab all the internal giblets too.
|
||||
for(var/obj/item/organ/organ in internal_organs)
|
||||
organ.removed(user)
|
||||
organ.removed()
|
||||
organ.loc = src
|
||||
|
||||
release_restraints()
|
||||
|
||||
@@ -105,14 +105,14 @@
|
||||
current_user = user
|
||||
user.visible_message("[user] begins to draw back the string of [src].","<span class='notice'>You begin to draw back the string of [src].</span>")
|
||||
tension = 1
|
||||
|
||||
|
||||
while(bolt && tension && current_user == user)
|
||||
if(!do_after(user, 25)) //crossbow strings don't just magically pull back on their own.
|
||||
user.visible_message("[usr] stops drawing and relaxes the string of [src].","<span class='warning'>You stop drawing back and relax the string of [src].</span>")
|
||||
tension = 0
|
||||
icon_state = "crossbow"
|
||||
return
|
||||
|
||||
|
||||
tension++
|
||||
icon_state = "crossbow-drawn"
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
tension = max_tension
|
||||
usr << "[src] clunks as you draw the string to its maximum tension!"
|
||||
return
|
||||
|
||||
|
||||
user.visible_message("[usr] draws back the string of [src]!","<span class='notice'>You continue drawing back the string of [src]!</span>")
|
||||
|
||||
/obj/item/weapon/gun/launcher/crossbow/proc/increase_tension(var/mob/user as mob)
|
||||
|
||||
@@ -304,12 +304,9 @@
|
||||
|
||||
// Extract the organ!
|
||||
if(target.op_stage.current_organ)
|
||||
var/obj/item/organ/I = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
var/obj/item/organ/O
|
||||
if(I && istype(I))
|
||||
O = I.remove(user)
|
||||
if(O && istype(O))
|
||||
O.removed(target,user)
|
||||
var/obj/item/organ/O = target.internal_organs_by_name[target.op_stage.current_organ]
|
||||
if(O && istype(O))
|
||||
O.removed(user)
|
||||
target.op_stage.current_organ = null
|
||||
|
||||
fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
|
||||
|
||||
Reference in New Issue
Block a user