Carbon Dismemberment , second attempt. (#20461)

* - I rearranged X_defense.dm mob files, more damage_procs.dm.Here's what's inside:
* X_defense.dm: is for the procs of attacks onto the mob, all the XXX_act() proc (things happening to the mob), as well as protection check and get procs (armor, ear prot, projectile dismemberment)
* damage_procs.dm: actual damage procs like adjustBruteLoss() getfireloss, any proc that handles damaging.

- some bugfixes with gibspawner effects.
- monkey's bodyparts can be dismembered and are used to create its icon.
- brains are no longer carbons.
- all carbon have bodyparts that can be dropped when the mob is gibbed.
- adminspawned bodyparts now have a default icon.
- robotic parts are now a child of bodyparts.
- health analyzer on alien/monkey shows damage on each limb
- added admin option to add/remove bodyparts for all carbon (instead of just remove on humans)
- Fixes keycheck message spam for janicart and all when trying to move.
- Fixes bug with buckling to a scooter while limbless.
- removed arg "hit_zone" in proj's on_hit() because we can already use the def_zone var (where hit_zone got its value)
- Fixes mob not getting any damage when hit by a projectile on their missing limb, despite a hit message shown). carbon/apply_damage() now when we specify a def_zone and the corresponding BP is missing we default to the chest instead of stopping the proc. Consistently with how human/attacked_by() default to its attack to chest if missing limb.
- Fixes mini uzi icon when empty and no mag (typo).
- I renamed and changed a bit check_eye_prot and ear prot
- renamed flash_eyes to flash_act()
- I made a soundbang_act() similar to flash_act but for loud bangs.
- added a gib and dust animation to larva.
- husked monkeys
- no damage overlay for husk or skeleton.
- damage overlay for robotic limb now.
- no damage overlay when organic bodypart husked.
- one handed human with a bloody hand still get a bloody single hand overlay.
- fix admin heal being unable to heal robotic bodyparts.
- slightly touched robotic bodypart sprites (head one pixel too high)
- Fixes 18532 "beheaded husk has hair".
- Fixes 18584 "Ling stasis appearance bug"
- no more eyes or lipstick on husks.
- can remove flashes/wires/cells from robot chest and head with crowbar.
- Fixes not being able to surgically amputate robotic arm/leg.

* More merge conflict fixes and adding the new files I forgot to add.

* of course I forgot birdstation

* More typos and stuff I forgot to undo.

* Fixing a typo in examine.dm
Removing an unnecessary check.
Making admin heal regenerate limbs on all carbons.
Monkey-human transformation now transfer missing limbs info and presence of a cavity implant.
NODISMEMBER species can still lack a limb if the mob lacked a limb and changed into that new species.
Changeling Regenerate ability now also regenerate limbs when in monkey form. (and remove some cryptic useless code)

* Fixing more conflicts with remie's multihands PR.

* Fixes runtime with hud when calling build_hand_slots().
Fixes lightgeist healing not working.
Fixes null.handle_fall() runtimes with pirate mobs.
Fixes typo in has_left_hadn() and has_right_hand().

* Derp, forgot to remove debug message.
This commit is contained in:
phil235
2016-09-12 19:33:50 +02:00
committed by AnturK
parent 2a58dd54a9
commit 443a4501ec
234 changed files with 4926 additions and 4116 deletions
@@ -150,7 +150,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/bilk/on_mob_life(mob/living/M)
if(M.getBruteLoss() && prob(10))
M.heal_organ_damage(1,0, 0)
M.heal_bodypart_damage(1,0, 0)
. = 1
return ..() || .
@@ -681,7 +681,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/bananahonk/on_mob_life(mob/living/M)
if( ( istype(M, /mob/living/carbon/human) && M.job in list("Clown") ) || istype(M, /mob/living/carbon/monkey) )
M.heal_organ_damage(1,1, 0)
M.heal_bodypart_damage(1,1, 0)
. = 1
return ..() || .
@@ -695,7 +695,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
/datum/reagent/consumable/ethanol/silencer/on_mob_life(mob/living/M)
if(istype(M, /mob/living/carbon/human) && M.job in list("Mime"))
M.heal_organ_damage(1,1)
M.heal_bodypart_damage(1,1)
. = 1
return ..() || .
@@ -24,7 +24,7 @@
/datum/reagent/consumable/tomatojuice/on_mob_life(mob/living/M)
if(M.getFireLoss() && prob(20))
M.heal_organ_damage(0,1, 0)
M.heal_bodypart_damage(0,1, 0)
. = 1
..()
@@ -95,7 +95,7 @@
/datum/reagent/consumable/banana/on_mob_life(mob/living/M)
if( ( istype(M, /mob/living/carbon/human) && M.job in list("Clown") ) || istype(M, /mob/living/carbon/monkey) )
M.heal_organ_damage(1,1, 0)
M.heal_bodypart_damage(1,1, 0)
. = 1
..()
@@ -106,7 +106,7 @@
/datum/reagent/consumable/nothing/on_mob_life(mob/living/M)
if(istype(M, /mob/living/carbon/human) && M.job in list("Mime"))
M.heal_organ_damage(1,1, 0)
M.heal_bodypart_damage(1,1, 0)
. = 1
..()
@@ -155,13 +155,13 @@
/datum/reagent/consumable/milk/on_mob_life(mob/living/M)
if(M.getBruteLoss() && prob(20))
M.heal_organ_damage(1,0, 0)
M.heal_bodypart_damage(1,0, 0)
. = 1
if(holder.has_reagent("capsaicin"))
holder.remove_reagent("capsaicin", 2)
var/datum/dna/Mdna = M.has_dna()
if(Mdna && Mdna.species && (Mdna.species.id == "plasmaman" || Mdna.species.id == "skeleton"))
M.heal_organ_damage(1,0, 0)
M.heal_bodypart_damage(1,0, 0)
. = 1
..()
@@ -173,7 +173,7 @@
/datum/reagent/consumable/soymilk/on_mob_life(mob/living/M)
if(M.getBruteLoss() && prob(20))
M.heal_organ_damage(1,0, 0)
M.heal_bodypart_damage(1,0, 0)
. = 1
..()
@@ -185,7 +185,7 @@
/datum/reagent/consumable/cream/on_mob_life(mob/living/M)
if(M.getBruteLoss() && prob(20))
M.heal_organ_damage(1,0, 0)
M.heal_bodypart_damage(1,0, 0)
. = 1
..()
@@ -411,7 +411,7 @@
M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.Jitter(5)
if(M.getBruteLoss() && prob(20))
M.heal_organ_damage(1,0, 0)
M.heal_bodypart_damage(1,0, 0)
..()
. = 1
@@ -429,7 +429,7 @@
M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT))
M.Jitter(5)
if(M.getBruteLoss() && prob(20))
M.heal_organ_damage(1,0, 0)
M.heal_bodypart_damage(1,0, 0)
..()
. = 1
@@ -27,7 +27,7 @@
/datum/reagent/consumable/nutriment/on_mob_life(mob/living/M)
if(prob(50))
M.heal_organ_damage(1,0, 0)
M.heal_bodypart_damage(1,0, 0)
. = 1
if(iscarbon(M))
var/mob/living/carbon/C = M
@@ -44,7 +44,7 @@
/datum/reagent/consumable/vitamin/on_mob_life(mob/living/M)
if(prob(50))
M.heal_organ_damage(1,1, 0)
M.heal_bodypart_damage(1,1, 0)
. = 1
if(M.satiety < 600)
M.satiety += 30
@@ -325,7 +325,7 @@
/datum/reagent/consumable/sprinkles/on_mob_life(mob/living/M)
if(istype(M, /mob/living/carbon/human) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden"))
M.heal_organ_damage(1,1, 0)
M.heal_bodypart_damage(1,1, 0)
. = 1
..()
@@ -457,5 +457,5 @@
/datum/reagent/consumable/honey/on_mob_life(mob/living/M)
M.reagents.add_reagent("sugar",3)
if(prob(20))
M.heal_organ_damage(3,1)
M.heal_bodypart_damage(3,1)
..()
@@ -38,7 +38,7 @@
M.setCloneLoss(0, 0)
M.setOxyLoss(0, 0)
M.radiation = 0
M.heal_organ_damage(5,5, 0)
M.heal_bodypart_damage(5,5, 0)
M.adjustToxLoss(-5, 0)
M.hallucination = 0
M.setBrainLoss(0)
@@ -163,7 +163,7 @@
/datum/reagent/medicine/rezadone/on_mob_life(mob/living/M)
M.setCloneLoss(0) //Rezadone is almost never used in favor of cryoxadone. Hopefully this will change that.
M.heal_organ_damage(1,1, 0)
M.heal_bodypart_damage(1,1, 0)
M.status_flags &= ~DISFIGURED
..()
. = 1
@@ -537,7 +537,7 @@
color = "#808080" // rgb: 128, 128, 128
/datum/reagent/chlorine/on_mob_life(mob/living/M)
M.take_organ_damage(1*REM, 0, 0)
M.take_bodypart_damage(1*REM, 0, 0)
. = 1
..()
@@ -34,11 +34,11 @@
if(!M.has_dna())
return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
if((method==VAPOR && prob(min(33, reac_volume))) || method==INGEST || method==PATCH || method==INJECT)
randmuti(M)
M.randmuti()
if(prob(98))
randmutb(M)
M.randmutb()
else
randmutg(M)
M.randmutg()
M.updateappearance()
M.domutcheck()
..()
@@ -118,7 +118,7 @@
M.adjustToxLoss(rand(20,60)*REM, 0)
. = 1
else if(prob(40))
M.heal_organ_damage(5*REM,0, 0)
M.heal_bodypart_damage(5*REM,0, 0)
. = 1
..()
+1 -1
View File
@@ -50,7 +50,7 @@ var/list/chemical_mob_spawn_nicecritters = list() // and possible friendly mobs
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
C.flash_eyes()
C.flash_act()
for(var/i = 1, i <= amount_to_spawn, i++)
var/chosen
if (reaction_name == "Friendly Gold Slime")
@@ -218,7 +218,7 @@
s.set_up(2, 1, location)
s.start()
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/3, location))
if(C.flash_eyes())
if(C.flash_act())
if(get_dist(C, location) < 4)
C.Weaken(5)
else
@@ -237,7 +237,7 @@
s.set_up(2, 1, location)
s.start()
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/10, location))
if(C.flash_eyes())
if(C.flash_act())
if(get_dist(C, location) < 4)
C.Weaken(5)
else
@@ -297,16 +297,7 @@
var/location = get_turf(holder.my_atom)
playsound(location, 'sound/effects/bang.ogg', 25, 1)
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/3, location))
if(C.check_ear_prot())
continue
C.show_message("<span class='warning'>BANG</span>", 2)
C.Stun(5)
C.Weaken(5)
C.setEarDamage(C.ear_damage + rand(0, 5), max(C.ear_deaf,15))
if(C.ear_damage >= 15)
C << "<span class='warning'>Your ears start to ring badly!</span>"
else if(C.ear_damage >= 5)
C << "<span class='warning'>Your ears start to ring!</span>"
C.soundbang_act(1, 5, rand(0, 5))
/datum/chemical_reaction/sonic_powder_deafen
name = "sonic_powder_deafen"
@@ -318,17 +309,7 @@
var/location = get_turf(holder.my_atom)
playsound(location, 'sound/effects/bang.ogg', 25, 1)
for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/10, location))
if(C.check_ear_prot())
continue
C.show_message("<span class='warning'>BANG</span>", 2)
C.Stun(5)
C.Weaken(5)
C.setEarDamage(C.ear_damage + rand(0, 5), max(C.ear_deaf,15))
if(C.ear_damage >= 15)
C << "<span class='warning'>Your ears start to ring badly!</span>"
else if(C.ear_damage >= 5)
C << "<span class='warning'>Your ears start to ring!</span>"
C.soundbang_act(1, 5, rand(0, 5))
/datum/chemical_reaction/phlogiston
name = "phlogiston"
@@ -167,7 +167,7 @@
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null))
C.flash_eyes()
C.flash_act()
for(var/i = 1, i <= 4 + rand(1,2), i++)
var/chosen = pick(borks)
@@ -195,7 +195,7 @@
playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, 1)
for(var/mob/living/carbon/M in viewers(get_turf(holder.my_atom), null))
M.flash_eyes()
M.flash_act()
for(var/i = 1, i <= 4 + rand(1,2), i++)
var/chosen = pick(borks)