next-we-melt-the-memories-that-are

This commit is contained in:
Fox McCloud
2019-09-09 16:20:04 -04:00
parent d19961378d
commit 177ac43f23
26 changed files with 482 additions and 165 deletions
@@ -74,3 +74,6 @@ In all, this is a lot like the monkey code. /N
adjustCloneLoss(damage)
if(STAMINA)
adjustStaminaLoss(damage)
/mob/living/carbon/alien/acid_act(acidpwr, acid_volume)
return 0//aliens are immune to acid.
@@ -70,34 +70,20 @@ Doesn't work on other aliens/AI.*/
return
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
/mob/living/carbon/alien/humanoid/proc/corrosive_acid(atom/target) //If they right click to corrode, an error will flash if its an invalid target./N
set name = "Corrossive Acid (200)"
set desc = "Drench an object in acid, destroying it over time."
set category = "Alien"
if(powerc(200))
if(O in oview(1))
// OBJ CHECK
if(isobj(O))
var/obj/I = O
if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
to_chat(src, "<span class='noticealien'>You cannot dissolve this object.</span>")
return
// TURF CHECK
else if(istype(O, /turf/simulated))
var/turf/simulated/T = O
if(T.unacidable)
to_chat(src, "<span class='noticealien'>You cannot dissolve this object.</span>")
return
else// Not a type we can acid.
return
adjustPlasma(-200)
new /obj/effect/acid(get_turf(O), O)
visible_message("<span class='alertalien'>[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!</span>")
if(target in oview(1))
if(target.acid_act(200, 100))
visible_message("<span class='alertalien'>[src] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid!</span>")
adjustPlasma(-200)
else
to_chat(src, "<span class='noticealien'>You cannot dissolve this object.</span>")
else
to_chat(src, "<span class='noticealien'>Target is too far away.</span>")
return
to_chat(src, "<span class='noticealien'>[target] is too far away.</span>")
/mob/living/carbon/alien/humanoid/proc/neurotoxin() // ok
set name = "Spit Neurotoxin (50)"
+7
View File
@@ -1171,3 +1171,10 @@ so that different stomachs can handle things in different ways VB*/
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
sync_lighting_plane_alpha()
/mob/living/carbon/ExtinguishMob()
for(var/X in get_equipped_items())
var/obj/item/I = X
I.acid_level = 0 //washes off the acid on our clothes
I.extinguish() //extinguishes our clothes
..()
@@ -167,6 +167,152 @@ emp_act
O.emp_act(severity)
..()
/mob/living/carbon/human/acid_act(acidpwr, acid_volume, bodyzone_hit) //todo: update this to utilize check_obscured_slots() //and make sure it's check_obscured_slots(TRUE) to stop aciding through visors etc
var/list/damaged = list()
var/list/inventory_items_to_kill = list()
var/acidity = acidpwr * min(acid_volume * 0.005, 0.1)
//HEAD//
if(!bodyzone_hit || bodyzone_hit == "head") //only if we didn't specify a zone or if that zone is the head.
var/obj/item/clothing/head_clothes = null
if(glasses)
head_clothes = glasses
if(wear_mask)
head_clothes = wear_mask
if(head)
head_clothes = head
if(head_clothes)
if(!(head_clothes.resistance_flags & UNACIDABLE))
head_clothes.acid_act(acidpwr, acid_volume)
update_inv_glasses()
update_inv_wear_mask()
update_inv_head()
else
to_chat(src, "<span class='notice'>Your [head_clothes.name] protects your head and face from the acid!</span>")
else
. = get_organ("head")
if(.)
damaged += .
if(l_ear)
inventory_items_to_kill += l_ear
if(r_ear)
inventory_items_to_kill += r_ear
//CHEST//
if(!bodyzone_hit || bodyzone_hit == "chest")
var/obj/item/clothing/chest_clothes = null
if(w_uniform)
chest_clothes = w_uniform
if(wear_suit)
chest_clothes = wear_suit
if(chest_clothes)
if(!(chest_clothes.resistance_flags & UNACIDABLE))
chest_clothes.acid_act(acidpwr, acid_volume)
update_inv_w_uniform()
update_inv_wear_suit()
else
to_chat(src, "<span class='notice'>Your [chest_clothes.name] protects your body from the acid!</span>")
else
. = get_organ("chest")
if(.)
damaged += .
if(wear_id)
inventory_items_to_kill += wear_id
if(wear_pda)
inventory_items_to_kill += wear_pda
if(r_store)
inventory_items_to_kill += r_store
if(l_store)
inventory_items_to_kill += l_store
if(s_store)
inventory_items_to_kill += s_store
//ARMS & HANDS//
if(!bodyzone_hit || bodyzone_hit == "l_arm" || bodyzone_hit == "r_arm")
var/obj/item/clothing/arm_clothes = null
if(gloves)
arm_clothes = gloves
if(w_uniform && ((w_uniform.body_parts_covered & HANDS) || (w_uniform.body_parts_covered & ARMS)))
arm_clothes = w_uniform
if(wear_suit && ((wear_suit.body_parts_covered & HANDS) || (wear_suit.body_parts_covered & ARMS)))
arm_clothes = wear_suit
if(arm_clothes)
if(!(arm_clothes.resistance_flags & UNACIDABLE))
arm_clothes.acid_act(acidpwr, acid_volume)
update_inv_gloves()
update_inv_w_uniform()
update_inv_wear_suit()
else
to_chat(src, "<span class='notice'>Your [arm_clothes.name] protects your arms and hands from the acid!</span>")
else
. = get_organ("r_arm")
if(.)
damaged += .
. = get_organ("l_arm")
if(.)
damaged += .
//LEGS & FEET//
if(!bodyzone_hit || bodyzone_hit == "l_leg" || bodyzone_hit =="r_leg" || bodyzone_hit == "feet")
var/obj/item/clothing/leg_clothes = null
if(shoes)
leg_clothes = shoes
if(w_uniform && ((w_uniform.body_parts_covered & FEET) || (bodyzone_hit != "feet" && (w_uniform.body_parts_covered & LEGS))))
leg_clothes = w_uniform
if(wear_suit && ((wear_suit.body_parts_covered & FEET) || (bodyzone_hit != "feet" && (wear_suit.body_parts_covered & LEGS))))
leg_clothes = wear_suit
if(leg_clothes)
if(!(leg_clothes.resistance_flags & UNACIDABLE))
leg_clothes.acid_act(acidpwr, acid_volume)
update_inv_shoes()
update_inv_w_uniform()
update_inv_wear_suit()
else
to_chat(src, "<span class='notice'>Your [leg_clothes.name] protects your legs and feet from the acid!</span>")
else
. = get_organ("r_leg")
if(.)
damaged += .
. = get_organ("l_leg")
if(.)
damaged += .
//DAMAGE//
for(var/obj/item/organ/external/affecting in damaged)
affecting.receive_damage(acidity, 2 * acidity)
if(istype(affecting, /obj/item/organ/external/head))
var/obj/item/organ/external/head/head_organ = affecting
if(prob(min(acidpwr * acid_volume / 10, 90))) //Applies disfigurement
head_organ.receive_damage(acidity, 2 * acidity)
emote("scream")
head_organ.h_style = "Bald"
head_organ.f_style = "Shaved"
update_hair()
update_fhair()
head_organ.disfigure()
UpdateDamageIcon()
//MELTING INVENTORY ITEMS//
//these items are all outside of armour visually, so melt regardless.
if(!bodyzone_hit)
if(back)
inventory_items_to_kill += back
if(belt)
inventory_items_to_kill += belt
if(l_hand)
inventory_items_to_kill += l_hand
if(r_hand)
inventory_items_to_kill += r_hand
for(var/obj/item/I in inventory_items_to_kill)
I.acid_act(acidpwr, acid_volume)
return 1
/mob/living/carbon/human/emag_act(user as mob, var/obj/item/organ/external/affecting)
if(!istype(affecting))
return
+4
View File
@@ -266,6 +266,10 @@
..()
flash_eyes()
/mob/living/acid_act(acidpwr, acid_volume)
take_organ_damage(acidpwr * min(1, acid_volume * 0.1))
return 1
/mob/living/proc/updatehealth(reason = "none given")
if(status_flags & GODMODE)
health = maxHealth