Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Carbon Dismemberment , second attempt. #20461

Merged
merged 10 commits into from Sep 12, 2016

Conversation

phil235
Copy link
Contributor

@phil235 phil235 commented Sep 11, 2016

🆑 phil235
add: Monkeys can be dismembered.
add: Humans, monkeys and aliens can drop limbs when they are gibbed.
add: Roboticists can remove flashes, wires and power cells that they inserted in robot head or torso by using a crowbar on it.
add: visual wounds appear on a monkey's bodyparts when injured, exactly like humans.
add: Using a health analyzer on a monkey or alien shows the injuries to each bodypart.
add: Monkeys can become husks.
fix: Human-monkey transformations now respect missing limbs. No more limb regrowth by becoming a monkey.
fix: Changeling's regenerate ability also work while in monkey form.
fix: Alien larva has its own gib and dust animation.
fix: A bodypart that looks wounded still looks bloody when dismembered.
fix: Amputation surgery now works on robotic limbs, and monkeys.
/:cl:

  • 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/augment 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 Beheading husks regrows hair, presumably creates implantable head #18532 "beheaded husk has hair".
  • Fixes Ling Stasis appearance bug #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.
  • dropped bodyparts keep the damage overlays they had while attached.
  • human-monkey transformation now respects missing limbs. No more limb regrowth by becoming a monkey.
  • Changeling's regenerate ability also work while in monkey form.
  • NODISMEMBER species can still lack a limb if they were another species with a missing limb and got species-changed.
  • Admin heal regenerates limbs on all carbons.

…at'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.
…o DismembermentBoogaloo

Conflicts:
	code/datums/weather/weather_types.dm
	code/modules/mob/living/simple_animal/simple_animal.dm
	code/modules/reagents/chemistry/recipes/pyrotechnics.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)
…o DismembermentBoogaloo2

# Conflicts:
#	code/_onclick/hud/generic_dextrous.dm
#	code/game/objects/items.dm
#	code/game/objects/items/stacks/sheets/glass.dm
#	code/modules/hydroponics/grown/nettle.dm
#	code/modules/mob/interactive.dm
#	code/modules/mob/living/carbon/carbon.dm
#	code/modules/mob/living/carbon/human/human.dm
#	code/modules/mob/living/carbon/human/human_attackalien.dm
#	code/modules/mob/living/carbon/human/update_icons.dm
#	code/modules/mob/living/carbon/update_icons.dm
#	code/modules/mob/living/silicon/robot/robot.dm
#	code/modules/mob/living/simple_animal/simple_animal.dm
#	code/modules/power/lighting.dm
#	code/modules/surgery/bodyparts/dismemberment.dm
#	code/modules/surgery/bodyparts/helpers.dm
@phil235 phil235 added the Refactor Makes the code harder to read label Sep 11, 2016
@phil235 phil235 mentioned this pull request Sep 11, 2016
@AKlimentyev
Copy link

3many bulletpoints. ahhhhhh

@@ -90,7 +100,7 @@
if(I.attack_verb && I.attack_verb.len)
message_verb = "[pick(I.attack_verb)]"
else if(!I.force)
return 0
return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why null instead of what I assume is a false ?

Copy link
Contributor Author

@phil235 phil235 Sep 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The return value of that proc is no longer used for anything. I think leaving a "return 0" or "return FALSE" could confuse readers thinking the "0" value has some significance.

Fixes lightgeist healing not working.
Fixes null.handle_fall() runtimes with pirate mobs.
Fixes typo in has_left_hadn() and has_right_hand().
@@ -358,7 +358,7 @@
var/mob/living/carbon/human/H = mymob

var/mob/screenmob = viewer || H

world << "DEBUG phil235 viewer: [viewer] ; H: [H] ; screenmob:[screenmob]"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fuck

@@ -25,7 +25,7 @@

/mob/living/carbon/has_left_hand()
for(var/obj/item/bodypart/L in hand_bodyparts)
if(!(L.held_index % 2))
if(L.held_index % 2)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? there's no point to this.
Not to mention if you're going to change this logic you're gonna have to change it everywhere else.

@AnturK
Copy link
Member

AnturK commented Sep 12, 2016

Here we go

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Makes the code harder to read
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ling Stasis appearance bug Beheading husks regrows hair, presumably creates implantable head
7 participants