Merge pull request #12245 from Fox-McCloud/universal-damage

Universal Object Damage
This commit is contained in:
variableundefined
2019-10-06 23:22:48 -04:00
committed by GitHub
567 changed files with 5193 additions and 5472 deletions
@@ -1,15 +1,11 @@
/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush)
..(AM, hitpush = 0)
/mob/living/carbon/alien/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
..(AM, hitpush = FALSE)
/*Code for aliens attacking aliens. Because aliens act on a hivemind, I don't see them as very aggressive with each other.
As such, they can either help or harm other aliens. Help works like the human help command while harm is a simple nibble.
In all, this is a lot like the monkey code. /N
*/
/mob/living/carbon/alien/attack_alien(mob/living/carbon/alien/M)
if(!SSticker)
to_chat(M, "You cannot attack people before the game has started.")
return
if(istype(loc, /turf) && istype(loc.loc, /area/start))
to_chat(M, "No attacking people at spawn, you jackass.")
return
@@ -25,16 +21,14 @@ In all, this is a lot like the monkey code. /N
if(INTENT_GRAB)
grabbedby(M)
return 1
else
if(health > 0)
M.do_attack_animation(src, ATTACK_EFFECT_BITE)
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
var/damage = 1
visible_message("<span class='danger'>[M.name] bites [src]!</span>", \
"<span class='userdanger'>[M.name] bites [src]!</span>")
adjustBruteLoss(damage)
adjustBruteLoss(1)
add_attack_logs(M, src, "Alien attack", ATKLOG_ALL)
else
to_chat(M, "<span class='warning'>[name] is too injured for that.</span>")
@@ -76,6 +70,9 @@ In all, this is a lot like the monkey code. /N
if(STAMINA)
adjustStaminaLoss(damage)
/mob/living/carbon/alien/acid_act(acidpwr, acid_volume)
return 0 //aliens are immune to acid.
/mob/living/carbon/alien/attack_slime(mob/living/simple_animal/slime/M)
if(..()) //successful slime attack
var/damage = rand(5, 35)
@@ -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)"
@@ -18,18 +18,26 @@ var/const/MAX_ACTIVE_TIME = 400
flags = AIRTIGHT
flags_cover = MASKCOVERSMOUTH | MASKCOVERSEYES
layer = MOB_LAYER
max_integrity = 100
var/stat = CONSCIOUS //UNCONSCIOUS is the idle state in this case
var/sterile = 0
var/real = 1 //0 for the toy, 1 for real. Sure I could istype, but fuck that.
var/sterile = FALSE
var/real = TRUE //0 for the toy, 1 for real. Sure I could istype, but fuck that.
var/strength = 5
var/attached = 0
/obj/item/clothing/mask/facehugger/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
..()
if(obj_integrity < 90)
Die()
/obj/item/clothing/mask/facehugger/attackby(obj/item/O, mob/user, params)
return O.attack_obj(src, user)
/obj/item/clothing/mask/facehugger/attack_alien(mob/user) //can be picked up by aliens
attack_hand(user)
return
return attack_hand(user)
/obj/item/clothing/mask/facehugger/attack_hand(mob/user)
if((stat == CONSCIOUS && !sterile) && !isalien(user))
@@ -53,16 +61,6 @@ var/const/MAX_ACTIVE_TIME = 400
if(sterile)
. += "<span class='boldannounce'>It looks like the proboscis has been removed.</span>"
/obj/item/clothing/mask/facehugger/attackby(obj/item/O,mob/m, params)
if(O.force)
Die()
return
/obj/item/clothing/mask/facehugger/bullet_act(obj/item/projectile/P)
if(P.damage)
Die()
return
/obj/item/clothing/mask/facehugger/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
..()
if(exposed_temperature > 300)
@@ -236,9 +234,6 @@ var/const/MAX_ACTIVE_TIME = 400
/obj/item/clothing/mask/facehugger/lamarr
name = "Lamarr"
desc = "The worst she might do is attempt to... couple with your head."//hope we don't get sued over a harmless reference, rite?
desc = "The worst she might do is attempt to... couple with your head." //hope we don't get sued over a harmless reference, rite?
sterile = 1
gender = FEMALE
/obj/item/clothing/mask/facehugger/lamarr/New()//to prevent deleting it if aliums are disabled
return
gender = FEMALE
@@ -62,7 +62,7 @@
/mob/living/carbon/brain/ex_act() //you cant blow up brainmobs because it makes transfer_to() freak out when borgs blow up.
return
/mob/living/carbon/brain/blob_act()
/mob/living/carbon/brain/blob_act(obj/structure/blob/B)
return
/mob/living/carbon/brain/on_forcemove(atom/newloc)
@@ -102,7 +102,7 @@ I'm using this for Stat to give it a more nifty interface to work with
if(istype(src.loc, /obj/mecha))
var/obj/mecha/M = src.loc
stat("Exosuit Charge:", "[istype(M.cell) ? "[M.cell.charge] / [M.cell.maxcharge]" : "No cell detected"]")
stat("Exosuit Integrity", "[!M.health ? "0" : "[(M.health / initial(M.health)) * 100]"]%")
stat("Exosuit Integrity", "[!M.obj_integrity ? "0" : "[(M.obj_integrity / M.max_integrity) * 100]"]%")
/mob/living/carbon/brain/can_safely_leave_loc()
return 0 //You're not supposed to be ethereal jaunting, brains
@@ -1,6 +1,5 @@
/obj/item/organ/internal/brain
name = "brain"
health = 400 //They need to live awhile longer than other organs.
max_damage = 120
icon_state = "brain2"
force = 1.0
+8 -1
View File
@@ -15,7 +15,7 @@
qdel(B)
return ..()
/mob/living/carbon/blob_act()
/mob/living/carbon/blob_act(obj/structure/blob/B)
if(stat == DEAD)
return
else
@@ -1174,3 +1174,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
..()
@@ -1,4 +1,4 @@
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked = 0)
/mob/living/carbon/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(!skipcatch)
if(in_throw_mode && canmove && !restrained()) //Makes sure player is in throw mode
if(!istype(AM,/obj/item) || !isturf(AM.loc))
+6 -10
View File
@@ -295,7 +295,7 @@
..()
/mob/living/carbon/human/blob_act()
/mob/living/carbon/human/blob_act(obj/structure/blob/B)
if(stat == DEAD)
return
show_message("<span class='userdanger'>The blob attacks you!</span>")
@@ -1588,17 +1588,16 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
return threatcount
/mob/living/carbon/human/singularity_act()
var/gain = 20
. = 20
if(mind)
if((mind.assigned_role == "Station Engineer") || (mind.assigned_role == "Chief Engineer") )
gain = 100
. = 100
if(mind.assigned_role == "Clown")
gain = rand(-300, 300)
investigate_log("([key_name(src)]) has been consumed by the singularity.","singulo") //Oh that's where the clown ended up!
gib()
return(gain)
. = rand(-1000, 1000)
..() //Called afterwards because getting the mind after getting gibbed is sketchy
/mob/living/carbon/human/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_THREE)
var/list/handlist = list(l_hand, r_hand)
for(var/obj/item/hand in handlist)
@@ -1606,9 +1605,6 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
step_towards(hand, src)
to_chat(src, "<span class='warning'>\The [S] pulls \the [hand] from your grip!</span>")
apply_effect(current_size * 3, IRRADIATE)
if(mob_negates_gravity())
return
..()
/mob/living/carbon/human/proc/do_cpr(mob/living/carbon/human/H)
if(H == src)
@@ -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
@@ -303,7 +449,7 @@ emp_act
dna.species.spec_attacked_by(I, user, affecting, user.a_intent, src)
//this proc handles being hit by a thrown atom
/mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0)
/mob/living/carbon/human/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
var/obj/item/I
var/throwpower = 30
if(istype(AM, /obj/item))
@@ -312,11 +458,11 @@ emp_act
if(I.thrownby == src) //No throwing stuff at yourself to trigger reactions
return ..()
if(check_shields(AM, throwpower, "\the [AM.name]", THROWN_PROJECTILE_ATTACK))
hitpush = 0
skipcatch = 1
blocked = 1
hitpush = FALSE
skipcatch = TRUE
blocked = TRUE
else if(I)
if(I.throw_speed >= EMBED_THROWSPEED_THRESHOLD)
if(((throwingdatum ? throwingdatum.speed : I.throw_speed) >= EMBED_THROWSPEED_THRESHOLD) || I.embedded_ignore_throwspeed_threshold)
if(can_embed(I))
if(prob(I.embed_chance) && !(PIERCEIMMUNE in dna.species.species_traits))
throw_alert("embeddedobject", /obj/screen/alert/embeddedobject)
@@ -326,8 +472,8 @@ emp_act
I.forceMove(src)
L.receive_damage(I.w_class*I.embedded_impact_pain_multiplier)
visible_message("<span class='danger'>[I] embeds itself in [src]'s [L.name]!</span>","<span class='userdanger'>[I] embeds itself in your [L.name]!</span>")
hitpush = 0
skipcatch = 1 //can't catch the now embedded item
hitpush = FALSE
skipcatch = TRUE //can't catch the now embedded item
if(!blocked)
dna.species.spec_hitby(AM, src)
return ..()
@@ -470,36 +616,39 @@ emp_act
/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == INTENT_HARM)
M.do_attack_animation(src)
if(M.damtype == "brute")
step_away(src,M,15)
var/obj/item/organ/external/affecting = get_organ(pick("chest", "chest", "chest", "head"))
var/obj/item/organ/external/affecting = get_organ(pick(BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_HEAD))
if(affecting)
var/update = 0
var/dmg = rand(M.force/2, M.force)
switch(M.damtype)
if("brute")
if(M.force > 20)
if(M.force > 35) // durand and other heavy mechas
Paralyse(1)
update |= affecting.receive_damage(rand(M.force/2, M.force), 0)
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
else if(M.force > 20 && !weakened) // lightweight mechas like gygax
Weaken(2)
update |= affecting.receive_damage(dmg, 0)
playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
if("fire")
update |= affecting.receive_damage(0, rand(M.force/2, M.force))
playsound(src, 'sound/items/welder.ogg', 50, 1)
update |= affecting.receive_damage(dmg, 0)
playsound(src, 'sound/items/welder.ogg', 50, TRUE)
if("tox")
M.mech_toxin_damage(src)
else
return
if(update)
UpdateDamageIcon()
updatehealth("mech melee attack")
M.occupant_message("<span class='danger'>You hit [src].</span>")
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>", \
"<span class='userdanger'>[src] has been hit by [M.name].</span>")
visible_message("<span class='danger'>[M.name] hits [src]!</span>", "<span class='userdanger'>[M.name] hits you!</span>")
add_attack_logs(M.occupant, src, "Mecha-meleed with [M]")
else
..()
return
/mob/living/carbon/human/experience_pressure_difference(pressure_difference, direction)
playsound(src, 'sound/effects/space_wind.ogg', 50, TRUE)
if(shoes && istype(shoes, /obj/item/clothing))
@@ -732,5 +732,4 @@
H.mind.miming = TRUE
/datum/unarmed_attack/golem/tranquillite
attack_sound = null
miss_sound = null
attack_sound = null
+11 -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
@@ -791,13 +795,16 @@
add_attack_logs(src, who, "Equipped [what]")
/mob/living/singularity_act()
var/gain = 20
investigate_log("([key_name(src)]) has been consumed by the singularity.","singulo") //Oh that's where the clown ended up!
gib()
return(gain)
return 20
/mob/living/singularity_pull(S)
step_towards(src,S)
/mob/living/singularity_pull(S, current_size)
..()
if(current_size >= STAGE_SIX) //your puny magboots/wings/whatever will not save you against supermatter singularity
throw_at(S, 14, 3, src, TRUE)
else if(!mob_negates_gravity())
step_towards(src,S)
/mob/living/narsie_act()
if(client)
+17 -16
View File
@@ -87,22 +87,24 @@
return 0
//this proc handles being hit by a thrown atom
/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = 1, blocked = 0, datum/thrownthing/throwingdatum)//Standardization and logging -Sieve
/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(istype(AM, /obj/item))
var/obj/item/I = AM
var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest
var/dtype = BRUTE
var/volume = I.get_volume_by_throwforce_and_or_w_class()
if(istype(I, /obj/item))
var/obj/item/W = I
dtype = W.damtype
if(W.throwforce > 0) //If the weapon's throwforce is greater than zero...
if(W.hitsound) //...and hitsound is defined...
playsound(loc, W.hitsound, volume, 1, -1) //...play the weapon's hitsound.
else //Otherwise, if hitsound isn't defined...
playsound(loc, 'sound/weapons/genhit1.ogg', volume, 1, -1) //...play genhit1.ogg.
SEND_SIGNAL(I, COMSIG_MOVABLE_IMPACT_ZONE, src, zone)
dtype = I.damtype
else if(I.throwforce > 0) //Otherwise, if the item doesn't have a throwhitsound and has a throwforce greater than zero...
if(I.throwforce > 0) //If the weapon's throwforce is greater than zero...
if(I.throwhitsound) //...and throwhitsound is defined...
playsound(loc, I.throwhitsound, volume, TRUE, -1) //...play the weapon's throwhitsound.
else if(I.hitsound) //Otherwise, if the weapon's hitsound is defined...
playsound(loc, I.hitsound, volume, TRUE, -1) //...play the weapon's hitsound.
else if(!I.throwhitsound) //Otherwise, if throwhitsound isn't defined...
playsound(loc, 'sound/weapons/genhit.ogg',volume, TRUE, -1) //...play genhit.ogg.
else if(!I.throwhitsound && I.throwforce > 0) //Otherwise, if the item doesn't have a throwhitsound and has a throwforce greater than zero...
playsound(loc, 'sound/weapons/genhit1.ogg', volume, 1, -1)//...play genhit1.ogg
if(!I.throwforce)// Otherwise, if the item's throwforce is 0...
playsound(loc, 'sound/weapons/throwtap.ogg', 1, volume, -1)//...play throwtap.ogg.
@@ -116,37 +118,36 @@
else
return 1
else
playsound(loc, 'sound/weapons/genhit1.ogg', 50, 1, -1) //...play genhit1.ogg.)
playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1)
..()
/mob/living/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == INTENT_HARM)
M.do_attack_animation(src)
if(M.damtype == "brute")
step_away(src,M,15)
switch(M.damtype)
if("brute")
Paralyse(1)
take_overall_damage(rand(M.force/2, M.force))
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
if("fire")
take_overall_damage(0, rand(M.force/2, M.force))
playsound(src, 'sound/items/welder.ogg', 50, 1)
playsound(src, 'sound/items/welder.ogg', 50, TRUE)
if("tox")
M.mech_toxin_damage(src)
else
return
updatehealth("mech melee attack")
M.occupant_message("<span class='danger'>You hit [src].</span>")
visible_message("<span class='danger'>[src] has been hit by [M.name].</span>", \
"<span class='userdanger'>[src] has been hit by [M.name].</span>")
visible_message("<span class='danger'>[M.name] hits [src]!</span>", "<span class='userdanger'>[M.name] hits you!</span>")
add_attack_logs(M.occupant, src, "Mecha-meleed with [M]")
else
step_away(src,M)
add_attack_logs(M.occupant, src, "Mecha-pushed with [M]", ATKLOG_ALL)
M.occupant_message("<span class='warning'>You push [src] out of the way.</span>")
visible_message("<span class='warning'>[M] pushes [src] out of the way.</span>")
return
//Mobs on Fire
/mob/living/proc/IgniteMob()
+5 -4
View File
@@ -560,11 +560,12 @@ var/list/ai_verbs_default = list(
user.reset_perspective(current)
return TRUE
/mob/living/silicon/ai/blob_act()
if(stat != 2)
/mob/living/silicon/ai/blob_act(obj/structure/blob/B)
if(stat != DEAD)
adjustBruteLoss(60)
return TRUE
return FALSE
updatehealth()
return 1
return 0
/mob/living/silicon/ai/restrained()
return FALSE
@@ -550,14 +550,12 @@ var/list/robot_verbs_default = list(
if(thruster_button)
thruster_button.icon_state = "ionpulse[ionpulse_on]"
/mob/living/silicon/robot/blob_act()
/mob/living/silicon/robot/blob_act(obj/structure/blob/B)
if(stat != DEAD)
adjustBruteLoss(60)
return 1
adjustBruteLoss(30)
else
gib()
return 1
return 0
return TRUE
// this function displays the cyborgs current cell charge in the stat panel
/mob/living/silicon/robot/proc/show_cell_power()
@@ -1466,4 +1464,4 @@ var/list/robot_verbs_default = list(
SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT)
sync_lighting_plane_alpha()
@@ -543,6 +543,14 @@
else
..()
/mob/living/simple_animal/bot/ed209/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(I.throwforce < src.health && I.thrownby && ishuman(I.thrownby))
var/mob/living/carbon/human/H = I.thrownby
retaliate(H)
..()
/mob/living/simple_animal/bot/ed209/RangedAttack(atom/A, params)
if(!on)
return
@@ -217,7 +217,7 @@ Auto Patrol: []"},
..()
/mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = 0, hitpush = 1, blocked = 0)
/mob/living/simple_animal/bot/secbot/hitby(atom/movable/AM, skipcatch = FALSE, hitpush = TRUE, blocked = FALSE, datum/thrownthing/throwingdatum)
if(istype(AM, /obj/item))
var/obj/item/I = AM
if(I.throwforce < src.health && I.thrownby && ishuman(I.thrownby))
@@ -232,7 +232,7 @@ Auto Patrol: []"},
C.visible_message("<span class='danger'>[src] is trying to put zipties on [C]!</span>",\
"<span class='userdanger'>[src] is trying to put zipties on you!</span>")
INVOKE_ASYNC(src, .proc/cuff_callback, C)
/mob/living/simple_animal/bot/secbot/proc/cuff_callback(mob/living/carbon/C)
if(do_after(src, 60, target = C))
if(!C.handcuffed)
@@ -167,7 +167,7 @@
visible_message("<span class='userdanger'>[src] blows apart!</span>")
do_sparks(3, 1, src)
new /obj/effect/decal/cleanable/blood/oil(loc)
var/obj/effect/decal/mecha_wreckage/gygax/dark/wreck = new /obj/effect/decal/mecha_wreckage/gygax/dark(loc)
var/obj/structure/mecha_wreckage/gygax/dark/wreck = new /obj/structure/mecha_wreckage/gygax/dark(loc)
wreck.name = "sentry bot wreckage"
raise_alert("[src] destroyed.")
@@ -46,13 +46,13 @@
visible_message("<span class='danger'>[P] has a reduced effect on [src]!</span>")
..()
/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM)//No floor tiling them to death, wiseguy
/mob/living/simple_animal/hostile/asteroid/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //No floor tiling them to death, wiseguy
if(istype(AM, /obj/item))
var/obj/item/T = AM
if(!stat)
Aggro()
if(T.throwforce <= 20)
visible_message("<span class='notice'>The [T.name] [src.throw_message] [src.name]!</span>")
visible_message("<span class='notice'>The [T.name] [throw_message] [src.name]!</span>")
return
..()
@@ -167,7 +167,7 @@
if(M.a_intent == INTENT_HARM)
Bruise()
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM)
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
..()
if(istype(AM, /obj/item))
var/obj/item/T = AM
@@ -139,7 +139,7 @@
icon = 'icons/effects/effects.dmi'
anchored = 1 // prevents people dragging it
density = 0 // prevents it blocking all movement
health = 20 // two welders, or one laser shot (15 for the normal spider webs)
max_integrity = 20 // two welders, or one laser shot (15 for the normal spider webs)
icon_state = "stickyweb1"
var/creator_ckey = null
@@ -94,4 +94,4 @@
name = "thick web"
desc = "This web is so thick, most cannot see beyond it."
opacity = 1
health = 40
max_integrity = 40
@@ -306,7 +306,7 @@
visible_message("<span class='userdanger'>\The [src] emits a bone-chilling shriek!</span>")
for(var/obj/machinery/light/L in orange(light_range, src))
if(L.on && prob(light_chance))
L.broken()
L.break_light_tube()
for(var/obj/machinery/camera/C in orange(camera_range, src))
if(C.status && prob(camera_chance))
C.toggle_cam(src, 0)
@@ -62,6 +62,6 @@
/obj/structure/spider/terrorweb/red
health = 30
max_integrity = 30
name = "reinforced web"
desc = "This web is reinforced with extra strands, for added strength."
@@ -9,7 +9,7 @@
icon_state = "spiderling"
anchored = 0
layer = 2.75
health = 3
max_integrity = 3
var/stillborn = FALSE
var/spider_myqueen = null
var/spider_mymother = null
@@ -39,10 +39,10 @@
. = ..()
/obj/structure/spider/spiderling/terror_spiderling/die()
/obj/structure/spider/spiderling/terror_spiderling/Destroy()
for(var/obj/structure/spider/spiderling/terror_spiderling/S in view(7, src))
S.immediate_ventcrawl = TRUE
. = ..()
return ..()
/obj/structure/spider/spiderling/terror_spiderling/proc/score_surroundings(atom/A = src)
var/safety_score = 0
@@ -163,7 +163,7 @@
if(stillborn)
if(amount_grown >= 300)
// Fake spiderlings stick around for awhile, just to be spooky.
die()
qdel(src)
else
if(!grow_as)
grow_as = pick(/mob/living/simple_animal/hostile/poison/terror_spider/red, /mob/living/simple_animal/hostile/poison/terror_spider/gray, /mob/living/simple_animal/hostile/poison/terror_spider/green)
@@ -136,7 +136,7 @@
if(!L.status)
step_to(src,L)
L.on = 1
L.broken()
L.break_light_tube()
do_attack_animation(L)
visible_message("<span class='danger'>[src] smashes the [L.name].</span>")
return
@@ -122,95 +122,6 @@ var/global/totaltribbles = 0 //global variable so it updates for all tribbles,
gestation = 0
to_chat(user, "<span class='notice'>You fuse some recently cut tubes together, it should be able to reproduce again.</span>")
//|| Tribble Cage - Lovingly lifted from the lamarr-cage ||
/obj/structure/tribble_cage
name = "Lab Cage"
icon = 'icons/mob/tribbles.dmi'
icon_state = "labcage1"
desc = "A glass lab container for storing interesting creatures."
density = 1
anchored = 1
unacidable = 1//Dissolving the case would also delete tribble
var/health = 30
var/occupied = 1
var/destroyed = 0
/obj/structure/tribble_cage/ex_act(severity)
switch(severity)
if(1)
new /obj/item/shard( src.loc )
Break()
qdel(src)
if(2)
if(prob(50))
src.health -= 15
src.healthcheck()
if(3)
if(prob(50))
src.health -= 5
src.healthcheck()
/obj/structure/tribble_cage/bullet_act(var/obj/item/projectile/Proj)
health -= Proj.damage
..()
src.healthcheck()
return
/obj/structure/tribble_cage/blob_act()
if(prob(75))
new /obj/item/shard( src.loc )
Break()
qdel(src)
/obj/structure/tribble_cage/proc/healthcheck()
if(src.health <= 0)
if(!( src.destroyed ))
src.density = 0
src.destroyed = 1
new /obj/item/shard( src.loc )
playsound(src, "shatter", 70, 1)
Break()
else
playsound(src.loc, 'sound/effects/glasshit.ogg', 75, 1)
return
/obj/structure/tribble_cage/update_icon()
if(src.destroyed)
src.icon_state = "labcageb[src.occupied]"
else
src.icon_state = "labcage[src.occupied]"
return
/obj/structure/tribble_cage/attackby(obj/item/W as obj, mob/user as mob, params)
src.health -= W.force
src.healthcheck()
..()
return
/obj/structure/tribble_cage/attack_hand(mob/user as mob)
if(src.destroyed)
return
else
user.visible_message("<span class='warning'>[user] kicks the lab cage.</span>", "<span class='notice'>You kick the lab cage.</span>")
src.health -= 2
healthcheck()
return
/obj/structure/tribble_cage/proc/Break()
if(occupied)
new /mob/living/simple_animal/tribble( src.loc )
occupied = 0
update_icon()
return
//||Fur and Fur Products ||
/obj/item/stack/sheet/fur //basic fur sheets (very lumpy furry piles of sheets)
+3
View File
@@ -61,5 +61,8 @@
/mob/proc/update_stat()
return
/mob/proc/update_health_hud()
return
/mob/proc/update_canmove()
return 1