diff --git a/code/__DEFINES/construction.dm b/code/__DEFINES/construction.dm
index fc7fc98e25f..1e5599a998d 100644
--- a/code/__DEFINES/construction.dm
+++ b/code/__DEFINES/construction.dm
@@ -27,6 +27,11 @@
#define PLASTIC_FLAPS_NORMAL 0
#define PLASTIC_FLAPS_DETACHED 1
+//other construction-related things
+
+//windows affected by nar-sie turn this color.
+#define NARSIE_WINDOW_COLOUR "#7D1919"
+
//Material defines, for determining how much of a given material an item contains
#define MAT_METAL "$metal"
#define MAT_GLASS "$glass"
diff --git a/code/__DEFINES/mob.dm b/code/__DEFINES/mobs.dm
similarity index 96%
rename from code/__DEFINES/mob.dm
rename to code/__DEFINES/mobs.dm
index 1b85e76c772..5bf38e54ad8 100644
--- a/code/__DEFINES/mob.dm
+++ b/code/__DEFINES/mobs.dm
@@ -107,6 +107,12 @@
#define AI_CHECK_WIRELESS 1
#define AI_CHECK_RADIO 2
+//determines if a mob can smash through it
+#define ENVIRONMENT_SMASH_NONE 0
+#define ENVIRONMENT_SMASH_STRUCTURES 1 //crates, lockers, ect
+#define ENVIRONMENT_SMASH_WALLS 2 //walls
+#define ENVIRONMENT_SMASH_RWALLS 4 //rwalls
+
#define POCKET_STRIP_DELAY 40 //time taken (in deciseconds) to search somebody's pockets
#define DEFAULT_ITEM_STRIP_DELAY 40 //time taken (in deciseconds) to strip somebody
diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm
index 977b68ae5a3..545dcfd0380 100644
--- a/code/_onclick/hud/screen_objects.dm
+++ b/code/_onclick/hud/screen_objects.dm
@@ -16,6 +16,9 @@
var/datum/hud/hud = null
appearance_flags = NO_CLIENT_COLOR
+/obj/screen/take_damage()
+ return
+
/obj/screen/Destroy()
master = null
return ..()
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index bf6c7b5531f..723bf48e7e8 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -13,15 +13,9 @@
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
// No comment
-/atom/proc/attackby(obj/item/W, mob/living/user, params)
+/atom/proc/attackby(obj/item/W, mob/user, params)
return
-/atom/movable/attackby(obj/item/W, mob/living/user, params)
- user.changeNext_move(CLICK_CD_MELEE)
- user.do_attack_animation(src)
- if(!(W.flags&NOBLUDGEON))
- visible_message("[src] has been hit by [user] with [W].")
-
/obj/attackby(obj/item/I, mob/living/user, params)
return I.attack_obj(src, user)
@@ -94,7 +88,8 @@
/obj/attacked_by(obj/item/I, mob/living/user)
if(I.force)
- user.visible_message("[user] has hit [src] with [I]!", "You hit [src] with [I]!")
+ user.visible_message("[src] has been hit by [user] with [I]!", "You hit [src] with [I]!")
+ take_damage(I.force, I.damtype, "melee", 1)
/mob/living/attacked_by(obj/item/I, mob/living/user, def_zone)
send_item_attack_message(I, user)
@@ -142,9 +137,9 @@
var/message_hit_area = ""
if(hit_area)
message_hit_area = " in the [hit_area]"
- var/attack_message = "[src] has been [message_verb][message_hit_area] with [I]."
+ var/attack_message = "[user] has [message_verb] [src][message_hit_area] with [I]!"
if(user in viewers(src, null))
- attack_message = "[src] has been [message_verb][message_hit_area] with [I] by [user]!"
- visible_message("[attack_message]",
- "[attack_message]")
+ attack_message = "[user] has [message_verb] [src][message_hit_area] with [I]!"
+ visible_message("[attack_message]",\
+ "[attack_message]")
return 1
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index bf02fa02ed8..33265ff8a49 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -153,9 +153,8 @@
/atom/proc/emp_act(var/severity)
return
-/atom/proc/bullet_act(var/obj/item/projectile/Proj, def_zone)
- Proj.on_hit(src, 0, def_zone)
- return 0
+/atom/proc/bullet_act(obj/item/projectile/P, def_zone)
+ . = P.on_hit(src, 0, def_zone)
/atom/proc/in_contents_of(container)//can take class or object instance as argument
if(ispath(container))
diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm
index c9e15d20f38..c6dc0833afb 100644
--- a/code/game/gamemodes/blob/blobs/blob_mobs.dm
+++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm
@@ -34,6 +34,8 @@
maxHealth = 40
melee_damage_lower = 2
melee_damage_upper = 4
+ obj_damage = 20
+ environment_smash = ENVIRONMENT_SMASH_STRUCTURES
attacktext = "hits"
attack_sound = 'sound/weapons/genhit1.ogg'
speak_emote = list("pulses")
@@ -158,6 +160,7 @@
maxHealth = 240
melee_damage_lower = 20
melee_damage_upper = 20
+ obj_damage = 60
attacktext = "hits"
attack_sound = 'sound/effects/blobattack.ogg'
speak_emote = list("gurgles")
@@ -165,7 +168,7 @@
maxbodytemp = 360
force_threshold = 10
mob_size = MOB_SIZE_LARGE
- environment_smash = 3
+ environment_smash = ENVIRONMENT_SMASH_RWALLS
gold_core_spawnable = CHEM_MOB_SPAWN_HOSTILE
pressure_resistance = 100 //100 kPa difference required to push
throw_pressure_limit = 120 //120 kPa difference required to throw
diff --git a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
index e80ba05eccb..be18793554f 100644
--- a/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
+++ b/code/game/gamemodes/miniantags/bot_swarm/swarmer.dm
@@ -90,6 +90,7 @@
melee_damage_upper = 15
melee_damage_type = STAMINA
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
+ obj_damage = 0
environment_smash = 0
attacktext = "shocks"
attack_sound = 'sound/effects/EMPulse.ogg'
diff --git a/code/game/gamemodes/miniantags/guardian/guardian.dm b/code/game/gamemodes/miniantags/guardian/guardian.dm
index 89be0391463..ed79a826608 100644
--- a/code/game/gamemodes/miniantags/guardian/guardian.dm
+++ b/code/game/gamemodes/miniantags/guardian/guardian.dm
@@ -22,6 +22,7 @@
maxHealth = INFINITY //The spirit itself is invincible
health = INFINITY
environment_smash = 0
+ obj_damage = 40
melee_damage_lower = 15
melee_damage_upper = 15
AIStatus = AI_OFF
diff --git a/code/game/gamemodes/miniantags/guardian/types/assassin.dm b/code/game/gamemodes/miniantags/guardian/types/assassin.dm
index 28626133557..426824f2e8c 100644
--- a/code/game/gamemodes/miniantags/guardian/types/assassin.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/assassin.dm
@@ -45,6 +45,8 @@
melee_damage_lower = initial(melee_damage_lower)
melee_damage_upper = initial(melee_damage_upper)
armour_penetration = initial(armour_penetration)
+ obj_damage = initial(obj_damage)
+ environment_smash = initial(environment_smash)
alpha = initial(alpha)
if(!forced)
to_chat(src, "You exit stealth.")
@@ -61,7 +63,9 @@
melee_damage_lower = 50
melee_damage_upper = 50
armour_penetration = 100
- new /obj/effect/temp_visual/guardian/phase(get_turf(src))
+ obj_damage = 0
+ environment_smash = ENVIRONMENT_SMASH_NONE
+ new /obj/effect/temp_visual/guardian/phase/out(get_turf(src))
alpha = 15
if(!forced)
to_chat(src, "You enter stealth, empowering your next attack.")
diff --git a/code/game/gamemodes/miniantags/guardian/types/ranged.dm b/code/game/gamemodes/miniantags/guardian/types/ranged.dm
index 648339743fd..695782728fa 100644
--- a/code/game/gamemodes/miniantags/guardian/types/ranged.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/ranged.dm
@@ -32,6 +32,8 @@
ranged = 1
melee_damage_lower = 10
melee_damage_upper = 10
+ obj_damage = initial(obj_damage)
+ environment_smash = initial(environment_smash)
alpha = 255
range = 13
incorporeal_move = 0
@@ -41,6 +43,8 @@
ranged = 0
melee_damage_lower = 0
melee_damage_upper = 0
+ obj_damage = 0
+ environment_smash = ENVIRONMENT_SMASH_NONE
alpha = 60
range = 255
incorporeal_move = 1
diff --git a/code/game/gamemodes/miniantags/guardian/types/standard.dm b/code/game/gamemodes/miniantags/guardian/types/standard.dm
index 10327778a65..8dfc3d39796 100644
--- a/code/game/gamemodes/miniantags/guardian/types/standard.dm
+++ b/code/game/gamemodes/miniantags/guardian/types/standard.dm
@@ -1,6 +1,7 @@
/mob/living/simple_animal/hostile/guardian/punch
melee_damage_lower = 20
melee_damage_upper = 20
+ obj_damage = 80
damage_transfer = 0.4
playstyle_string = "As a Standard type you have no special abilities, but have a high damage resistance and a powerful attack capable of smashing through walls."
environment_smash = 2
diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm
index 28456e39984..def7f1fdd76 100644
--- a/code/game/gamemodes/miniantags/morph/morph.dm
+++ b/code/game/gamemodes/miniantags/morph/morph.dm
@@ -23,6 +23,7 @@
maxHealth = 150
health = 150
environment_smash = 1
+ obj_damage = 50
melee_damage_lower = 20
melee_damage_upper = 20
see_in_dark = 8
diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm
index 416610dd1c2..3c0523daa3c 100644
--- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm
+++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm
@@ -29,6 +29,7 @@
health = 200
environment_smash = 1
//universal_understand = 1
+ obj_damage = 50
melee_damage_lower = 30
melee_damage_upper = 30
see_in_dark = 8
@@ -114,7 +115,7 @@
health = 500
melee_damage_upper = 60
melee_damage_lower = 60
- environment_smash = 3 //Smashes through EVERYTHING - r-walls included
+ environment_smash = ENVIRONMENT_SMASH_RWALLS //Smashes through EVERYTHING - r-walls included
faction = list("cult")
playstyle_string = "You are a Harbringer of the Slaughter. Brought forth by the servants of Nar-Sie, you have a single purpose: slaughter the heretics \
who do not worship your master. You may use the ability 'Blood Crawl' near a pool of blood to enter it and become incorporeal. Using the ability again near a blood pool will allow you \
diff --git a/code/game/gamemodes/shadowling/ascendant_shadowling.dm b/code/game/gamemodes/shadowling/ascendant_shadowling.dm
index a957c16c50e..f640174d537 100644
--- a/code/game/gamemodes/shadowling/ascendant_shadowling.dm
+++ b/code/game/gamemodes/shadowling/ascendant_shadowling.dm
@@ -28,7 +28,7 @@
minbodytemp = 0
maxbodytemp = INFINITY
- environment_smash = 3
+ environment_smash = ENVIRONMENT_SMASH_RWALLS
faction = list("faithless")
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 89157003e5f..9d19ba79408 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -194,7 +194,7 @@
if(user.can_advanced_admin_interact())
return attack_hand(user)
-/obj/machinery/door/window/proc/attack_generic(mob/user, damage = 0)
+/obj/machinery/door/window/attack_generic(mob/user, damage = 0)
if(operating)
return
user.changeNext_move(CLICK_CD_MELEE)
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index f74ef8717a7..5c29343020a 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -497,7 +497,20 @@ Class Procs:
to_chat(user, "[bicon(C)] [C.name]")
/obj/machinery/examine(mob/user)
- ..(user)
+ ..()
+ if(stat & BROKEN)
+ to_chat(user, "It looks broken and non-functional.")
+ if(!(resistance_flags & INDESTRUCTIBLE))
+ if(burn_state == ON_FIRE)
+ to_chat(user, "It's on fire!")
+ var/healthpercent = (obj_integrity/max_integrity) * 100
+ switch(healthpercent)
+ if(50 to 99)
+ to_chat(user, "It looks slightly damaged.")
+ if(25 to 50)
+ to_chat(user, "It appears heavily damaged.")
+ if(0 to 25)
+ to_chat(user, "It's falling apart!")
if(user.research_scanner && component_parts)
display_parts(user)
diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm
index d88965fbbbf..467858ad670 100644
--- a/code/game/objects/effects/effects.dm
+++ b/code/game/objects/effects/effects.dm
@@ -4,3 +4,11 @@
/obj/effect
icon = 'icons/effects/effects.dmi'
+ burn_state = LAVA_PROOF | FIRE_PROOF
+ resistance_flags = INDESTRUCTIBLE
+
+/obj/effect/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
+ return
+
+/obj/effect/fire_act()
+ return
\ No newline at end of file
diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm
index 8ad7e8c9b91..a7a0e2699b2 100644
--- a/code/game/objects/obj_defense.dm
+++ b/code/game/objects/obj_defense.dm
@@ -19,11 +19,8 @@
//returns the damage value of the attack after processing the obj's various armor protections
/obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armour_penetration = 0)
- switch(damage_type)
- if(BRUTE)
- if(BURN)
- else
- return 0
+ if(!(damage_type in list(BRUTE, BURN)))
+ return 0
var/armor_protection = 0
if(damage_flag)
armor_protection = armor[damage_flag]
@@ -52,6 +49,86 @@
tforce = O.throwforce
take_damage(tforce, BRUTE, "melee", 1, get_dir(src, AM))
+/obj/ex_act(severity, target)
+ if(resistance_flags & INDESTRUCTIBLE)
+ return
+ ..() //contents explosion
+ if(target == src)
+ obj_integrity = 0
+ qdel(src)
+ return
+ switch(severity)
+ if(1)
+ obj_integrity = 0
+ qdel(src)
+ if(2)
+ take_damage(rand(100, 250), BRUTE, "bomb", 0)
+ if(3)
+ take_damage(rand(10, 90), BRUTE, "bomb", 0)
+
+/obj/bullet_act(obj/item/projectile/P)
+ . = ..()
+ playsound(src, P.hitsound, 50, 1)
+ visible_message("[src] is hit by \a [P]!")
+ take_damage(P.damage, P.damage_type, P.flag, 0, turn(P.dir, 180), P.armour_penetration)
+
+/obj/blob_act(obj/structure/blob/B)
+ if(isturf(loc))
+ var/turf/T = loc
+ if(T.intact && level == 1) //the blob doesn't destroy thing below the floor
+ return
+ take_damage(400, BRUTE, "melee", 0, get_dir(src, B))
+
+/obj/proc/attack_generic(mob/user, damage_amount = 0, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, armor_penetration = 0) //used by attack_alien, attack_animal, and attack_slime
+ user.do_attack_animation(src)
+ user.changeNext_move(CLICK_CD_MELEE)
+ return take_damage(damage_amount, damage_type, damage_flag, sound_effect, get_dir(src, user), armor_penetration)
+
+/obj/attack_alien(mob/living/carbon/alien/humanoid/user)
+ if(attack_generic(user, 60, BRUTE, "melee", 0))
+ playsound(loc, 'sound/weapons/slash.ogg', 100, 1)
+
+/obj/attack_animal(mob/living/simple_animal/M)
+ if(!M.melee_damage_upper && !M.obj_damage)
+ M.custom_emote(1, "[M.friendly] [src]")
+ return 0
+ else
+ var/play_soundeffect = 1
+ if(M.environment_smash)
+ play_soundeffect = 0
+ if(M.obj_damage)
+ . = attack_generic(M, M.obj_damage, M.melee_damage_type, "melee", play_soundeffect, M.armour_penetration)
+ else
+ . = attack_generic(M, rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, "melee", play_soundeffect, M.armour_penetration)
+ if(. && !play_soundeffect)
+ playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
+
+/obj/attack_slime(mob/living/carbon/slime/user)
+ if(!user.is_adult)
+ return
+ attack_generic(user, rand(10, 15), "melee", 1)
+
+/obj/mech_melee_attack(obj/mecha/M)
+ M.do_attack_animation(src)
+ var/play_soundeffect = 0
+ var/mech_damtype = M.damtype
+ if(M.selected)
+ mech_damtype = M.selected.damtype
+ play_soundeffect = 1
+ else
+ switch(M.damtype)
+ if(BRUTE)
+ playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
+ if(BURN)
+ playsound(src, 'sound/items/welder.ogg', 50, 1)
+ if(TOX)
+ playsound(src, 'sound/effects/spray2.ogg', 50, 1)
+ return 0
+ else
+ return 0
+ visible_message("[M.name] has hit [src].")
+ return take_damage(M.force*3, mech_damtype, "melee", play_soundeffect, get_dir(src, M)) // multiplied by 3 so we can hit objs hard but not be overpowered against mobs.
+
/obj/singularity_act()
ex_act(1)
if(src && !qdeleted(src))
@@ -101,7 +178,7 @@
//what happens when the obj's integrity reaches zero.
/obj/proc/obj_destruction(damage_flag)
- if(damage_flag == "fire")
+ if(damage_flag == BURN)
burn()
else
deconstruct(FALSE)
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 2bbadfcd0ba..20cc3afc756 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -14,7 +14,7 @@
var/force = 0
var/list/armor
var/obj_integrity //defaults to max_integrity
- var/max_integrity = 500
+ var/max_integrity = INFINITY
var/integrity_failure = 0 //0 if we have no special broken behavior
var/resistance_flags = NONE // INDESTRUCTIBLE
diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm
index a775fec0095..00860477833 100644
--- a/code/game/objects/structures.dm
+++ b/code/game/objects/structures.dm
@@ -165,3 +165,24 @@
return 0
return 1
+/obj/structure/examine(mob/user)
+ ..()
+ if(!(resistance_flags & INDESTRUCTIBLE))
+ if(burn_state == ON_FIRE)
+ to_chat(user, "It's on fire!")
+ if(broken)
+ to_chat(user, "It appears to be broken.")
+ var/examine_status = examine_status(user)
+ if(examine_status)
+ to_chat(user, examine_status)
+
+/obj/structure/proc/examine_status(mob/user) //An overridable proc, mostly for falsewalls.
+ var/healthpercent = (obj_integrity/max_integrity) * 100
+ switch(healthpercent)
+ if(50 to 99)
+ return "It looks slightly damaged."
+ if(25 to 50)
+ return "It appears heavily damaged."
+ if(0 to 25)
+ if(!broken)
+ return "It's falling apart!"
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index 42f6a20e261..938bd0d5472 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -32,8 +32,8 @@
/obj/structure/girder/attack_animal(mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
- if(M.environment_smash >= 1)
- if(M.environment_smash == 3)
+ if((M.environment_smash & ENVIRONMENT_SMASH_STRUCTURES) || (M.environment_smash & ENVIRONMENT_SMASH_WALLS) || (M.environment_smash & ENVIRONMENT_SMASH_RWALLS))
+ if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS)
ex_act(2)
M.visible_message("[M] smashes through \the [src].", "You smash through \the [src].")
else
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 9af91affa52..e492f96a3c2 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -15,7 +15,7 @@
var/rods_type = /obj/item/stack/rods
var/rods_amount = 2
var/rods_broken = 1
- var/grille_type = null
+ var/grille_type
var/broken_type = /obj/structure/grille/broken
/obj/structure/grille/fence/
@@ -95,36 +95,6 @@
if(!shock(user, 70))
take_damage(20, BRUTE, "melee", 1)
-/obj/structure/grille/attack_slime(mob/living/user)
- user.changeNext_move(CLICK_CD_MELEE)
- user.do_attack_animation(src)
- var/mob/living/carbon/slime/S = user
- if(!S.is_adult)
- return
-
- playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
- user.visible_message("[user] smashes against [src].", \
- "You smash against [src].", \
- "You hear twisting metal.")
-
- take_damage(rand(1,2))
-
-/obj/structure/grille/attack_animal(mob/living/simple_animal/M)
- if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN))
- return
- M.changeNext_move(CLICK_CD_MELEE)
- M.do_attack_animation(src)
- playsound(loc, 'sound/effects/grillehit.ogg', 80, 1)
- M.visible_message("[M] smashes against [src].", \
- "You smash against [src].", \
- "You hear twisting metal.")
-
- take_damage(rand(M.melee_damage_lower,M.melee_damage_upper), M.melee_damage_type, "melee", 1)
-
-/obj/structure/grille/mech_melee_attack(obj/mecha/M)
- if(..())
- take_damage(M.force * 0.5, M.damtype)
-
/obj/structure/grille/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
return 1
@@ -142,10 +112,6 @@
var/atom/movable/mover = caller
. = . || mover.checkpass(PASSGRILLE)
-/obj/structure/grille/bullet_act(obj/item/projectile/Proj)
- . = ..()
- take_damage(Proj.damage*0.3, Proj.damage_type)
-
/obj/structure/grille/attackby(obj/item/weapon/W, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
add_fingerprint(user)
@@ -155,7 +121,7 @@
deconstruct()
else if((isscrewdriver(W)) && (istype(loc, /turf/simulated) || anchored))
if(!shock(user, 90))
- playsound(loc, W.usesound, 100, 1)
+ playsound(src, W.usesound, 100, 1)
anchored = !anchored
user.visible_message("[user] [anchored ? "fastens" : "unfastens"] [src].", \
"You [anchored ? "fasten [src] to" : "unfasten [src] from"] the floor.")
@@ -177,7 +143,7 @@
//window placing end
else if(istype(W, /obj/item/weapon/shard) || !shock(user, 70))
- return attacked_by(W, user)
+ return ..()
/obj/structure/grille/proc/build_window(obj/item/stack/sheet/S, mob/user)
if(!istype(S) || !user)
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
index 2cdcfc18376..0c5373558ae 100644
--- a/code/game/objects/structures/inflatable.dm
+++ b/code/game/objects/structures/inflatable.dm
@@ -66,7 +66,7 @@
add_fingerprint(user)
return
-/obj/structure/inflatable/proc/attack_generic(mob/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
+/obj/structure/inflatable/attack_generic(mob/user, damage = 0) //used by attack_alien, attack_animal, and attack_slime
health -= damage
if(health <= 0)
user.visible_message("[user] tears open [src]!")
diff --git a/code/game/objects/structures/table_frames.dm b/code/game/objects/structures/table_frames.dm
index 6f5a70af404..1786d8cc8ff 100644
--- a/code/game/objects/structures/table_frames.dm
+++ b/code/game/objects/structures/table_frames.dm
@@ -128,6 +128,7 @@
desc = "Four pieces of brass arranged in a square. It's slightly warm to the touch."
icon_state = "brass_frame"
burn_state = FIRE_PROOF
+ unacidable = 1
framestack = /obj/item/stack/tile/brass
framestackamount = 1
diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm
index 5005d9e4aff..d856ab6f9eb 100644
--- a/code/game/objects/structures/tables_racks.dm
+++ b/code/game/objects/structures/tables_racks.dm
@@ -82,42 +82,6 @@
new /obj/structure/table/reinforced/brass(loc)
qdel(src)
-/obj/structure/table/ex_act(severity)
- switch(severity)
- if(1)
- qdel(src)
- return
- if(2)
- if(prob(50))
- qdel(src)
- return
- if(3)
- if(prob(25))
- deconstruct(FALSE)
- else
- return
-
-/obj/structure/table/blob_act()
- if(prob(75))
- qdel(src)
-
-/obj/structure/table/attack_alien(mob/living/user)
- user.do_attack_animation(src)
- playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1)
- visible_message("[user] slices [src] apart!")
- deconstruct(FALSE)
-
-/obj/structure/table/mech_melee_attack(obj/mecha/M)
- visible_message("[M] smashes [src] apart!")
- deconstruct(FALSE)
-
-/obj/structure/table/attack_animal(mob/living/simple_animal/user)
- if(user.environment_smash)
- user.do_attack_animation(src)
- playsound(loc, 'sound/weapons/Genhit.ogg', 50, 1)
- visible_message("[user] smashes [src] apart!")
- deconstruct(FALSE)
-
/obj/structure/table/attack_hand(mob/living/user)
if(HULK in user.mutations)
user.do_attack_animation(src)
@@ -254,18 +218,7 @@
if(isrobot(user))
return
- if(istype(I, /obj/item/weapon/melee/energy/blade))
- var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
- spark_system.set_up(5, 0, loc)
- spark_system.start()
- playsound(loc, I.usesound, 50, 1)
- playsound(loc, "sparks", 50, 1)
- for(var/mob/O in viewers(user, 4))
- O.show_message("The [src] was sliced apart by [user]!", 1, "You hear [src] coming apart.", 2)
- deconstruct(FALSE)
- return
-
- if(!(I.flags & ABSTRACT))
+ if(user.a_intent != INTENT_HARM && !(I.flags & ABSTRACT))
if(user.drop_item())
I.Move(loc)
var/list/click_params = params2list(params)
@@ -275,8 +228,8 @@
//Clamp it so that the icon never moves more than 16 pixels in either direction (thus leaving the table turf)
I.pixel_x = Clamp(text2num(click_params["icon-x"]) - 16, -(world.icon_size/2), world.icon_size/2)
I.pixel_y = Clamp(text2num(click_params["icon-y"]) - 16, -(world.icon_size/2), world.icon_size/2)
-
- return
+ else
+ return ..()
/obj/structure/table/deconstruct(disassembled = TRUE, wrench_disassembly = 0)
if(can_deconstruct)
@@ -401,6 +354,7 @@
icon_state = "glass_table"
buildstack = /obj/item/stack/sheet/glass
max_integrity = 70
+ unacidable = 1
canSmoothWith = null
var/list/debris = list()
@@ -465,6 +419,11 @@
debris -= AM
qdel(src)
+/obj/structure/table/glass/narsie_act()
+ color = NARSIE_WINDOW_COLOUR
+ for(var/obj/item/weapon/shard/S in debris)
+ S.color = NARSIE_WINDOW_COLOUR
+
/*
* Wooden tables
*/
@@ -602,8 +561,8 @@
icon = 'icons/obj/objects.dmi'
icon_state = "rack"
layer = TABLE_LAYER
- density = 1
- anchored = 1
+ density = TRUE
+ anchored = TRUE
pass_flags = LETPASSTHROW
max_integrity = 20
@@ -611,28 +570,6 @@
..()
to_chat(user, "It's held together by a couple of bolts.")
-/obj/structure/rack/ex_act(severity)
- switch(severity)
- if(1)
- qdel(src)
- if(2)
- qdel(src)
- if(prob(50))
- new /obj/item/weapon/rack_parts(loc)
- if(3)
- if(prob(25))
- qdel(src)
- new /obj/item/weapon/rack_parts(loc)
-
-/obj/structure/rack/blob_act()
- if(prob(75))
- qdel(src)
- return
- else if(prob(50))
- new /obj/item/weapon/rack_parts(loc)
- qdel(src)
- return
-
/obj/structure/rack/CanPass(atom/movable/mover, turf/target, height=0)
if(height==0)
return 1
@@ -668,46 +605,21 @@
return
if(isrobot(user))
return
+ if(user.a_intent == INTENT_HARM)
+ return ..()
if(!(W.flags & ABSTRACT))
if(user.drop_item())
W.Move(loc)
return
-/obj/structure/rack/attack_hand(mob/user)
- if(HULK in user.mutations)
- visible_message("[user] smashes [src] apart!")
- user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
- deconstruct()
- else
- user.changeNext_move(CLICK_CD_MELEE)
- user.do_attack_animation(src)
- playsound(loc, 'sound/items/dodgeball.ogg', 80, 1)
- user.visible_message("[user] kicks [src].", \
- "You kick [src].")
- obj_integrity -= rand(1,2)
- healthcheck()
-
-/obj/structure/rack/mech_melee_attack(obj/mecha/M)
- visible_message("[M] smashes [src] apart!")
- deconstruct()
-
-/obj/structure/rack/attack_alien(mob/living/user)
+/obj/structure/rack/attack_hand(mob/living/user)
+ if(user.weakened || user.resting || user.lying)
+ return
+ user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
- visible_message("[user] slices [src] apart!")
- deconstruct()
-
-/obj/structure/rack/attack_animal(mob/living/simple_animal/user)
- if(user.environment_smash)
- user.do_attack_animation(src)
- visible_message("[user] smashes [src] apart!")
- deconstruct()
-
-/obj/structure/rack/attack_tk() // no telehulk sorry
- return
-
-/obj/structure/rack/proc/healthcheck()
- if(obj_integrity <= 0)
- deconstruct()
+ user.visible_message("[user] kicks [src].", \
+ "You kick [src].")
+ take_damage(rand(4,8), BRUTE, "melee", 1)
/obj/structure/rack/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
switch(damage_type)
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index 361b815a358..b45883162c6 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -148,7 +148,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
return
-/obj/structure/window/proc/attack_generic(mob/living/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
+/obj/structure/window/attack_generic(mob/living/user, damage = 0) //used by attack_alien, attack_animal, and attack_slime
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
health -= damage
diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm
index bc64a4ab8f3..7772740a9f2 100644
--- a/code/game/objects/weapons.dm
+++ b/code/game/objects/weapons.dm
@@ -5,7 +5,7 @@
/obj/item/weapon/New()
..()
if(!hitsound)
- if(damtype == "fire")
+ if(damtype == BURN)
hitsound = 'sound/items/welder.ogg'
- if(damtype == "brute")
+ if(damtype == BRUTE)
hitsound = "swing_hit"
\ No newline at end of file
diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm
index 234af2cfb72..73166ebe64b 100644
--- a/code/game/turfs/simulated/walls.dm
+++ b/code/game/turfs/simulated/walls.dm
@@ -216,8 +216,8 @@
/turf/simulated/wall/attack_animal(var/mob/living/simple_animal/M)
M.changeNext_move(CLICK_CD_MELEE)
M.do_attack_animation(src)
- if(M.environment_smash >= 2)
- if(M.environment_smash == 3)
+ if((M.environment_smash & ENVIRONMENT_SMASH_WALLS) || (M.environment_smash & ENVIRONMENT_SMASH_RWALLS))
+ if(M.environment_smash & ENVIRONMENT_SMASH_RWALLS)
dismantle_wall(1)
to_chat(M, "You smash through the wall.")
else
diff --git a/code/modules/fish/fishtank.dm b/code/modules/fish/fishtank.dm
index 1b5294867d4..16ec28dc929 100644
--- a/code/modules/fish/fishtank.dm
+++ b/code/modules/fish/fishtank.dm
@@ -595,7 +595,7 @@
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
check_health()
-/obj/machinery/fishtank/proc/attack_generic(mob/living/user as mob, damage = 0) //used by attack_alien, attack_animal, and attack_slime
+/obj/machinery/fishtank/attack_generic(mob/living/user, damage = 0) //used by attack_alien, attack_animal, and attack_slime
user.changeNext_move(CLICK_CD_MELEE)
user.do_attack_animation(src)
cur_health -= damage
diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm
index c1d8d2bdfde..425fbee2b8a 100644
--- a/code/modules/mining/lavaland/loot/colossus_loot.dm
+++ b/code/modules/mining/lavaland/loot/colossus_loot.dm
@@ -335,6 +335,7 @@
friendly = "mends"
density = 0
flying = 1
+ obj_damage = 0
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
ventcrawler = 2
mob_size = MOB_SIZE_TINY
diff --git a/code/modules/mining/mine_turfs.dm b/code/modules/mining/mine_turfs.dm
index d2f8e2c8bc1..94fa395e526 100644
--- a/code/modules/mining/mine_turfs.dm
+++ b/code/modules/mining/mine_turfs.dm
@@ -418,7 +418,7 @@ var/global/list/rockTurfEdgeCache = list(
return
/turf/simulated/mineral/attack_animal(mob/living/simple_animal/user as mob)
- if(user.environment_smash >= 2)
+ if((user.environment_smash & ENVIRONMENT_SMASH_WALLS) || (user.environment_smash & ENVIRONMENT_SMASH_RWALLS))
gets_drilled()
..()
diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm
index a9cdbffed7d..f60eba4a1bd 100644
--- a/code/modules/mining/minebot.dm
+++ b/code/modules/mining/minebot.dm
@@ -23,6 +23,7 @@
maxHealth = 125
melee_damage_lower = 15
melee_damage_upper = 15
+ obj_damage = 0
environment_smash = 0
check_friendly_fire = 1
stop_automated_movement_when_pulled = 1
diff --git a/code/modules/mob/living/carbon/slime/slime.dm b/code/modules/mob/living/carbon/slime/slime.dm
index f7e22f60b35..e9603666573 100644
--- a/code/modules/mob/living/carbon/slime/slime.dm
+++ b/code/modules/mob/living/carbon/slime/slime.dm
@@ -215,8 +215,8 @@
return // can't attack while eating!
M.do_attack_animation(src)
- visible_message(" The [M.name] has glomped [src]!", \
- " The [M.name] has glomped [src]!")
+ visible_message("[M.name] has glomped [src]!", \
+ "[M.name] has glomped [src]!")
var/damage = rand(1, 3)
attacked += 5
if(M.is_adult)
diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
index 3cf6e92d5f1..7b902af2e7a 100644
--- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm
+++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm
@@ -8,7 +8,7 @@
health = 100
maxHealth = 100
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
-
+ obj_damage = 60
environment_smash = 2 //Walls can't stop THE LAW
mob_size = MOB_SIZE_LARGE
diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm
index f94063a5a10..a3fdbde1d2b 100644
--- a/code/modules/mob/living/simple_animal/constructs.dm
+++ b/code/modules/mob/living/simple_animal/constructs.dm
@@ -100,6 +100,7 @@
health = 250
response_harm = "harmlessly punches"
harm_intent_damage = 0
+ obj_damage = 90
melee_damage_lower = 30
melee_damage_upper = 30
attacktext = "smashes their armoured gauntlet into"
@@ -189,6 +190,7 @@
health = 50
response_harm = "viciously beats"
harm_intent_damage = 5
+ obj_damage = 60
melee_damage_lower = 5
melee_damage_upper = 5
attacktext = "rams"
@@ -302,7 +304,7 @@
melee_damage_lower = 1
melee_damage_upper = 5
attacktext = "prods"
- environment_smash = 3
+ environment_smash = ENVIRONMENT_SMASH_RWALLS
see_in_dark = 8
attack_sound = 'sound/weapons/tap.ogg'
const_type = "harvester"
diff --git a/code/modules/mob/living/simple_animal/friendly/lizard.dm b/code/modules/mob/living/simple_animal/friendly/lizard.dm
index ead59fa32d7..31d0b1f91c5 100644
--- a/code/modules/mob/living/simple_animal/friendly/lizard.dm
+++ b/code/modules/mob/living/simple_animal/friendly/lizard.dm
@@ -9,7 +9,7 @@
health = 5
maxHealth = 5
attacktext = "bites"
- attacktext = "bites"
+ obj_damage = 0
melee_damage_lower = 1
melee_damage_upper = 2
response_help = "pets"
diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm
index 86dbc13b643..480647fe8a8 100644
--- a/code/modules/mob/living/simple_animal/hostile/alien.dm
+++ b/code/modules/mob/living/simple_animal/hostile/alien.dm
@@ -14,6 +14,7 @@
maxHealth = 100
health = 100
harm_intent_damage = 5
+ obj_damage = 60
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "slashes"
@@ -145,6 +146,7 @@
melee_damage_upper = 0
a_intent = INTENT_HELP
friendly = "caresses"
+ obj_damage = 0
environment_smash = 0
icon_state = "maid"
icon_living = "maid"
diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm
index 798595a36e0..1e55fb58850 100644
--- a/code/modules/mob/living/simple_animal/hostile/bear.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bear.dm
@@ -20,6 +20,7 @@
stop_automated_movement_when_pulled = 0
maxHealth = 60
health = 60
+ obj_damage = 60
melee_damage_lower = 20
melee_damage_upper = 30
attacktext = "mauls"
diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm
index a2d6c915d77..557e9de9c48 100644
--- a/code/modules/mob/living/simple_animal/hostile/bees.dm
+++ b/code/modules/mob/living/simple_animal/hostile/bees.dm
@@ -29,6 +29,7 @@
health = 10
faction = list("hostile")
move_to_delay = 0
+ obj_damage = 0
environment_smash = 0
mouse_opacity = 2
pass_flags = PASSTABLE | PASSGRILLE | PASSMOB
diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm
index 2d0dd7a2380..be9f41e9625 100644
--- a/code/modules/mob/living/simple_animal/hostile/carp.dm
+++ b/code/modules/mob/living/simple_animal/hostile/carp.dm
@@ -18,6 +18,7 @@
health = 25
harm_intent_damage = 8
+ obj_damage = 50
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "bites"
@@ -70,6 +71,6 @@
health = 65
pixel_x = -16
mob_size = MOB_SIZE_LARGE
-
+ obj_damage = 80
melee_damage_lower = 20
melee_damage_upper = 20
\ No newline at end of file
diff --git a/code/modules/mob/living/simple_animal/hostile/creature.dm b/code/modules/mob/living/simple_animal/hostile/creature.dm
index 50aa20b60d0..13c695387bd 100644
--- a/code/modules/mob/living/simple_animal/hostile/creature.dm
+++ b/code/modules/mob/living/simple_animal/hostile/creature.dm
@@ -8,6 +8,7 @@
icon_dead = "otherthing-dead"
health = 80
maxHealth = 80
+ obj_damage = 100
melee_damage_lower = 25
melee_damage_upper = 50
attacktext = "chomps"
diff --git a/code/modules/mob/living/simple_animal/hostile/deathsquid.dm b/code/modules/mob/living/simple_animal/hostile/deathsquid.dm
index e1fcfca518f..e825bb2d273 100644
--- a/code/modules/mob/living/simple_animal/hostile/deathsquid.dm
+++ b/code/modules/mob/living/simple_animal/hostile/deathsquid.dm
@@ -17,7 +17,7 @@
armour_penetration = 25
melee_damage_lower = 10
melee_damage_upper = 100
- environment_smash = 3
+ environment_smash = ENVIRONMENT_SMASH_RWALLS
force_threshold = 15
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
diff --git a/code/modules/mob/living/simple_animal/hostile/faithless.dm b/code/modules/mob/living/simple_animal/hostile/faithless.dm
index 35926a602f2..f668312e88d 100644
--- a/code/modules/mob/living/simple_animal/hostile/faithless.dm
+++ b/code/modules/mob/living/simple_animal/hostile/faithless.dm
@@ -12,7 +12,7 @@
speed = 0
maxHealth = 80
health = 80
-
+ obj_damage = 50
harm_intent_damage = 10
melee_damage_lower = 15
melee_damage_upper = 15
diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
index fb0d156cdbf..cc1726a6408 100644
--- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
+++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm
@@ -39,6 +39,7 @@
response_harm = "hits"
maxHealth = 200
health = 200
+ obj_damage = 60
melee_damage_lower = 15
melee_damage_upper = 20
heat_damage_per_tick = 20 //amount of damage applied if animal's body temperature is higher than maxbodytemp
diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm
index 9c9ec79fd34..0eea0eaef76 100644
--- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm
+++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm
@@ -16,6 +16,7 @@
faction = list("creature")
robust_searching = 1
stat_attack = 2
+ obj_damage = 0
environment_smash = 0
speak_emote = list("squeaks")
ventcrawler = 2
diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm
index 50fab332201..a06ea9bd80d 100644
--- a/code/modules/mob/living/simple_animal/hostile/hostile.dm
+++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm
@@ -1,6 +1,7 @@
/mob/living/simple_animal/hostile
faction = list("hostile")
stop_automated_movement_when_pulled = 0
+ obj_damage = 40
environment_smash = 1 //Set to 1 to break closets,tables,racks, etc; 2 for walls; 3 for rwalls
var/atom/target
var/ranged = 0
@@ -241,7 +242,7 @@
if(target.loc != null && get_dist(targets_from, target.loc) <= vision_range) //We can't see our target, but he's in our vision range still
if(ranged_ignores_vision && ranged_cooldown <= world.time) //we can't see our target... but we can fire at them!
OpenFire(target)
- if(environment_smash >= 2) //If we're capable of smashing through walls, forget about vision completely after finding our target
+ if((environment_smash & ENVIRONMENT_SMASH_WALLS) || (environment_smash & ENVIRONMENT_SMASH_RWALLS)) //If we're capable of smashing through walls, forget about vision completely after finding our target
Goto(target,move_to_delay,minimum_distance)
FindHidden()
return 1
diff --git a/code/modules/mob/living/simple_animal/hostile/illusion.dm b/code/modules/mob/living/simple_animal/hostile/illusion.dm
index 746c1789e16..9ed59fb4ab5 100644
--- a/code/modules/mob/living/simple_animal/hostile/illusion.dm
+++ b/code/modules/mob/living/simple_animal/hostile/illusion.dm
@@ -65,6 +65,7 @@
melee_damage_lower = 0
melee_damage_upper = 0
speed = -1
+ obj_damage = 0
environment_smash = 0
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm
index 2ec7c213e1c..fe0374561a4 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm
@@ -267,6 +267,7 @@ Difficulty: Medium
maxHealth = 200
health = 200
faction = list("neutral")
+ obj_damage = 80
melee_damage_upper = 30
melee_damage_lower = 30
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1)
diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
index dba3121f3a7..19a00329e8f 100644
--- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
+++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm
@@ -7,7 +7,8 @@
maxHealth = 1000
a_intent = INTENT_HARM
sentience_type = SENTIENCE_BOSS
- environment_smash = 3
+ environment_smash = ENVIRONMENT_SMASH_RWALLS
+ obj_damage = 400
luminosity = 3
faction = list("mining", "boss")
weather_immunities = list("lava","ash")
diff --git a/code/modules/mob/living/simple_animal/hostile/mimic.dm b/code/modules/mob/living/simple_animal/hostile/mimic.dm
index 0b28722e497..d25b2e5c6d9 100644
--- a/code/modules/mob/living/simple_animal/hostile/mimic.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mimic.dm
@@ -225,6 +225,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
/mob/living/simple_animal/hostile/mimic/copy/ranged/CopyObject(obj/O, mob/living/creator, destroy_original = 0)
if(..())
emote_see = list("aims menacingly")
+ obj_damage = 0
environment_smash = 0 //needed? seems weird for them to do so
ranged = 1
retreat_distance = 1 //just enough to shoot
diff --git a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm
index a0f0a2b8b22..c874259f891 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm
@@ -17,6 +17,7 @@
maxHealth = 75
health = 75
harm_intent_damage = 5
+ obj_damage = 0
melee_damage_lower = 0
melee_damage_upper = 0
attacktext = "lashes out at"
diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
index 184f7b3ced3..2ff27c6fdfa 100644
--- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm
@@ -4,6 +4,7 @@
unsuitable_atmos_damage = 15
faction = list("mining")
weather_immunities = list("lava","ash")
+ obj_damage = 30
environment_smash = 2
minbodytemp = 0
heat_damage_per_tick = 20
@@ -65,6 +66,7 @@
maxHealth = 200
health = 200
harm_intent_damage = 5
+ obj_damage = 60
melee_damage_lower = 12
melee_damage_upper = 12
attacktext = "bites into"
@@ -125,6 +127,7 @@
maxHealth = 300
health = 300
harm_intent_damage = 1 //Only the manliest of men can kill a Goliath with only their fists.
+ obj_damage = 100
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "pulverizes"
diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
index 25311673076..3eaef32cafd 100644
--- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm
+++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm
@@ -13,6 +13,7 @@
response_disarm = "gently pushes aside"
response_harm = "whacks"
harm_intent_damage = 5
+ obj_damage = 0
melee_damage_lower = 1
melee_damage_upper = 1
attack_same = 2
diff --git a/code/modules/mob/living/simple_animal/hostile/pirate.dm b/code/modules/mob/living/simple_animal/hostile/pirate.dm
index 29c9923b5cd..4253d6bbf7f 100644
--- a/code/modules/mob/living/simple_animal/hostile/pirate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/pirate.dm
@@ -14,6 +14,7 @@
health = 100
harm_intent_damage = 5
+ obj_damage = 60
melee_damage_lower = 30
melee_damage_upper = 30
attacktext = "slashes"
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
index c2ba962e2e0..4fefd0ac4f6 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm
@@ -22,6 +22,7 @@
melee_damage_upper = 10
attacktext = "attacks"
attack_sound = 'sound/items/bikehorn.ogg'
+ obj_damage = 0
environment_smash = 0
minbodytemp = 270
maxbodytemp = 370
diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm
index 6ddb86fd818..b3bc11e6c1f 100644
--- a/code/modules/mob/living/simple_animal/hostile/statue.dm
+++ b/code/modules/mob/living/simple_animal/hostile/statue.dm
@@ -19,6 +19,7 @@
healable = 0
harm_intent_damage = 35
+ obj_damage = 100
melee_damage_lower = 34
melee_damage_upper = 42
attacktext = "claws"
diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
index 470163315f3..03f2497e9cc 100644
--- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm
+++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm
@@ -112,6 +112,7 @@
pass_flags = PASSTABLE
health = 15
maxHealth = 15
+ obj_damage = 0
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "cuts"
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm
index 40e6515668f..afb2785bb10 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/prince.dm
@@ -24,7 +24,7 @@
move_to_delay = 4 // faster than normal
ventcrawler = 0
ai_ventcrawls = 0
- environment_smash = 3
+ environment_smash = ENVIRONMENT_SMASH_RWALLS
loot = list(/obj/item/clothing/accessory/medal)
idle_ventcrawl_chance = 0
spider_tier = TS_TIER_3
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm
index 6b524872552..6a19cf1122c 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/purple.dm
@@ -25,7 +25,7 @@
spider_opens_doors = 2
ventcrawler = 0
ai_ventcrawls = 0
- environment_smash = 3
+ environment_smash = ENVIRONMENT_SMASH_RWALLS
idle_ventcrawl_chance = 0 // stick to the queen!
var/dcheck_counter = 0
var/queen_visible = 1
diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm
index a9032b8a13d..ef285b488a6 100644
--- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm
+++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/queen.dm
@@ -232,7 +232,7 @@
hasnested = 1
ventcrawler = 0
ai_ventcrawls = 0
- environment_smash = 3
+ environment_smash = ENVIRONMENT_SMASH_RWALLS
DoQueenScreech(8, 100, 8, 100)
MassFlicker()
to_chat(src, "You have matured to your egglaying stage. You can now smash through walls, and lay eggs, but can no longer ventcrawl.")
diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
index f27891f5965..9e6396dbde0 100644
--- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
+++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm
@@ -54,6 +54,7 @@
maxHealth = 50
ranged = 1
harm_intent_damage = 5
+ obj_damage = 60
melee_damage_lower = 25
melee_damage_upper = 25
a_intent = INTENT_HARM
diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm
index cf045091115..9d89c2c8b4c 100644
--- a/code/modules/mob/living/simple_animal/simple_animal.dm
+++ b/code/modules/mob/living/simple_animal/simple_animal.dm
@@ -46,6 +46,7 @@
//LETTING SIMPLE ANIMALS ATTACK? WHAT COULD GO WRONG. Defaults to zero so Ian can still be cuddly
var/melee_damage_lower = 0
var/melee_damage_upper = 0
+ var/obj_damage = 0 //how much damage this simple animal does to objects, if any
var/armour_penetration = 0 //How much armour they ignore, as a flat reduction from the targets armour value
var/melee_damage_type = BRUTE //Damage type of a simple mob's melee attack, should it do damage.
var/list/damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1) // 1 for full damage , 0 for none , -1 for 1:1 heal from that source
diff --git a/code/modules/modular_computers/computers/item/computer_damage.dm b/code/modules/modular_computers/computers/item/computer_damage.dm
index 2623794fa9d..b0358edc3c9 100644
--- a/code/modules/modular_computers/computers/item/computer_damage.dm
+++ b/code/modules/modular_computers/computers/item/computer_damage.dm
@@ -1,29 +1,3 @@
-/obj/item/device/modular_computer/emp_act(severity)
- if(prob(20 / severity))
- take_damage(obj_integrity, BURN)
- ..()
-
-/obj/item/device/modular_computer/ex_act(severity)
- switch(severity)
- if(1)
- qdel(src)
- if(2)
- if(prob(25))
- qdel(src)
- else if(prob(50))
- obj_integrity = 0
- if(3)
- if(prob(25))
- obj_integrity = 0
-
-/obj/item/device/modular_computer/bullet_act(obj/item/projectile/P)
- take_damage(P.damage, P.damage_type)
- ..()
-
-/obj/item/device/modular_computer/blob_act()
- if(prob(75))
- take_damage(obj_integrity, BRUTE)
-
/obj/item/device/modular_computer/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
. = ..()
var/component_probability = min(50, max(damage_amount*0.1, 1 - obj_integrity/max_integrity))
@@ -36,17 +10,21 @@
for(var/I in all_components)
var/obj/item/weapon/computer_hardware/H = all_components[I]
if(prob(component_probability))
- H.take_damage(round(damage_amount*0.5))
+ H.take_damage(round(damage_amount*0.5), damage_type, damage_flag, 0)
-/obj/item/device/modular_computer/proc/break_apart(damage = TRUE)
- physical.visible_message("\The [src] breaks apart!")
- var/turf/newloc = get_turf(src)
- new /obj/item/stack/sheet/metal(newloc, round(steel_sheet_cost/2))
- for(var/C in all_components)
- var/obj/item/weapon/computer_hardware/H = all_components[C]
- uninstall_component(H)
- H.forceMove(newloc)
- if(damage && prob(25))
- H.take_damage(rand(10, 30))
+/obj/item/device/modular_computer/deconstruct(disassembled = TRUE)
+ break_apart()
+
+/obj/item/device/modular_computer/proc/break_apart()
+ if(can_deconstruct)
+ physical.visible_message("\The [src] breaks apart!")
+ var/turf/newloc = get_turf(src)
+ new /obj/item/stack/sheet/metal(newloc, round(steel_sheet_cost/2))
+ for(var/C in all_components)
+ var/obj/item/weapon/computer_hardware/H = all_components[C]
+ uninstall_component(H)
+ H.forceMove(newloc)
+ if(prob(25))
+ H.take_damage(rand(10,30), BRUTE, 0, 0)
relay_qdel()
qdel(src)
diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm
index d3406556e27..8e284cc3eea 100644
--- a/code/modules/shuttle/shuttle.dm
+++ b/code/modules/shuttle/shuttle.dm
@@ -33,6 +33,9 @@
return QDEL_HINT_LETMELIVE
+/obj/docking_port/take_damage()
+ return
+
/obj/docking_port/singularity_pull()
return
diff --git a/paradise.dme b/paradise.dme
index 14306bb981e..ef5b9d4d4a9 100644
--- a/paradise.dme
+++ b/paradise.dme
@@ -39,7 +39,7 @@
#include "code\__DEFINES\machines.dm"
#include "code\__DEFINES\math.dm"
#include "code\__DEFINES\misc.dm"
-#include "code\__DEFINES\mob.dm"
+#include "code\__DEFINES\mobs.dm"
#include "code\__DEFINES\pda.dm"
#include "code\__DEFINES\preferences.dm"
#include "code\__DEFINES\process_scheduler.dm"