Skip to content

Commit

Permalink
Revert "Merge pull request Riesen#206 from Asd396/dismemberment"
Browse files Browse the repository at this point in the history
This reverts commit f75e77f, reversing
changes made to c296ff7.
  • Loading branch information
octareenroon91 committed Dec 12, 2015
1 parent da70e78 commit 810c893
Show file tree
Hide file tree
Showing 140 changed files with 928 additions and 3,614 deletions.
13 changes: 6 additions & 7 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@
#define FRIDAY_13TH "Friday the 13th"

//Human Overlays Indexes/////////
//#define SPECIES_LAYER 27 // mutantrace colors... these are on a seperate layer in order to prvent //Seems to be obsolete
#define SPECIES_LAYER 26 // mutantrace colors... these are on a seperate layer in order to prvent
#define BODY_BEHIND_LAYER 25
#define BODYPARTS_LAYER 24 //Originally 22. Moving to test if this fixes some shit
#define BODY_LAYER 23 //underwear, undershirts, socks, eyes, lips(makeup)
#define BODY_ADJ_LAYER 22
#define MUTATIONS_LAYER 21 //Tk headglows etc.
//#define AUGMENTS_LAYER 21 //Obsolete
#define BODY_LAYER 24 //underwear, undershirts, socks, eyes, lips(makeup)
#define BODY_ADJ_LAYER 23
#define MUTATIONS_LAYER 22 //Tk headglows etc.
#define AUGMENTS_LAYER 21
#define DAMAGE_LAYER 20 //damage indicators (cuts and burns)
#define UNIFORM_LAYER 19
#define ID_LAYER 18
Expand All @@ -50,7 +49,7 @@
#define R_HAND_LAYER 3 //Having the two hands seperate seems rather silly, merge them together? It'll allow for code to be reused on mobs with arbitarily many hands
#define BODY_FRONT_LAYER 2
#define FIRE_LAYER 1 //If you're on fire
#define TOTAL_LAYERS 25 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;
#define TOTAL_LAYERS 26 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_;

//Security levels
#define SEC_LEVEL_GREEN 0
Expand Down
16 changes: 0 additions & 16 deletions code/__DEFINES/organ.dm

This file was deleted.

18 changes: 0 additions & 18 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,6 @@
var/obj/mecha/M = loc
return M.click_action(A,src)

//This code checks if the mob's active hand actually exists. |- Ricotez
if(!active_hand_exists())
changeNext_move(CLICK_CD_MELEE) //I dont'really see much reason to use any other timing.
NoHandClickOn(A)
return

if(restrained())
changeNext_move(CLICK_CD_HANDCUFFED) //Doing shit in cuffs shall be vey slow
RestrainedClickOn(A)
Expand Down Expand Up @@ -172,18 +166,6 @@
/mob/proc/RestrainedClickOn(var/atom/A)
return

/*
NoHand ClickOn
Used when you are clicking with a hand you don't have.
*/
/mob/proc/NoHandClickOn(var/atom/A)
if(hand)
client << "You cannot use your left hand!"
else
client << "You cannot use your right hand!"
return

/*
Middle click
Only used for swapping hands
Expand Down
6 changes: 2 additions & 4 deletions code/_onclick/hud/action.dm
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,8 @@
/datum/action/organ_action/CheckRemoval(mob/living/carbon/user)
if(!iscarbon(user))
return 1
if(isinternalorgan(target))
var/obj/item/organ/internal/ORG = target
if(ORG.organdatum == user.get_organ(ORG.hardpoint))
return 0
if(target in user.internal_organs)
return 0
return 1

/datum/action/organ_action/IsAvailable()
Expand Down
26 changes: 0 additions & 26 deletions code/_onclick/hud/human.dm
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@


/datum/hud/proc/human_hud(ui_style = 'icons/mob/screen_midnight.dmi')
var/mob/living/carbon/mycarbon = null
if(istype(/mob/living/carbon, mymob)) //Quick check so we know if we can check the organsystem.
mycarbon = mymob

adding = list()
other = list()
hotkeybuttons = list() //These can be disabled for hotkey users
Expand Down Expand Up @@ -94,11 +90,6 @@
inv_box.icon_state = "hand_r_inactive"
if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "hand_r_active"
//If player has no right hand, we draw a nice X on it.
if(mycarbon && mycarbon.organsystem)
var/datum/organ/limb/limbdata = mycarbon.get_organ("r_arm")
if(!limbdata.exists())
inv_box.overlays += image("icons/mob/screen_gen.dmi", "x")
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
inv_box.layer = 19
Expand All @@ -111,11 +102,6 @@
inv_box.icon_state = "hand_l_inactive"
if(mymob && mymob.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "hand_l_active"
//If player has no left hand, we draw a nice X on it.
if(mycarbon && mycarbon.organsystem)
var/datum/organ/limb/limbdata = mycarbon.get_organ("l_arm")
if(!limbdata.exists())
inv_box.overlays += image("icons/mob/screen_gen.dmi", "x")
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
inv_box.layer = 19
Expand Down Expand Up @@ -211,12 +197,6 @@
inv_box.name = "gloves"
inv_box.icon = ui_style
inv_box.icon_state = "gloves"
//Only if both hands are missing do we draw the X.
if(mycarbon && mycarbon.organsystem)
var/datum/organ/limb/limbdata_left = mycarbon.get_organ("l_arm")
var/datum/organ/limb/limbdata_right = mycarbon.get_organ("r_arm")
if(!limbdata_left.exists() && !limbdata_right.exists())
inv_box.overlays += image("icons/mob/screen_gen.dmi", "x")
inv_box.screen_loc = ui_gloves
inv_box.slot_id = slot_gloves
inv_box.layer = 19
Expand Down Expand Up @@ -253,12 +233,6 @@
inv_box.name = "shoes"
inv_box.icon = ui_style
inv_box.icon_state = "shoes"
//Only if both feet are missing do we draw the X.
if(mycarbon && mycarbon.organsystem)
var/datum/organ/limb/limbdata_left = mycarbon.get_organ("l_leg")
var/datum/organ/limb/limbdata_right = mycarbon.get_organ("r_leg")
if(!limbdata_left.exists() && !limbdata_right.exists())
inv_box.overlays += image("icons/mob/screen_gen.dmi", "x")
inv_box.screen_loc = ui_shoes
inv_box.slot_id = slot_shoes
inv_box.layer = 19
Expand Down
8 changes: 1 addition & 7 deletions code/_onclick/item_attack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
visible_message("<span class='danger'>[attack_message]</span>",
"<span class='userdanger'>[attack_message]</span>")


// Proximity_flag is 1 if this afterattack was called on something adjacent, in your square, or on your person.
// Click parameters is the params string from byond Click() code, see that documentation.
/obj/item/proc/afterattack(atom/target, mob/user, proximity_flag, click_parameters)
Expand Down Expand Up @@ -74,13 +75,6 @@
//spawn(1800) // this wont work right
// M.lastattacker = null
/////////////////////////

if(!def_zone)
def_zone = user.zone_sel.selecting
if(!def_zone)
def_zone = ran_zone(def_zone)
def_zone = check_zone(def_zone)

M.attacked_by(src, user, def_zone)
add_fingerprint(user)
return 1
8 changes: 4 additions & 4 deletions code/_onclick/other_mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,12 @@
return
var/mob/living/carbon/ML = A
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/obj/item/organ/limb/affecting = null
if(ishuman(ML)) // why the hell is this not more general
dam_zone = ran_zone(dam_zone)
dam_zone = check_zone(dam_zone)
var/armor = ML.run_armor_check(dam_zone, "melee")
affecting = ML:get_organ(ran_zone(dam_zone))
var/armor = ML.run_armor_check(affecting, "melee")
if(prob(75))
ML.apply_damage(rand(1,3), BRUTE, dam_zone, armor)
ML.apply_damage(rand(1,3), BRUTE, affecting, armor)
ML.visible_message("<span class='danger'>[name] bites [ML]!</span>", \
"<span class='userdanger'>[name] bites [ML]!</span>")
if(armor >= 2) return
Expand Down
8 changes: 5 additions & 3 deletions code/datums/diseases/_disease.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
var/carrier = 0 //If our host is only a carrier
var/permeability_mod = 1
var/severity = NONTHREAT
var/list/required_organs = list() //I should probably turn this into a list of names
var/list/required_organs = list()

var/list/strain_data = list() //dna_spread special bullshit

Expand Down Expand Up @@ -166,8 +166,10 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
if(ishuman(affected_mob))
var/mob/living/carbon/human/H = affected_mob
for(var/obj/item/organ/O in required_organs)
if(!(H.exists(O.hardpoint)))
return
if(!locate(O) in H.organs)
if(!locate(O) in H.internal_organs)
cure()
return

SSdisease.processing += src

Expand Down
2 changes: 1 addition & 1 deletion code/datums/diseases/advance/symptoms/antivitiligo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ BONUS
return
switch(A.stage)
if(5)
H.set_skin_tone("african1")
H.skin_tone = "african1"
H.update_body(0)
else
H.visible_message("<span class='warning'>[H] looks a bit black.</span>", "<span class='notice'>You suddenly crave Fried Chicken.</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/datums/diseases/advance/symptoms/skin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ BONUS
return
switch(A.stage)
if(5)
H.set_skin_tone("albino")
H.skin_tone = "albino"
H.update_body(0)
else
H.visible_message("<span class='warning'>[H] looks a bit pale...</span>", "<span class='notice'>You look a bit pale...</span>")
Expand Down
5 changes: 1 addition & 4 deletions code/datums/diseases/appendicitis.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@
if(prob(5))
affected_mob.emote("cough")
if(2)
var/obj/item/organ/internal/appendix/A = null
var/datum/organ/internal/appendix/appendix = affected_mob.get_organ("appendix")
if(appendix && appendix.exists())
A = appendix.organitem
var/obj/item/organ/internal/appendix/A = affected_mob.getorgan(/obj/item/organ/internal/appendix)
if(A)
A.inflamed = 1
A.update_icon()
Expand Down
28 changes: 14 additions & 14 deletions code/datums/martial.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@
D.visible_message("<span class='warning'>[A] has attempted to [atk_verb] [D]!</span>")
return 0

var/zone = ran_zone(A.zone_sel.selecting)
zone = check_zone(zone)
var/armor_block = D.run_armor_check(zone, "melee")
var/obj/item/organ/limb/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
var/armor_block = D.run_armor_check(affecting, "melee")

if(A.dna)
playsound(D.loc, A.dna.species.attack_sound, 25, 1, -1)
Expand All @@ -58,7 +57,7 @@
D.visible_message("<span class='danger'>[A] has [atk_verb]ed [D]!</span>", \
"<span class='userdanger'>[A] has [atk_verb]ed [D]!</span>")

D.apply_damage(damage, BRUTE, zone, armor_block)
D.apply_damage(damage, BRUTE, affecting, armor_block)
if((D.stat != DEAD) && damage >= 9)
D.visible_message("<span class='danger'>[A] has weakened [D]!!</span>", \
"<span class='userdanger'>[A] has weakened [D]!</span>")
Expand Down Expand Up @@ -112,17 +111,17 @@
D.visible_message("<span class='warning'>[A] has attempted to hit [D] with a [atk_verb]!</span>")
return 0

var/zone = ran_zone(A.zone_sel.selecting)
zone = check_zone(zone)
var/armor_block = D.run_armor_check(zone, "melee")

var/obj/item/organ/limb/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
var/armor_block = D.run_armor_check(affecting, "melee")

playsound(D.loc, 'sound/weapons/punch1.ogg', 25, 1, -1)


D.visible_message("<span class='danger'>[A] has hit [D] with a [atk_verb]!</span>", \
"<span class='userdanger'>[A] has hit [D] with a [atk_verb]!</span>")

D.apply_damage(damage, STAMINA, zone, armor_block)
D.apply_damage(damage, STAMINA, affecting, armor_block)
if(D.getStaminaLoss() > 50)
var/knockout_prob = D.getStaminaLoss() + rand(-15,15)
if((D.stat != DEAD) && prob(knockout_prob))
Expand Down Expand Up @@ -180,10 +179,9 @@
D.grabbedby(A,1)
D.visible_message("<span class='danger'>[A] holds [D] down!</span>", \
"<span class='userdanger'>[A] holds [D] down!</span>")
var/zone = ran_zone(A.zone_sel.selecting)
zone = check_zone(zone)
var/armor_block = D.run_armor_check(zone, "melee")
D.apply_damage(10, STAMINA, zone, armor_block)
var/obj/item/organ/limb/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
var/armor_block = D.run_armor_check(affecting, "melee")
D.apply_damage(10, STAMINA, affecting, armor_block)
return 1

#define TORNADO_COMBO "HHD"
Expand Down Expand Up @@ -237,9 +235,11 @@
A.say("PLASMA FIST!")
D.visible_message("<span class='danger'>[A] has hit [D] with THE PLASMA FIST TECHNIQUE!</span>", \
"<span class='userdanger'>[A] has hit [D] with THE PLASMA FIST TECHNIQUE!</span>")
var/datum/organ/internal/brain/B = D.get_organ("brain")
var/obj/item/organ/internal/brain/B = D.getorgan(/obj/item/organ/internal/brain)
if(B)
B.dismember(ORGAN_REMOVED)
B.loc = get_turf(D)
B.transfer_identity(D)
D.internal_organs -= B
D.gib()
return

Expand Down
4 changes: 2 additions & 2 deletions code/datums/mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
if(src in owner.dna.mutations)
return 1
owner.dna.mutations.Add(src)
//gain_indication(owner)
gain_indication(owner)
owner << text_gain_indication

/datum/mutation/human/proc/gain_indication(mob/living/carbon/human/owner)
Expand Down Expand Up @@ -88,7 +88,7 @@

/datum/mutation/human/proc/on_losing(mob/living/carbon/human/owner)
if(owner && owner.dna.mutations.Remove(src))
//lose_indication(owner)
lose_indication(owner)
owner << text_lose_indication
return 0
return 1
Expand Down
15 changes: 7 additions & 8 deletions code/datums/spells/inflict_handler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,13 @@
if("gib")
target.gib()
if("gib_brain")
var/mob/living/carbon/C_target = null
if(iscarbon(target))
C_target = target

if(C_target.organsystem)
var/datum/organ/internal/brain/B = C_target.get_organ("brain")
if(B && B.exists())
B.dismember(ORGAN_REMOVED)
if(ishuman(target) || ismonkey(target))
var/mob/living/carbon/C_target = target
var/obj/item/organ/internal/brain/B = C_target.getorgan(/obj/item/organ/internal/brain)
if(B)
B.loc = get_turf(C_target)
B.transfer_identity(C_target)
C_target.internal_organs -= B
target.gib()
if("disintegrate")
target.dust()
Expand Down
2 changes: 1 addition & 1 deletion code/datums/spells/summonitem.dm
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
var/infinite_recursion = 0 //I don't want to know how someone could put something inside itself but these are wizards so let's be safe

if(!item_to_retrive.loc)
if(isinternalorgan(item_to_retrive)) // Organs are usually stored in nullspace
if(isorgan(item_to_retrive)) // Organs are usually stored in nullspace
var/obj/item/organ/internal/organ = item_to_retrive
if(organ.owner)
// If this code ever runs I will be happy
Expand Down
Loading

0 comments on commit 810c893

Please sign in to comment.