mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-18 22:21:50 +00:00
Ports the radiation subsystem and cleans up damage flags. (#15715)
This commit is contained in:
@@ -213,6 +213,7 @@
|
|||||||
#include "code\controllers\subsystems\ping.dm"
|
#include "code\controllers\subsystems\ping.dm"
|
||||||
#include "code\controllers\subsystems\plants.dm"
|
#include "code\controllers\subsystems\plants.dm"
|
||||||
#include "code\controllers\subsystems\profiler.dm"
|
#include "code\controllers\subsystems\profiler.dm"
|
||||||
|
#include "code\controllers\subsystems\radiation.dm"
|
||||||
#include "code\controllers\subsystems\radio.dm"
|
#include "code\controllers\subsystems\radio.dm"
|
||||||
#include "code\controllers\subsystems\records.dm"
|
#include "code\controllers\subsystems\records.dm"
|
||||||
#include "code\controllers\subsystems\responseteam.dm"
|
#include "code\controllers\subsystems\responseteam.dm"
|
||||||
@@ -915,6 +916,7 @@
|
|||||||
#include "code\game\objects\items\devices\dociler.dm"
|
#include "code\game\objects\items\devices\dociler.dm"
|
||||||
#include "code\game\objects\items\devices\flash.dm"
|
#include "code\game\objects\items\devices\flash.dm"
|
||||||
#include "code\game\objects\items\devices\floor_painter.dm"
|
#include "code\game\objects\items\devices\floor_painter.dm"
|
||||||
|
#include "code\game\objects\items\devices\geiger.dm"
|
||||||
#include "code\game\objects\items\devices\hacktool.dm"
|
#include "code\game\objects\items\devices\hacktool.dm"
|
||||||
#include "code\game\objects\items\devices\hearing_aid.dm"
|
#include "code\game\objects\items\devices\hearing_aid.dm"
|
||||||
#include "code\game\objects\items\devices\holowarrant.dm"
|
#include "code\game\objects\items\devices\holowarrant.dm"
|
||||||
@@ -2819,6 +2821,7 @@
|
|||||||
#include "code\modules\psionics\mob\mob_assay.dm"
|
#include "code\modules\psionics\mob\mob_assay.dm"
|
||||||
#include "code\modules\psionics\mob\mob_helpers.dm"
|
#include "code\modules\psionics\mob\mob_helpers.dm"
|
||||||
#include "code\modules\psionics\mob\mob_interactions.dm"
|
#include "code\modules\psionics\mob\mob_interactions.dm"
|
||||||
|
#include "code\modules\radiation\radiation.dm"
|
||||||
#include "code\modules\random_map\_random_map_setup.dm"
|
#include "code\modules\random_map\_random_map_setup.dm"
|
||||||
#include "code\modules\random_map\random_map.dm"
|
#include "code\modules\random_map\random_map.dm"
|
||||||
#include "code\modules\random_map\random_map_verbs.dm"
|
#include "code\modules\random_map\random_map_verbs.dm"
|
||||||
|
|||||||
@@ -117,9 +117,9 @@ Contains helper procs for airflow, handled in /connection_group.
|
|||||||
bloody_body(src)
|
bloody_body(src)
|
||||||
var/b_loss = airflow_speed * vsc.airflow_damage
|
var/b_loss = airflow_speed * vsc.airflow_damage
|
||||||
|
|
||||||
apply_damage(b_loss/3, BRUTE, BP_HEAD, used_weapon = "Airflow")
|
apply_damage(b_loss/3, DAMAGE_BRUTE, BP_HEAD, used_weapon = "Airflow")
|
||||||
apply_damage(b_loss/3, BRUTE, BP_CHEST, used_weapon = "Airflow")
|
apply_damage(b_loss/3, DAMAGE_BRUTE, BP_CHEST, used_weapon = "Airflow")
|
||||||
apply_damage(b_loss/3, BRUTE, BP_GROIN, used_weapon = "Airflow")
|
apply_damage(b_loss/3, DAMAGE_BRUTE, BP_GROIN, used_weapon = "Airflow")
|
||||||
|
|
||||||
if(airflow_speed > 10)
|
if(airflow_speed > 10)
|
||||||
Paralyse(round(airflow_speed * vsc.airflow_stun))
|
Paralyse(round(airflow_speed * vsc.airflow_stun))
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
|
|||||||
|
|
||||||
/mob/living/proc/FireBurn(var/firelevel, var/last_temperature, var/pressure)
|
/mob/living/proc/FireBurn(var/firelevel, var/last_temperature, var/pressure)
|
||||||
var/mx = 5 * firelevel/vsc.fire_firelevel_multiplier * min(pressure / ONE_ATMOSPHERE, 1)
|
var/mx = 5 * firelevel/vsc.fire_firelevel_multiplier * min(pressure / ONE_ATMOSPHERE, 1)
|
||||||
apply_damage(2.5*mx, BURN)
|
apply_damage(2.5*mx, DAMAGE_BURN)
|
||||||
|
|
||||||
|
|
||||||
/mob/living/carbon/human/FireBurn(var/firelevel, var/last_temperature, var/pressure)
|
/mob/living/carbon/human/FireBurn(var/firelevel, var/last_temperature, var/pressure)
|
||||||
@@ -452,13 +452,13 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
|
|||||||
|
|
||||||
//Always check these damage procs first if fire damage isn't working. They're probably what's wrong.
|
//Always check these damage procs first if fire damage isn't working. They're probably what's wrong.
|
||||||
|
|
||||||
apply_damage(2.5*mx*head_exposure, BURN, BP_HEAD, used_weapon = "Fire")
|
apply_damage(2.5*mx*head_exposure, DAMAGE_BURN, BP_HEAD, used_weapon = "Fire")
|
||||||
apply_damage(2.5*mx*chest_exposure, BURN, BP_CHEST, used_weapon = "Fire")
|
apply_damage(2.5*mx*chest_exposure, DAMAGE_BURN, BP_CHEST, used_weapon = "Fire")
|
||||||
apply_damage(2.0*mx*groin_exposure, BURN, BP_GROIN, used_weapon = "Fire")
|
apply_damage(2.0*mx*groin_exposure, DAMAGE_BURN, BP_GROIN, used_weapon = "Fire")
|
||||||
apply_damage(0.6*mx*legs_exposure, BURN, BP_L_LEG, used_weapon = "Fire")
|
apply_damage(0.6*mx*legs_exposure, DAMAGE_BURN, BP_L_LEG, used_weapon = "Fire")
|
||||||
apply_damage(0.6*mx*legs_exposure, BURN, BP_R_LEG, used_weapon = "Fire")
|
apply_damage(0.6*mx*legs_exposure, DAMAGE_BURN, BP_R_LEG, used_weapon = "Fire")
|
||||||
apply_damage(0.4*mx*arms_exposure, BURN, BP_L_ARM, used_weapon = "Fire")
|
apply_damage(0.4*mx*arms_exposure, DAMAGE_BURN, BP_L_ARM, used_weapon = "Fire")
|
||||||
apply_damage(0.4*mx*arms_exposure, BURN, BP_R_ARM, used_weapon = "Fire")
|
apply_damage(0.4*mx*arms_exposure, DAMAGE_BURN, BP_R_ARM, used_weapon = "Fire")
|
||||||
|
|
||||||
|
|
||||||
#undef FIRE_LIGHT_1
|
#undef FIRE_LIGHT_1
|
||||||
|
|||||||
@@ -143,4 +143,13 @@
|
|||||||
#define SHIFTL(INT, BITS) ((INT) << (BITS))
|
#define SHIFTL(INT, BITS) ((INT) << (BITS))
|
||||||
|
|
||||||
/// Convenience define for nth-bit flags, 0-indexed
|
/// Convenience define for nth-bit flags, 0-indexed
|
||||||
#define FLAG(BIT) SHIFTL(1, BIT)
|
#define FLAG(BIT) SHIFTL(1, BIT)
|
||||||
|
|
||||||
|
/// Increase the size of L by 1 at the end. Is the old last entry index.
|
||||||
|
#define LIST_INC(L) ((L).len++)
|
||||||
|
|
||||||
|
/// Increase the size of L by 1 at the end. Is the new last entry index.
|
||||||
|
#define LIST_PRE_INC(L) (++(L).len)
|
||||||
|
|
||||||
|
/// Decrease the size of L by 1 from the end. Is the old last entry index.
|
||||||
|
#define LIST_DEC(L) ((L).len--)
|
||||||
@@ -1,29 +1,29 @@
|
|||||||
// Damage things. TODO: Merge these down to reduce on defines.
|
// Damage things. TODO: Merge these down to reduce on defines.
|
||||||
// Way to waste perfectly good damage-type names (BRUTE) on this... If you were really worried about case sensitivity, you could have just used lowertext(damagetype) in the proc.
|
// Way to waste perfectly good damage-type names (DAMAGE_BRUTE) on this... If you were really worried about case sensitivity, you could have just used lowertext(damagetype) in the proc.
|
||||||
#define BRUTE "brute"
|
#define DAMAGE_BRUTE "brute"
|
||||||
#define BURN "fire"
|
#define DAMAGE_BURN "fire"
|
||||||
#define TOX "tox"
|
#define DAMAGE_TOXIN "toxin"
|
||||||
#define OXY "oxy"
|
#define DAMAGE_OXY "oxy"
|
||||||
#define CLONE "clone"
|
#define DAMAGE_CLONE "clone"
|
||||||
#define PAIN "pain"
|
#define DAMAGE_PAIN "pain"
|
||||||
|
#define DAMAGE_RADIATION "radiation"
|
||||||
|
|
||||||
#define CUT "cut"
|
#define CUT "cut"
|
||||||
#define BRUISE "bruise"
|
#define BRUISE "bruise"
|
||||||
#define PIERCE "pierce"
|
#define PIERCE "pierce"
|
||||||
#define LASER "laser"
|
#define LASER "laser"
|
||||||
|
|
||||||
#define DAM_EDGE 1
|
#define DAMAGE_FLAG_EDGE 1
|
||||||
#define DAM_SHARP 2
|
#define DAMAGE_FLAG_SHARP 2
|
||||||
#define DAM_LASER 4
|
#define DAMAGE_FLAG_LASER 4
|
||||||
#define DAM_BULLET 8
|
#define DAMAGE_FLAG_BULLET 8
|
||||||
#define DAM_EXPLODE 16
|
#define DAMAGE_FLAG_EXPLODE 16
|
||||||
#define DAM_DISPERSED 32 // Makes apply_damage calls without specified zone distribute damage rather than randomly choose organ (for humans)
|
#define DAMAGE_FLAG_DISPERSED 32 // Makes apply_damage calls without specified zone distribute damage rather than randomly choose organ (for humans)
|
||||||
#define DAM_BIO 64
|
#define DAMAGE_FLAG_BIO 64
|
||||||
|
|
||||||
#define STUN "stun"
|
#define STUN "stun"
|
||||||
#define WEAKEN "weaken"
|
#define WEAKEN "weaken"
|
||||||
#define PARALYZE "paralize"
|
#define PARALYZE "paralize"
|
||||||
#define IRRADIATE "irradiate"
|
|
||||||
#define SLUR "slur"
|
#define SLUR "slur"
|
||||||
#define STUTTER "stutter"
|
#define STUTTER "stutter"
|
||||||
#define EYE_BLUR "eye_blur"
|
#define EYE_BLUR "eye_blur"
|
||||||
|
|||||||
@@ -500,3 +500,10 @@ Define for getting a bitfield of adjacent turfs that meet a condition.
|
|||||||
#define TEMPLATE_FLAG_RUIN_STARTS_DISALLOWED 32 // Ruin is not available during spawning unless another ruin permits it.
|
#define TEMPLATE_FLAG_RUIN_STARTS_DISALLOWED 32 // Ruin is not available during spawning unless another ruin permits it.
|
||||||
|
|
||||||
#define LANDING_ZONE_RADIUS 25 // Used for autoplacing landmarks on exoplanets
|
#define LANDING_ZONE_RADIUS 25 // Used for autoplacing landmarks on exoplanets
|
||||||
|
|
||||||
|
#define RAD_LEVEL_LOW 1 // Around the level at which radiation starts to become harmful
|
||||||
|
#define RAD_LEVEL_MODERATE 25
|
||||||
|
#define RAD_LEVEL_HIGH 40
|
||||||
|
#define RAD_LEVEL_VERY_HIGH 100
|
||||||
|
|
||||||
|
#define RADIATION_THRESHOLD_CUTOFF 0.1 // Radiation will not affect a tile when below this value.
|
||||||
@@ -61,6 +61,7 @@
|
|||||||
#define SS_PRIORITY_CALAMITY 20 // Singularity, Tesla, Nar'sie, blob, etc.
|
#define SS_PRIORITY_CALAMITY 20 // Singularity, Tesla, Nar'sie, blob, etc.
|
||||||
#define SS_PRIORITY_EVENT 20
|
#define SS_PRIORITY_EVENT 20
|
||||||
#define SS_PRIORITY_DISEASE 20 // Disease ticks.
|
#define SS_PRIORITY_DISEASE 20 // Disease ticks.
|
||||||
|
#define SS_PRIORITY_RADIATION 20 // Radiation processing and cache updates.
|
||||||
#define SS_PRIORITY_ALARMS 20
|
#define SS_PRIORITY_ALARMS 20
|
||||||
#define SS_PRIORITY_PLANTS 20 // Spreading plant effects.
|
#define SS_PRIORITY_PLANTS 20 // Spreading plant effects.
|
||||||
#define SS_PRIORITY_EFFECTS 20 // New-style effects manager. Timing of effects may be off if this gets too far behind.
|
#define SS_PRIORITY_EFFECTS 20 // New-style effects manager. Timing of effects may be off if this gets too far behind.
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ avoid code duplication. This includes items that may sometimes act as a standard
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/mob/living/simple_animal/attackby(obj/item/I, mob/living/user)
|
/mob/living/simple_animal/attackby(obj/item/I, mob/living/user)
|
||||||
if(I.damtype == PAIN)
|
if(I.damtype == DAMAGE_PAIN)
|
||||||
playsound(loc, 'sound/weapons/tap.ogg', I.get_clamped_volume(), 1, -1)
|
playsound(loc, 'sound/weapons/tap.ogg', I.get_clamped_volume(), 1, -1)
|
||||||
return TRUE
|
return TRUE
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ var/list/gamemode_cache = list()
|
|||||||
var/default_brain_health = 400
|
var/default_brain_health = 400
|
||||||
|
|
||||||
//Paincrit knocks someone down once they hit 60 shock_stage, so by default make it so that close to 100 additional damage needs to be dealt,
|
//Paincrit knocks someone down once they hit 60 shock_stage, so by default make it so that close to 100 additional damage needs to be dealt,
|
||||||
//so that it's similar to PAIN. Lowered it a bit since hitting paincrit takes much longer to wear off than a halloss stun.
|
//so that it's similar to DAMAGE_PAIN. Lowered it a bit since hitting paincrit takes much longer to wear off than a halloss stun.
|
||||||
var/organ_damage_spillover_multiplier = 0.5
|
var/organ_damage_spillover_multiplier = 0.5
|
||||||
|
|
||||||
var/bones_can_break = 0
|
var/bones_can_break = 0
|
||||||
|
|||||||
145
code/controllers/subsystems/radiation.dm
Normal file
145
code/controllers/subsystems/radiation.dm
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
#define RADIATION_DECAY_RATE 1
|
||||||
|
#define RADIATION_LOWER_LIMIT 0.15
|
||||||
|
#define RADIATION_MATERIAL_RESISTANCE_DIVISOR 2
|
||||||
|
#define RADIATION_RESISTANCE_MULTIPLIER 1.25
|
||||||
|
|
||||||
|
var/datum/controller/subsystem/radiation/SSradiation
|
||||||
|
|
||||||
|
/datum/controller/subsystem/radiation
|
||||||
|
name = "Radiation"
|
||||||
|
wait = 2 SECONDS
|
||||||
|
priority = SS_PRIORITY_RADIATION
|
||||||
|
flags = SS_NO_INIT
|
||||||
|
|
||||||
|
var/list/sources = list() // all radiation source datums
|
||||||
|
var/list/sources_assoc = list() // Sources indexed by turf for de-duplication.
|
||||||
|
var/list/resistance_cache = list() // Cache of turf's radiation resistance.
|
||||||
|
|
||||||
|
var/list/current_sources = list()
|
||||||
|
var/list/current_res_cache = list()
|
||||||
|
var/list/listeners = list()
|
||||||
|
|
||||||
|
/datum/controller/subsystem/radiation/New()
|
||||||
|
NEW_SS_GLOBAL(SSradiation)
|
||||||
|
|
||||||
|
/datum/controller/subsystem/radiation/fire(resumed = FALSE)
|
||||||
|
if (!resumed)
|
||||||
|
current_sources = sources.Copy()
|
||||||
|
current_res_cache = resistance_cache.Copy()
|
||||||
|
listeners = living_mob_list.Copy()
|
||||||
|
|
||||||
|
while(length(current_sources))
|
||||||
|
var/datum/radiation_source/S = current_sources[length(current_sources)]
|
||||||
|
LIST_DEC(current_sources)
|
||||||
|
|
||||||
|
if(QDELETED(S))
|
||||||
|
sources -= S
|
||||||
|
else if(S.decay)
|
||||||
|
S.update_rad_power(S.rad_power - RADIATION_DECAY_RATE)
|
||||||
|
if (MC_TICK_CHECK)
|
||||||
|
return
|
||||||
|
|
||||||
|
while(length(current_res_cache))
|
||||||
|
var/turf/T = current_res_cache[length(current_res_cache)]
|
||||||
|
LIST_DEC(current_res_cache)
|
||||||
|
|
||||||
|
if(QDELETED(T))
|
||||||
|
resistance_cache -= T
|
||||||
|
else if((length(T.contents) + 1) != resistance_cache[T])
|
||||||
|
resistance_cache -= T // If its stale REMOVE it! It will get added if its needed.
|
||||||
|
if (MC_TICK_CHECK)
|
||||||
|
return
|
||||||
|
|
||||||
|
if(!length(sources))
|
||||||
|
listeners.Cut()
|
||||||
|
|
||||||
|
while(length(listeners))
|
||||||
|
var/atom/A = listeners[length(listeners)]
|
||||||
|
LIST_DEC(listeners)
|
||||||
|
|
||||||
|
if(!QDELETED(A))
|
||||||
|
var/atom/location = A.loc
|
||||||
|
var/rads = 0
|
||||||
|
if(istype(location))
|
||||||
|
rads = location.get_rads()
|
||||||
|
if(rads)
|
||||||
|
A.rad_act(rads)
|
||||||
|
if (MC_TICK_CHECK)
|
||||||
|
return
|
||||||
|
|
||||||
|
// Ray trace from all active radiation sources to T and return the strongest effect.
|
||||||
|
/datum/controller/subsystem/radiation/proc/get_rads_at_turf(turf/T)
|
||||||
|
. = 0
|
||||||
|
if(!istype(T))
|
||||||
|
return
|
||||||
|
|
||||||
|
for(var/value in sources)
|
||||||
|
var/datum/radiation_source/source = value
|
||||||
|
if(source.rad_power < .)
|
||||||
|
continue // Already being affected by a stronger source
|
||||||
|
if(source.source_turf.z != T.z)
|
||||||
|
continue // Radiation is not multi-z
|
||||||
|
if(source.respect_maint)
|
||||||
|
var/area/A = T.loc
|
||||||
|
if(A.flags & RAD_SHIELDED)
|
||||||
|
continue // In shielded area
|
||||||
|
|
||||||
|
var/dist = get_dist(source.source_turf, T)
|
||||||
|
if(dist > source.range)
|
||||||
|
continue // Too far to possibly affect
|
||||||
|
if(source.flat)
|
||||||
|
. = max(., source.rad_power)
|
||||||
|
continue // No need to ray trace for flat field
|
||||||
|
|
||||||
|
// Okay, now ray trace to find resistence!
|
||||||
|
var/turf/origin = source.source_turf
|
||||||
|
var/working = source.rad_power
|
||||||
|
while(origin != T)
|
||||||
|
origin = get_step_towards(origin, T) //Raytracing
|
||||||
|
if(!resistance_cache[origin]) //Only get the resistance if we don't already know it.
|
||||||
|
origin.calc_rad_resistance()
|
||||||
|
if(origin.cached_rad_resistance)
|
||||||
|
working = round((working / (origin.cached_rad_resistance * RADIATION_RESISTANCE_MULTIPLIER)), 0.1)
|
||||||
|
if((working <= .) || (working <= RADIATION_THRESHOLD_CUTOFF))
|
||||||
|
break // Already affected by a stronger source (or its zero...)
|
||||||
|
. = max((working / (dist ** 2)), .) //Butchered version of the inverse square law. Works for this purpose
|
||||||
|
if(. <= RADIATION_THRESHOLD_CUTOFF)
|
||||||
|
. = 0
|
||||||
|
|
||||||
|
// Add a radiation source instance to the repository. It will override any existing source on the same turf.
|
||||||
|
/datum/controller/subsystem/radiation/proc/add_source(datum/radiation_source/S)
|
||||||
|
if(!isturf(S.source_turf))
|
||||||
|
return
|
||||||
|
var/datum/radiation_source/existing = sources_assoc[S.source_turf]
|
||||||
|
if(existing)
|
||||||
|
qdel(existing)
|
||||||
|
sources += S
|
||||||
|
sources_assoc[S.source_turf] = S
|
||||||
|
|
||||||
|
// Creates a temporary radiation source that will decay
|
||||||
|
/datum/controller/subsystem/radiation/proc/radiate(source, power) //Sends out a radiation pulse, taking walls into account
|
||||||
|
if(!(source && power)) //Sanity checking
|
||||||
|
return
|
||||||
|
var/datum/radiation_source/S = new()
|
||||||
|
S.source_turf = get_turf(source)
|
||||||
|
S.update_rad_power(power)
|
||||||
|
add_source(S)
|
||||||
|
|
||||||
|
// Sets the radiation in a range to a constant value.
|
||||||
|
/datum/controller/subsystem/radiation/proc/flat_radiate(source, power, range, respect_maint = FALSE)
|
||||||
|
if(!(source && power && range))
|
||||||
|
return
|
||||||
|
var/datum/radiation_source/S = new()
|
||||||
|
S.flat = TRUE
|
||||||
|
S.range = range
|
||||||
|
S.respect_maint = respect_maint
|
||||||
|
S.source_turf = get_turf(source)
|
||||||
|
S.update_rad_power(power)
|
||||||
|
add_source(S)
|
||||||
|
|
||||||
|
// Irradiates a full Z-level. Hacky way of doing it, but not too expensive.
|
||||||
|
/datum/controller/subsystem/radiation/proc/z_radiate(atom/source, power, respect_maint = FALSE)
|
||||||
|
if(!(power && source))
|
||||||
|
return
|
||||||
|
var/turf/epicentre = locate(round(world.maxx / 2), round(world.maxy / 2), source.z)
|
||||||
|
flat_radiate(epicentre, power, world.maxx, respect_maint)
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
/datum/component/armor/proc/apply_damage_modifications(damage, damage_type, damage_flags, mob/living/victim, armor_pen, silent = FALSE)
|
/datum/component/armor/proc/apply_damage_modifications(damage, damage_type, damage_flags, mob/living/victim, armor_pen, silent = FALSE)
|
||||||
if(armor_flags & ARMOR_TYPE_EXOSUIT)
|
if(armor_flags & ARMOR_TYPE_EXOSUIT)
|
||||||
if(prob(get_blocked(damage_type, damage_flags, armor_pen) * 100)) //extra removal of sharp and edge on account of us being big robots
|
if(prob(get_blocked(damage_type, damage_flags, armor_pen) * 100)) //extra removal of sharp and edge on account of us being big robots
|
||||||
damage_flags &= ~(DAM_SHARP | DAM_EDGE)
|
damage_flags &= ~(DAMAGE_FLAG_SHARP | DAMAGE_FLAG_EDGE)
|
||||||
|
|
||||||
if(damage <= 0)
|
if(damage <= 0)
|
||||||
return args.Copy()
|
return args.Copy()
|
||||||
@@ -43,10 +43,10 @@
|
|||||||
// Blocking values that mean the damage was under armor, so all dangerous flags are removed (edge/sharp)
|
// Blocking values that mean the damage was under armor, so all dangerous flags are removed (edge/sharp)
|
||||||
var/armor_border_blocking = 1 - (under_armor_mult * 1/armor_range_mult)
|
var/armor_border_blocking = 1 - (under_armor_mult * 1/armor_range_mult)
|
||||||
if(blocked >= armor_border_blocking)
|
if(blocked >= armor_border_blocking)
|
||||||
if(damage_flags & DAM_LASER)
|
if(damage_flags & DAMAGE_FLAG_LASER)
|
||||||
damage *= FLUIDLOSS_CONC_BURN/FLUIDLOSS_WIDE_BURN
|
damage *= FLUIDLOSS_CONC_BURN/FLUIDLOSS_WIDE_BURN
|
||||||
damage_flags &= ~(DAM_SHARP | DAM_EDGE | DAM_LASER)
|
damage_flags &= ~(DAMAGE_FLAG_SHARP | DAMAGE_FLAG_EDGE | DAMAGE_FLAG_LASER)
|
||||||
if(damage_type == IRRADIATE)
|
if(damage_type == DAMAGE_RADIATION)
|
||||||
damage = max(0, damage - 100 * blocked)
|
damage = max(0, damage - 100 * blocked)
|
||||||
silent = TRUE
|
silent = TRUE
|
||||||
damage *= 1 - blocked
|
damage *= 1 - blocked
|
||||||
@@ -88,24 +88,24 @@
|
|||||||
/proc/get_armor_key(damage_type, damage_flags)
|
/proc/get_armor_key(damage_type, damage_flags)
|
||||||
var/key
|
var/key
|
||||||
switch(damage_type)
|
switch(damage_type)
|
||||||
if(BRUTE)
|
if(DAMAGE_BRUTE)
|
||||||
if(damage_flags & DAM_BULLET)
|
if(damage_flags & DAMAGE_FLAG_BULLET)
|
||||||
key = "bullet"
|
key = "bullet"
|
||||||
else if(damage_flags & DAM_EXPLODE)
|
else if(damage_flags & DAMAGE_FLAG_EXPLODE)
|
||||||
key = "bomb"
|
key = "bomb"
|
||||||
else
|
else
|
||||||
key = "melee"
|
key = "melee"
|
||||||
if(BURN)
|
if(DAMAGE_BURN)
|
||||||
if(damage_flags & DAM_LASER)
|
if(damage_flags & DAMAGE_FLAG_LASER)
|
||||||
key = "laser"
|
key = "laser"
|
||||||
else if(damage_flags & DAM_EXPLODE)
|
else if(damage_flags & DAMAGE_FLAG_EXPLODE)
|
||||||
key = "bomb"
|
key = "bomb"
|
||||||
else
|
else
|
||||||
key = "energy"
|
key = "energy"
|
||||||
if(TOX)
|
if (DAMAGE_TOXIN)
|
||||||
if(damage_flags & DAM_BIO)
|
if(damage_flags & DAMAGE_FLAG_BIO)
|
||||||
key = "bio" // Otherwise just not blocked by default.
|
key = "bio" // Otherwise just not blocked by default.
|
||||||
if(IRRADIATE)
|
if (DAMAGE_RADIATION)
|
||||||
key = "rad"
|
key = "rad"
|
||||||
return key
|
return key
|
||||||
|
|
||||||
|
|||||||
@@ -219,7 +219,7 @@
|
|||||||
if(organs_to_gib.len)
|
if(organs_to_gib.len)
|
||||||
var/obj/item/organ/external/E = pick(organs_to_gib)
|
var/obj/item/organ/external/E = pick(organs_to_gib)
|
||||||
to_chat(H, "<span class='danger'>You partially phase into \the [impediment], causing your [E.name] to violently dematerialize!</span>")
|
to_chat(H, "<span class='danger'>You partially phase into \the [impediment], causing your [E.name] to violently dematerialize!</span>")
|
||||||
H.apply_damage(35, BRUTE, E, 0)
|
H.apply_damage(35, DAMAGE_BRUTE, E, 0)
|
||||||
|
|
||||||
else
|
else
|
||||||
if(newdest)
|
if(newdest)
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
var/armorpercent = 0
|
var/armorpercent = 0
|
||||||
var/wasblocked = 0
|
var/wasblocked = 0
|
||||||
var/shoulddisarm = 0
|
var/shoulddisarm = 0
|
||||||
var/damagetype = PAIN
|
var/damagetype = DAMAGE_PAIN
|
||||||
var/chargedelay = 4 // 4 half frames = 2 seconds
|
var/chargedelay = 4 // 4 half frames = 2 seconds
|
||||||
|
|
||||||
if(targetIsHuman && targetashuman == user)
|
if(targetIsHuman && targetashuman == user)
|
||||||
@@ -81,11 +81,11 @@
|
|||||||
|
|
||||||
if (user.a_intent == I_HURT)
|
if (user.a_intent == I_HURT)
|
||||||
target_zone = get_zone_with_miss_chance(target_zone, target) //Vary the attack
|
target_zone = get_zone_with_miss_chance(target_zone, target) //Vary the attack
|
||||||
damagetype = BRUTE
|
damagetype = DAMAGE_BRUTE
|
||||||
|
|
||||||
if (targetIsHuman)
|
if (targetIsHuman)
|
||||||
var/mob/living/carbon/human/targethuman = target
|
var/mob/living/carbon/human/targethuman = target
|
||||||
armorpercent = targethuman.get_blocked_ratio(target_zone, BRUTE, damage = force)*100
|
armorpercent = targethuman.get_blocked_ratio(target_zone, DAMAGE_BRUTE, damage = force)*100
|
||||||
wasblocked = targethuman.check_shields(force, src, user, target_zone, null)
|
wasblocked = targethuman.check_shields(force, src, user, target_zone, null)
|
||||||
|
|
||||||
var/damageamount = force
|
var/damageamount = force
|
||||||
|
|||||||
@@ -453,7 +453,7 @@
|
|||||||
else
|
else
|
||||||
randmuti(src.connected.occupant)
|
randmuti(src.connected.occupant)
|
||||||
|
|
||||||
src.connected.occupant.apply_damage(((src.radiation_intensity*3)+src.radiation_duration*3), IRRADIATE, damage_flags = DAM_DISPERSED)
|
src.connected.occupant.apply_damage(((src.radiation_intensity*3)+src.radiation_duration*3), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
src.connected.locked = lock_state
|
src.connected.locked = lock_state
|
||||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||||
|
|
||||||
@@ -547,7 +547,7 @@
|
|||||||
block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration)
|
block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration)
|
||||||
src.connected.occupant.dna.SetUISubBlock(src.selected_ui_block,src.selected_ui_subblock,block)
|
src.connected.occupant.dna.SetUISubBlock(src.selected_ui_block,src.selected_ui_subblock,block)
|
||||||
src.connected.occupant.UpdateAppearance()
|
src.connected.occupant.UpdateAppearance()
|
||||||
src.connected.occupant.apply_damage((src.radiation_intensity+src.radiation_duration), IRRADIATE, damage_flags = DAM_DISPERSED)
|
src.connected.occupant.apply_damage((src.radiation_intensity+src.radiation_duration), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
else
|
else
|
||||||
if (prob(20+src.radiation_intensity))
|
if (prob(20+src.radiation_intensity))
|
||||||
randmutb(src.connected.occupant)
|
randmutb(src.connected.occupant)
|
||||||
@@ -555,7 +555,7 @@
|
|||||||
else
|
else
|
||||||
randmuti(src.connected.occupant)
|
randmuti(src.connected.occupant)
|
||||||
src.connected.occupant.UpdateAppearance()
|
src.connected.occupant.UpdateAppearance()
|
||||||
src.connected.occupant.apply_damage(((src.radiation_intensity*2)+src.radiation_duration), IRRADIATE, damage_flags = DAM_DISPERSED)
|
src.connected.occupant.apply_damage(((src.radiation_intensity*2)+src.radiation_duration), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
src.connected.locked = lock_state
|
src.connected.locked = lock_state
|
||||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||||
|
|
||||||
@@ -612,10 +612,10 @@
|
|||||||
|
|
||||||
//testing("Irradiated SE block [real_SE_block]:[src.selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!")
|
//testing("Irradiated SE block [real_SE_block]:[src.selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!")
|
||||||
connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block)
|
connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block)
|
||||||
src.connected.occupant.apply_damage((src.radiation_intensity+src.radiation_duration), IRRADIATE, damage_flags = DAM_DISPERSED)
|
src.connected.occupant.apply_damage((src.radiation_intensity+src.radiation_duration), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
domutcheck(src.connected.occupant,src.connected)
|
domutcheck(src.connected.occupant,src.connected)
|
||||||
else
|
else
|
||||||
src.connected.occupant.apply_damage(((src.radiation_intensity*2)+src.radiation_duration), IRRADIATE, damage_flags = DAM_DISPERSED)
|
src.connected.occupant.apply_damage(((src.radiation_intensity*2)+src.radiation_duration), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
if (prob(80-src.radiation_duration))
|
if (prob(80-src.radiation_duration))
|
||||||
//testing("Random bad mut!")
|
//testing("Random bad mut!")
|
||||||
randmutb(src.connected.occupant)
|
randmutb(src.connected.occupant)
|
||||||
@@ -737,7 +737,7 @@
|
|||||||
src.connected.occupant.dna.SE = buf.dna.SE
|
src.connected.occupant.dna.SE = buf.dna.SE
|
||||||
src.connected.occupant.dna.UpdateSE()
|
src.connected.occupant.dna.UpdateSE()
|
||||||
domutcheck(src.connected.occupant,src.connected)
|
domutcheck(src.connected.occupant,src.connected)
|
||||||
src.connected.occupant.apply_damage(rand(20,50), damage_flags = DAM_DISPERSED)
|
src.connected.occupant.apply_damage(rand(20,50), damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if (bufferOption == "createInjector")
|
if (bufferOption == "createInjector")
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
to_chat(T, "<span class='danger'>You feel a sharp stabbing pain!</span>")
|
to_chat(T, "<span class='danger'>You feel a sharp stabbing pain!</span>")
|
||||||
playsound(get_turf(src), 'sound/effects/lingstabs.ogg', 50, 1)
|
playsound(get_turf(src), 'sound/effects/lingstabs.ogg', 50, 1)
|
||||||
var/obj/item/organ/external/affecting = T.get_organ(src.zone_sel.selecting)
|
var/obj/item/organ/external/affecting = T.get_organ(src.zone_sel.selecting)
|
||||||
if(affecting.take_damage(40, 0, damage_flags = DAM_SHARP|DAM_EDGE, used_weapon = "massive puncture wound"))
|
if(affecting.take_damage(40, 0, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE, used_weapon = "massive puncture wound"))
|
||||||
T.UpdateDamageIcon()
|
T.UpdateDamageIcon()
|
||||||
|
|
||||||
feedback_add_details("changeling_powers","A[stage]")
|
feedback_add_details("changeling_powers","A[stage]")
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
to_chat(user, SPAN_CULT("An unexplicable force rips through you, tearing the sword from your grasp!"))
|
to_chat(user, SPAN_CULT("An unexplicable force rips through you, tearing the sword from your grasp!"))
|
||||||
|
|
||||||
//random amount of damage between half of the blade's force and the full force of the blade.
|
//random amount of damage between half of the blade's force and the full force of the blade.
|
||||||
user.apply_damage(rand(force/2, force), BRUTE, zone, 0, damage_flags = DAM_SHARP|DAM_EDGE)
|
user.apply_damage(rand(force/2, force), DAMAGE_BRUTE, zone, 0, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE)
|
||||||
user.Weaken(5)
|
user.Weaken(5)
|
||||||
|
|
||||||
user.drop_from_inventory(src)
|
user.drop_from_inventory(src)
|
||||||
|
|||||||
@@ -380,7 +380,7 @@
|
|||||||
if(istype(I, /obj/item/nullrod))
|
if(istype(I, /obj/item/nullrod))
|
||||||
shatter()
|
shatter()
|
||||||
return
|
return
|
||||||
if(I.damtype != BRUTE)
|
if(I.damtype != DAMAGE_BRUTE)
|
||||||
to_chat(user, SPAN_WARNING("You swing at the pylon to no effect."))
|
to_chat(user, SPAN_WARNING("You swing at the pylon to no effect."))
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -388,7 +388,7 @@
|
|||||||
if(istype(source, /obj/item/projectile/beam/cult))
|
if(istype(source, /obj/item/projectile/beam/cult))
|
||||||
return //No feedback loops
|
return //No feedback loops
|
||||||
var/obj/item/projectile/proj = source
|
var/obj/item/projectile/proj = source
|
||||||
if(proj.damage_type == BURN)
|
if(proj.damage_type == DAMAGE_BURN)
|
||||||
if(empowered <= 0)
|
if(empowered <= 0)
|
||||||
visible_message(SPAN_CULT("The beam refracts inside the pylon, splitting into an indistinct violet glow. The crystal takes on a new, more ominous aura!"))
|
visible_message(SPAN_CULT("The beam refracts inside the pylon, splitting into an indistinct violet glow. The crystal takes on a new, more ominous aura!"))
|
||||||
empowered += damage * 0.2
|
empowered += damage * 0.2
|
||||||
@@ -398,7 +398,7 @@
|
|||||||
start_process()
|
start_process()
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
else if(proj.damage_type != BRUTE)
|
else if(proj.damage_type != DAMAGE_BRUTE)
|
||||||
return
|
return
|
||||||
ranged = TRUE
|
ranged = TRUE
|
||||||
|
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ var/hadevent = 0
|
|||||||
if(isNotStationLevel(T.z))
|
if(isNotStationLevel(T.z))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
H.apply_damage((rand(15,75)), IRRADIATE, damage_flags = DAM_DISPERSED)
|
H.apply_damage((rand(15,75)), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
if (prob(5))
|
if (prob(5))
|
||||||
H.apply_damage((rand(90,150)), IRRADIATE, damage_flags = DAM_DISPERSED)
|
H.apply_damage((rand(90,150)), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
if (prob(25))
|
if (prob(25))
|
||||||
if (prob(75))
|
if (prob(75))
|
||||||
randmutb(H)
|
randmutb(H)
|
||||||
|
|||||||
@@ -189,8 +189,7 @@
|
|||||||
/obj/effect/meteor/irradiated/meteor_effect()
|
/obj/effect/meteor/irradiated/meteor_effect()
|
||||||
explosion(src.loc, 0, 0, 4, 3, 0)
|
explosion(src.loc, 0, 0, 4, 3, 0)
|
||||||
new /obj/effect/decal/cleanable/greenglow(get_turf(src))
|
new /obj/effect/decal/cleanable/greenglow(get_turf(src))
|
||||||
for(var/mob/living/L in view(5, src))
|
SSradiation.radiate(src, 50)
|
||||||
L.apply_damage(40, IRRADIATE, damage_flags = DAM_DISPERSED)
|
|
||||||
|
|
||||||
/obj/effect/meteor/golden
|
/obj/effect/meteor/golden
|
||||||
name = "golden meteor"
|
name = "golden meteor"
|
||||||
|
|||||||
@@ -206,12 +206,12 @@
|
|||||||
rng = rand(0,8)
|
rng = rand(0,8)
|
||||||
switch(rng)
|
switch(rng)
|
||||||
if(0)
|
if(0)
|
||||||
apply_damage(instability * 0.3, PAIN)
|
apply_damage(instability * 0.3, DAMAGE_PAIN)
|
||||||
if(1)
|
if(1)
|
||||||
return
|
return
|
||||||
if(2)
|
if(2)
|
||||||
if(can_feel_pain())
|
if(can_feel_pain())
|
||||||
apply_damage(instability * 0.3, PAIN)
|
apply_damage(instability * 0.3, DAMAGE_PAIN)
|
||||||
to_chat(src, "<span class='danger'>You feel a sharp pain!</span>")
|
to_chat(src, "<span class='danger'>You feel a sharp pain!</span>")
|
||||||
if(3)
|
if(3)
|
||||||
apply_effect(instability * 0.3, EYE_BLUR)
|
apply_effect(instability * 0.3, EYE_BLUR)
|
||||||
@@ -234,12 +234,12 @@
|
|||||||
rng = rand(0,8)
|
rng = rand(0,8)
|
||||||
switch(rng)
|
switch(rng)
|
||||||
if(0)
|
if(0)
|
||||||
apply_damage(instability * 0.2, IRRADIATE)
|
apply_damage(instability * 0.2, DAMAGE_RADIATION)
|
||||||
if(1)
|
if(1)
|
||||||
return
|
return
|
||||||
if(2)
|
if(2)
|
||||||
if(can_feel_pain())
|
if(can_feel_pain())
|
||||||
apply_damage(instability * 0.7, PAIN)
|
apply_damage(instability * 0.7, DAMAGE_PAIN)
|
||||||
to_chat(src, "<span class='danger'>You feel an extremely angonizing pain from all over your body!</span>")
|
to_chat(src, "<span class='danger'>You feel an extremely angonizing pain from all over your body!</span>")
|
||||||
if(3)
|
if(3)
|
||||||
apply_effect(instability * 0.5, EYE_BLUR)
|
apply_effect(instability * 0.5, EYE_BLUR)
|
||||||
@@ -257,14 +257,14 @@
|
|||||||
rng = rand(0,7)
|
rng = rand(0,7)
|
||||||
switch(rng)
|
switch(rng)
|
||||||
if(0)
|
if(0)
|
||||||
apply_effect(instability, IRRADIATE)
|
apply_damage(instability, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
if(1)
|
if(1)
|
||||||
visible_message("<span class='warning'>\The [src] suddenly collapses!</span>",
|
visible_message("<span class='warning'>\The [src] suddenly collapses!</span>",
|
||||||
"<span class='danger'>You suddenly feel very light-headed, and faint!</span>")
|
"<span class='danger'>You suddenly feel very light-headed, and faint!</span>")
|
||||||
Paralyse(instability * 0.1)
|
Paralyse(instability * 0.1)
|
||||||
if(2)
|
if(2)
|
||||||
if(can_feel_pain())
|
if(can_feel_pain())
|
||||||
apply_damage(instability, PAIN)
|
apply_damage(instability, DAMAGE_PAIN)
|
||||||
to_chat(src, "<span class='danger'>You feel an extremely angonizing pain from all over your body!</span>")
|
to_chat(src, "<span class='danger'>You feel an extremely angonizing pain from all over your body!</span>")
|
||||||
if(3)
|
if(3)
|
||||||
apply_effect(instability, EYE_BLUR)
|
apply_effect(instability, EYE_BLUR)
|
||||||
@@ -295,7 +295,7 @@
|
|||||||
// This should only be used for EXTERNAL sources of instability, such as from someone or something glowing.
|
// This should only be used for EXTERNAL sources of instability, such as from someone or something glowing.
|
||||||
/mob/living/proc/receive_radiated_instability(amount)
|
/mob/living/proc/receive_radiated_instability(amount)
|
||||||
// Energy armor like from the AMI RIG can protect from this.
|
// Energy armor like from the AMI RIG can protect from this.
|
||||||
var/armor_ratio = get_blocked_ratio(BP_CHEST, BURN, damage = 40)
|
var/armor_ratio = get_blocked_ratio(BP_CHEST, DAMAGE_BURN, damage = 40)
|
||||||
amount = amount * armor_ratio
|
amount = amount * armor_ratio
|
||||||
if(amount && prob(10))
|
if(amount && prob(10))
|
||||||
if(isSynthetic())
|
if(isSynthetic())
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
var/damage_to_inflict = max(L.health / L.getMaxHealth(), 0) // Otherwise, those in crit would actually be healed.
|
var/damage_to_inflict = max(L.health / L.getMaxHealth(), 0) // Otherwise, those in crit would actually be healed.
|
||||||
|
|
||||||
var/armor_factor = L.modify_damage_by_armor(BP_CHEST, 30, BURN, armor_pen = 40)
|
var/armor_factor = L.modify_damage_by_armor(BP_CHEST, 30, DAMAGE_BURN, armor_pen = 40)
|
||||||
damage_to_inflict = damage_to_inflict * armor_factor
|
damage_to_inflict = damage_to_inflict * armor_factor
|
||||||
|
|
||||||
if(L.isSynthetic())
|
if(L.isSynthetic())
|
||||||
|
|||||||
@@ -25,4 +25,4 @@
|
|||||||
icon_state = "plasma_bolt"
|
icon_state = "plasma_bolt"
|
||||||
damage = 25
|
damage = 25
|
||||||
armor_penetration = 15
|
armor_penetration = 15
|
||||||
damage_type = BRUTE
|
damage_type = DAMAGE_BRUTE
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
icon_state = "lightning"
|
icon_state = "lightning"
|
||||||
damage = 25
|
damage = 25
|
||||||
armor_penetration = 25
|
armor_penetration = 25
|
||||||
damage_type = BURN
|
damage_type = DAMAGE_BURN
|
||||||
|
|
||||||
muzzle_type = /obj/effect/projectile/muzzle/tesla
|
muzzle_type = /obj/effect/projectile/muzzle/tesla
|
||||||
tracer_type = /obj/effect/projectile/tracer/tesla
|
tracer_type = /obj/effect/projectile/tracer/tesla
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
/obj/item/projectile/overload
|
/obj/item/projectile/overload
|
||||||
name = "overloaded bolt"
|
name = "overloaded bolt"
|
||||||
icon_state = "bluespace"
|
icon_state = "bluespace"
|
||||||
damage_type = BURN
|
damage_type = DAMAGE_BURN
|
||||||
armor_penetration = 100
|
armor_penetration = 100
|
||||||
|
|
||||||
/obj/item/spell/projectile/overload/make_projectile(obj/item/projectile/projectile_type, mob/living/user)
|
/obj/item/spell/projectile/overload/make_projectile(obj/item/projectile/projectile_type, mob/living/user)
|
||||||
|
|||||||
@@ -51,5 +51,5 @@
|
|||||||
continue
|
continue
|
||||||
var/radius = max(get_dist(L, src), 1)
|
var/radius = max(get_dist(L, src), 1)
|
||||||
var/rads = (adjusted_power / 10) * ( 1 / (radius**2) )
|
var/rads = (adjusted_power / 10) * ( 1 / (radius**2) )
|
||||||
L.apply_effect(rads, IRRADIATE)
|
L.apply_damage(rads, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
adjust_instability(2)
|
adjust_instability(2)
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ var/global/list/bluespace_inhibitors
|
|||||||
do_break()
|
do_break()
|
||||||
|
|
||||||
/obj/machinery/anti_bluespace/bullet_act(var/obj/item/projectile/Proj)
|
/obj/machinery/anti_bluespace/bullet_act(var/obj/item/projectile/Proj)
|
||||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
if(!(Proj.damage_type == DAMAGE_BRUTE || Proj.damage_type == DAMAGE_BURN))
|
||||||
return
|
return
|
||||||
if(!Proj.damage)
|
if(!Proj.damage)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ update_flag
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/machinery/portable_atmospherics/canister/bullet_act(var/obj/item/projectile/Proj)
|
/obj/machinery/portable_atmospherics/canister/bullet_act(var/obj/item/projectile/Proj)
|
||||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
if(!(Proj.damage_type == DAMAGE_BRUTE || Proj.damage_type == DAMAGE_BURN))
|
||||||
return
|
return
|
||||||
|
|
||||||
if(Proj.damage)
|
if(Proj.damage)
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj)
|
/obj/machinery/bot/bullet_act(var/obj/item/projectile/Proj)
|
||||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
if(!(Proj.damage_type == DAMAGE_BRUTE || Proj.damage_type == DAMAGE_BURN))
|
||||||
return
|
return
|
||||||
health -= Proj.damage
|
health -= Proj.damage
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -203,7 +203,7 @@
|
|||||||
src.bugged = 1
|
src.bugged = 1
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
else if(W.damtype == BRUTE || W.damtype == BURN) //bashing cameras
|
else if(W.damtype == DAMAGE_BRUTE || W.damtype == DAMAGE_BURN) //bashing cameras
|
||||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
if (W.force >= src.toughness)
|
if (W.force >= src.toughness)
|
||||||
user.do_attack_animation(src)
|
user.do_attack_animation(src)
|
||||||
|
|||||||
@@ -186,7 +186,7 @@
|
|||||||
H=locate(src.active_record.implant)
|
H=locate(src.active_record.implant)
|
||||||
|
|
||||||
if ((H) && (istype(H)))
|
if ((H) && (istype(H)))
|
||||||
dat += "<b>Health:</b> [H.sensehealth()] | OXY-BURN-TOX-BRUTE<br>"
|
dat += "<b>Health:</b> [H.sensehealth()] | OXY-BURN-TOXIN-BRUTE<br>"
|
||||||
else
|
else
|
||||||
dat += "<font color=red>Unable to locate implant.</font><br>"
|
dat += "<font color=red>Unable to locate implant.</font><br>"
|
||||||
|
|
||||||
|
|||||||
@@ -88,8 +88,8 @@
|
|||||||
/obj/machinery/crusher_base/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
/obj/machinery/crusher_base/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||||
if(status != "idle" && prob(40) && ishuman(user))
|
if(status != "idle" && prob(40) && ishuman(user))
|
||||||
var/mob/living/carbon/human/M = user
|
var/mob/living/carbon/human/M = user
|
||||||
M.apply_damage(45, BRUTE, user.get_active_hand())
|
M.apply_damage(45, DAMAGE_BRUTE, user.get_active_hand())
|
||||||
M.apply_damage(45, PAIN)
|
M.apply_damage(45, DAMAGE_PAIN)
|
||||||
M.visible_message("<span class='danger'>[user]'s hand catches in the [src]!</span>", "<span class='danger'>Your hand gets caught in the [src]!</span>")
|
M.visible_message("<span class='danger'>[user]'s hand catches in the [src]!</span>", "<span class='danger'>Your hand gets caught in the [src]!</span>")
|
||||||
M.say("*scream")
|
M.say("*scream")
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|||||||
@@ -91,9 +91,9 @@ for reference:
|
|||||||
/obj/structure/blocker/bullet_act(obj/item/projectile/P, def_zone)
|
/obj/structure/blocker/bullet_act(obj/item/projectile/P, def_zone)
|
||||||
var/damage_modifier = 0.4
|
var/damage_modifier = 0.4
|
||||||
switch(P.damage_type)
|
switch(P.damage_type)
|
||||||
if(BURN)
|
if(DAMAGE_BURN)
|
||||||
damage_modifier = 1
|
damage_modifier = 1
|
||||||
if(BRUTE)
|
if(DAMAGE_BRUTE)
|
||||||
damage_modifier = 0.75
|
damage_modifier = 0.75
|
||||||
health -= P.damage * damage_modifier
|
health -= P.damage * damage_modifier
|
||||||
if(!check_dismantle())
|
if(!check_dismantle())
|
||||||
@@ -120,9 +120,9 @@ for reference:
|
|||||||
else
|
else
|
||||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
switch(W.damtype)
|
switch(W.damtype)
|
||||||
if(BURN)
|
if(DAMAGE_BURN)
|
||||||
src.health -= W.force * 1
|
src.health -= W.force * 1
|
||||||
if(BRUTE)
|
if(DAMAGE_BRUTE)
|
||||||
src.health -= W.force * 0.75
|
src.health -= W.force * 0.75
|
||||||
shake_animation()
|
shake_animation()
|
||||||
playsound(src.loc, material.hitsound, W.get_clamped_volume(), 1)
|
playsound(src.loc, material.hitsound, W.get_clamped_volume(), 1)
|
||||||
|
|||||||
@@ -580,15 +580,10 @@ obj/machinery/door/airlock/glass_centcom/attackby(obj/item/I, mob/user)
|
|||||||
/obj/machinery/door/airlock/uranium/process()
|
/obj/machinery/door/airlock/uranium/process()
|
||||||
if(world.time > last_event+20)
|
if(world.time > last_event+20)
|
||||||
if(prob(50))
|
if(prob(50))
|
||||||
radiate()
|
SSradiation.radiate(src, 50)
|
||||||
last_event = world.time
|
last_event = world.time
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/machinery/door/airlock/uranium/proc/radiate()
|
|
||||||
for(var/mob/living/L in range (3,src))
|
|
||||||
L.apply_damage(15, IRRADIATE, damage_flags = DAM_DISPERSED)
|
|
||||||
return
|
|
||||||
|
|
||||||
//---Phoron door
|
//---Phoron door
|
||||||
/obj/machinery/door/airlock/phoron
|
/obj/machinery/door/airlock/phoron
|
||||||
name = "Phoron Airlock"
|
name = "Phoron Airlock"
|
||||||
@@ -1555,7 +1550,7 @@ About the new airlock wires panel:
|
|||||||
/mob/living/airlock_crush(var/crush_damage)
|
/mob/living/airlock_crush(var/crush_damage)
|
||||||
. = ..()
|
. = ..()
|
||||||
for(var/i = 1, i <= AIRLOCK_CRUSH_DIVISOR, i++)
|
for(var/i = 1, i <= AIRLOCK_CRUSH_DIVISOR, i++)
|
||||||
apply_damage((crush_damage / AIRLOCK_CRUSH_DIVISOR), BRUTE)
|
apply_damage((crush_damage / AIRLOCK_CRUSH_DIVISOR), DAMAGE_BRUTE)
|
||||||
|
|
||||||
SetStunned(5)
|
SetStunned(5)
|
||||||
SetWeakened(5)
|
SetWeakened(5)
|
||||||
|
|||||||
@@ -248,10 +248,10 @@
|
|||||||
if (destroy_hits <= 0)
|
if (destroy_hits <= 0)
|
||||||
visible_message("<span class='danger'>\The [src.name] disintegrates!</span>")
|
visible_message("<span class='danger'>\The [src.name] disintegrates!</span>")
|
||||||
switch (Proj.damage_type)
|
switch (Proj.damage_type)
|
||||||
if(BRUTE)
|
if(DAMAGE_BRUTE)
|
||||||
new /obj/item/stack/material/steel(src.loc, 2)
|
new /obj/item/stack/material/steel(src.loc, 2)
|
||||||
new /obj/item/stack/rods(src.loc, 3)
|
new /obj/item/stack/rods(src.loc, 3)
|
||||||
if(BURN)
|
if(DAMAGE_BURN)
|
||||||
new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes!
|
new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes!
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
@@ -361,7 +361,7 @@
|
|||||||
if(src.density && istype(I, /obj/item) && user.a_intent == I_HURT && !istype(I, /obj/item/card))
|
if(src.density && istype(I, /obj/item) && user.a_intent == I_HURT && !istype(I, /obj/item/card))
|
||||||
var/obj/item/W = I
|
var/obj/item/W = I
|
||||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
if(W.damtype == DAMAGE_BRUTE || W.damtype == DAMAGE_BURN)
|
||||||
user.do_attack_animation(src)
|
user.do_attack_animation(src)
|
||||||
if(W.force < min_force)
|
if(W.force < min_force)
|
||||||
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [W] with no visible effect.</span>")
|
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [W] with no visible effect.</span>")
|
||||||
|
|||||||
@@ -195,7 +195,7 @@
|
|||||||
var/aforce = I.force
|
var/aforce = I.force
|
||||||
playsound(src.loc, 'sound/effects/glass_hit.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/glass_hit.ogg', 75, 1)
|
||||||
visible_message("<span class='danger'>[src] was hit by [I].</span>")
|
visible_message("<span class='danger'>[src] was hit by [I].</span>")
|
||||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
if(I.damtype == DAMAGE_BRUTE || I.damtype == DAMAGE_BURN)
|
||||||
take_damage(aforce)
|
take_damage(aforce)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
|||||||
@@ -559,7 +559,7 @@
|
|||||||
|
|
||||||
/obj/machinery/iv_drip/proc/iv_rip()
|
/obj/machinery/iv_drip/proc/iv_rip()
|
||||||
attached.visible_message(SPAN_WARNING("The needle is ripped out of [attached]'s [vein.name]."), SPAN_DANGER("The needle <B>painfully</B> rips out of your [vein.name]."))
|
attached.visible_message(SPAN_WARNING("The needle is ripped out of [attached]'s [vein.name]."), SPAN_DANGER("The needle <B>painfully</B> rips out of your [vein.name]."))
|
||||||
vein.take_damage(brute = 5, damage_flags = DAM_SHARP)
|
vein.take_damage(brute = 5, damage_flags = DAMAGE_FLAG_SHARP)
|
||||||
vein = null
|
vein = null
|
||||||
attached = null
|
attached = null
|
||||||
|
|
||||||
|
|||||||
@@ -497,12 +497,12 @@ Class Procs:
|
|||||||
return
|
return
|
||||||
|
|
||||||
if(hair_style.length >= 4 && prob(25))
|
if(hair_style.length >= 4 && prob(25))
|
||||||
H.apply_damage(30, BRUTE, BP_HEAD)
|
H.apply_damage(30, DAMAGE_BRUTE, BP_HEAD)
|
||||||
H.visible_message(SPAN_DANGER("\The [H]'s hair catches in \the [src]!"),
|
H.visible_message(SPAN_DANGER("\The [H]'s hair catches in \the [src]!"),
|
||||||
SPAN_DANGER("Your hair gets caught in \the [src]!"))
|
SPAN_DANGER("Your hair gets caught in \the [src]!"))
|
||||||
if(H.can_feel_pain())
|
if(H.can_feel_pain())
|
||||||
H.emote("scream")
|
H.emote("scream")
|
||||||
H.apply_damage(45, PAIN)
|
H.apply_damage(45, DAMAGE_PAIN)
|
||||||
|
|
||||||
/obj/machinery/proc/do_signaler() // override this to customize effects
|
/obj/machinery/proc/do_signaler() // override this to customize effects
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -509,7 +509,7 @@
|
|||||||
occupant.take_organ_damage(0, radiation_level * 2 + rand(1, 3))
|
occupant.take_organ_damage(0, radiation_level * 2 + rand(1, 3))
|
||||||
if(radiation_level > 1)
|
if(radiation_level > 1)
|
||||||
occupant.take_organ_damage(0, radiation_level + rand(1, 3))
|
occupant.take_organ_damage(0, radiation_level + rand(1, 3))
|
||||||
occupant.apply_damage(radiation_level * 10, IRRADIATE, damage_flags = DAM_DISPERSED)
|
occupant.apply_damage(radiation_level * 10, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
|
|
||||||
/obj/machinery/suit_cycler/proc/finished_job()
|
/obj/machinery/suit_cycler/proc/finished_job()
|
||||||
visible_message("[icon2html(src, viewers(get_turf(src)))] <span class='notice'>\The [src] pings loudly.</span>")
|
visible_message("[icon2html(src, viewers(get_turf(src)))] <span class='notice'>\The [src] pings loudly.</span>")
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
|
|
||||||
/obj/effect/decal/cleanable/greenglow/radioactive/process()
|
/obj/effect/decal/cleanable/greenglow/radioactive/process()
|
||||||
for(var/mob/living/L in range(4,src))
|
for(var/mob/living/L in range(4,src))
|
||||||
L.apply_effect(25, IRRADIATE, blocked = 0)
|
L.apply_damage(25, DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
|
|
||||||
/obj/effect/decal/cleanable/cobweb
|
/obj/effect/decal/cleanable/cobweb
|
||||||
name = "cobweb"
|
name = "cobweb"
|
||||||
|
|||||||
@@ -248,7 +248,7 @@
|
|||||||
burst_out(O)
|
burst_out(O)
|
||||||
if (O.owner)
|
if (O.owner)
|
||||||
if(amount_grown > 40 && prob(1))
|
if(amount_grown > 40 && prob(1))
|
||||||
O.owner.apply_damage(1, TOX, O.limb_name)
|
O.owner.apply_damage(1, DAMAGE_TOXIN, O.limb_name)
|
||||||
if(world.time > last_itch + 30 SECONDS)
|
if(world.time > last_itch + 30 SECONDS)
|
||||||
last_itch = world.time
|
last_itch = world.time
|
||||||
O.owner.visible_message(
|
O.owner.visible_message(
|
||||||
|
|||||||
82
code/game/objects/items/devices/geiger.dm
Normal file
82
code/game/objects/items/devices/geiger.dm
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
/obj/item/device/geiger
|
||||||
|
name = "geiger counter"
|
||||||
|
desc = "A handheld device used for detecting and measuring radiation in an area."
|
||||||
|
icon = 'icons/obj/geiger_counter.dmi'
|
||||||
|
icon_state = "geiger_off"
|
||||||
|
item_state = "multitool"
|
||||||
|
w_class = ITEMSIZE_SMALL
|
||||||
|
action_button_name = "Toggle geiger counter"
|
||||||
|
var/scanning = 0
|
||||||
|
var/radiation_count = 0
|
||||||
|
var/datum/sound_token/sound_token
|
||||||
|
var/geiger_volume = 0
|
||||||
|
var/sound_id
|
||||||
|
|
||||||
|
/obj/item/device/geiger/Initialize()
|
||||||
|
. = ..()
|
||||||
|
sound_id = "[type]_[sequential_id(type)]"
|
||||||
|
|
||||||
|
/obj/item/device/geiger/proc/update_sound(playing)
|
||||||
|
if(playing && !sound_token)
|
||||||
|
sound_token = sound_player.PlayLoopingSound(src, sound_id, "sound/items/geiger.ogg", volume = geiger_volume, range = 4, falloff = 3, prefer_mute = TRUE)
|
||||||
|
else if(!playing && sound_token)
|
||||||
|
QDEL_NULL(sound_token)
|
||||||
|
|
||||||
|
/obj/item/device/geiger/Destroy()
|
||||||
|
. = ..()
|
||||||
|
STOP_PROCESSING(SSprocessing, src)
|
||||||
|
update_sound(0)
|
||||||
|
|
||||||
|
/obj/item/device/geiger/process()
|
||||||
|
if(!scanning)
|
||||||
|
return
|
||||||
|
radiation_count = SSradiation.get_rads_at_turf(get_turf(src))
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
/obj/item/device/geiger/examine(mob/user)
|
||||||
|
. = ..()
|
||||||
|
var/msg = "[scanning ? "ambient" : "stored"] Radiation level: [radiation_count ? radiation_count : "0"] IU/s."
|
||||||
|
if(radiation_count > RAD_LEVEL_LOW)
|
||||||
|
to_chat(user, SPAN_WARNING("[msg]"))
|
||||||
|
else
|
||||||
|
to_chat(user, SPAN_NOTICE("[msg]"))
|
||||||
|
|
||||||
|
/obj/item/device/geiger/attack_self(mob/user)
|
||||||
|
scanning = !scanning
|
||||||
|
if(scanning)
|
||||||
|
START_PROCESSING(SSprocessing, src)
|
||||||
|
else
|
||||||
|
STOP_PROCESSING(SSprocessing, src)
|
||||||
|
update_icon()
|
||||||
|
to_chat(user, SPAN_NOTICE("[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src]."))
|
||||||
|
|
||||||
|
/obj/item/device/geiger/update_icon()
|
||||||
|
if(!scanning)
|
||||||
|
icon_state = "geiger_off"
|
||||||
|
update_sound(0)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
if(!sound_token) update_sound(1)
|
||||||
|
|
||||||
|
switch(radiation_count)
|
||||||
|
if(null) icon_state = "geiger_on_1"
|
||||||
|
if(-INFINITY to RAD_LEVEL_LOW)
|
||||||
|
icon_state = "geiger_on_1"
|
||||||
|
geiger_volume = 0
|
||||||
|
sound_token.SetVolume(geiger_volume)
|
||||||
|
if(RAD_LEVEL_LOW + 0.01 to RAD_LEVEL_MODERATE)
|
||||||
|
icon_state = "geiger_on_2"
|
||||||
|
geiger_volume = 10
|
||||||
|
sound_token.SetVolume(geiger_volume)
|
||||||
|
if(RAD_LEVEL_MODERATE + 0.1 to RAD_LEVEL_HIGH)
|
||||||
|
icon_state = "geiger_on_3"
|
||||||
|
geiger_volume = 25
|
||||||
|
sound_token.SetVolume(geiger_volume)
|
||||||
|
if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
|
||||||
|
icon_state = "geiger_on_4"
|
||||||
|
geiger_volume = 40
|
||||||
|
sound_token.SetVolume(geiger_volume)
|
||||||
|
if(RAD_LEVEL_VERY_HIGH + 1 to INFINITY)
|
||||||
|
icon_state = "geiger_on_5"
|
||||||
|
geiger_volume = 60
|
||||||
|
sound_token.SetVolume(geiger_volume)
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
to_chat(user, SPAN_WARNING("You break \the [src] apart, spilling its contents everywhere!"))
|
to_chat(user, SPAN_WARNING("You break \the [src] apart, spilling its contents everywhere!"))
|
||||||
fuel = 0
|
fuel = 0
|
||||||
new /obj/effect/decal/cleanable/greenglow(get_turf(user))
|
new /obj/effect/decal/cleanable/greenglow(get_turf(user))
|
||||||
user.apply_damage(rand(15,30), IRRADIATE, damage_flags = DAM_DISPERSED)
|
user.apply_damage(rand(15,30), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
/obj/item/target/bullet_act(var/obj/item/projectile/Proj)
|
/obj/item/target/bullet_act(var/obj/item/projectile/Proj)
|
||||||
var/p_x = Proj.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset Proj.p_x!"
|
var/p_x = Proj.p_x + pick(0,0,0,0,0,-1,1) // really ugly way of coding "sometimes offset Proj.p_x!"
|
||||||
var/p_y = Proj.p_y + pick(0,0,0,0,0,-1,1)
|
var/p_y = Proj.p_y + pick(0,0,0,0,0,-1,1)
|
||||||
var/decaltype = (Proj.damage_flags & DAM_BULLET) ? DECAL_BULLET : DECAL_SCORCH
|
var/decaltype = (Proj.damage_flags & DAMAGE_FLAG_BULLET) ? DECAL_BULLET : DECAL_SCORCH
|
||||||
|
|
||||||
virtual_icon = new(icon, icon_state)
|
virtual_icon = new(icon, icon_state)
|
||||||
|
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ obj/item/clothing/mask/chewable/Destroy()
|
|||||||
|
|
||||||
/obj/item/clothing/mask/chewable/proc/damagecrunch(mob/living/carbon/human/user)
|
/obj/item/clothing/mask/chewable/proc/damagecrunch(mob/living/carbon/human/user)
|
||||||
if(src == user.wear_mask) // are we still chewing the gum?
|
if(src == user.wear_mask) // are we still chewing the gum?
|
||||||
user.apply_damage(damage_per_crunch, BRUTE, BP_HEAD)
|
user.apply_damage(damage_per_crunch, DAMAGE_BRUTE, BP_HEAD)
|
||||||
user.apply_damage(damage_per_crunch/2, PAIN, BP_HEAD)
|
user.apply_damage(damage_per_crunch/2, DAMAGE_PAIN, BP_HEAD)
|
||||||
to_chat(user, SPAN_DANGER("You bite down hard on \the [name]!"))
|
to_chat(user, SPAN_DANGER("You bite down hard on \the [name]!"))
|
||||||
crunching = FALSE
|
crunching = FALSE
|
||||||
|
|
||||||
|
|||||||
@@ -853,9 +853,9 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
|||||||
if(user.IgniteMob())
|
if(user.IgniteMob())
|
||||||
user.visible_message(SPAN_DANGER("<b>[user]</b> accidentally sets themselves on fire!"))
|
user.visible_message(SPAN_DANGER("<b>[user]</b> accidentally sets themselves on fire!"))
|
||||||
if(user.l_hand == src)
|
if(user.l_hand == src)
|
||||||
user.apply_damage(2, BURN,BP_L_HAND)
|
user.apply_damage(2, DAMAGE_BURN,BP_L_HAND)
|
||||||
else
|
else
|
||||||
user.apply_damage(2, BURN,BP_R_HAND)
|
user.apply_damage(2, DAMAGE_BURN,BP_R_HAND)
|
||||||
if(last_open <= world.time - 20) //Spam limiter.
|
if(last_open <= world.time - 20) //Spam limiter.
|
||||||
last_open = world.time
|
last_open = world.time
|
||||||
user.visible_message(SPAN_DANGER("After a few attempts, <b>[user]</b> manages to light \the [src], they however burn their finger in the process."), range = 3)
|
user.visible_message(SPAN_DANGER("After a few attempts, <b>[user]</b> manages to light \the [src], they however burn their finger in the process."), range = 3)
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
/obj/item/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
|
/obj/item/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
|
||||||
if(istype(M,/mob/living))
|
if(istype(M,/mob/living))
|
||||||
var/mob/living/L = M
|
var/mob/living/L = M
|
||||||
L.apply_effect(rand(5,20), IRRADIATE, blocked = 0)
|
L.apply_damage(rand(5,20), DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
|
|
||||||
if (NOT_FLAG(M.mutations, NOCLONE)) // prevents drained people from having their DNA changed
|
if (NOT_FLAG(M.mutations, NOCLONE)) // prevents drained people from having their DNA changed
|
||||||
if (buf.types & DNA2_BUF_UI)
|
if (buf.types & DNA2_BUF_UI)
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
H.attack_log += text("\[[time_stamp()]\] <span class='warning'>[s] ([H.ckey])</span>")
|
H.attack_log += text("\[[time_stamp()]\] <span class='warning'>[s] ([H.ckey])</span>")
|
||||||
log_attack("[s] ([H.ckey])",ckey=key_name(H))
|
log_attack("[s] ([H.ckey])",ckey=key_name(H))
|
||||||
|
|
||||||
if(O.take_damage(3, 0, damage_flags = DAM_SHARP|DAM_EDGE, used_weapon = "teeth marks"))
|
if(O.take_damage(3, 0, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE, used_weapon = "teeth marks"))
|
||||||
H:UpdateDamageIcon()
|
H:UpdateDamageIcon()
|
||||||
|
|
||||||
last_chew = world.time
|
last_chew = world.time
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
part.take_damage(burn = 15, used_weapon = "Electronics meltdown")
|
part.take_damage(burn = 15, used_weapon = "Electronics meltdown")
|
||||||
else
|
else
|
||||||
var/mob/living/M = imp_in
|
var/mob/living/M = imp_in
|
||||||
M.apply_damage(15,BURN)
|
M.apply_damage(15,DAMAGE_BURN)
|
||||||
name = "melted implant"
|
name = "melted implant"
|
||||||
desc = "Charred circuit in melted plastic case. Wonder what that used to be..."
|
desc = "Charred circuit in melted plastic case. Wonder what that used to be..."
|
||||||
icon_state = "implant_melted"
|
icon_state = "implant_melted"
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
damage_coef -= 0.2
|
damage_coef -= 0.2
|
||||||
return
|
return
|
||||||
|
|
||||||
if(H.apply_damage(25 * damage_coef, BRUTE, affecting))
|
if(H.apply_damage(25 * damage_coef, DAMAGE_BRUTE, affecting))
|
||||||
H.updatehealth()
|
H.updatehealth()
|
||||||
|
|
||||||
if(H.can_feel_pain())
|
if(H.can_feel_pain())
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
for(var/thing in O.implants)
|
for(var/thing in O.implants)
|
||||||
var/obj/S = thing
|
var/obj/S = thing
|
||||||
usr.visible_message("<span class='notice'>[usr] starts carefully digging out something in [H == usr ? "themselves" : H]...</span>")
|
usr.visible_message("<span class='notice'>[usr] starts carefully digging out something in [H == usr ? "themselves" : H]...</span>")
|
||||||
O.take_damage(8, 0, DAM_SHARP|DAM_EDGE, src)
|
O.take_damage(8, 0, DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE, src)
|
||||||
H.custom_pain("<font size=3><span class='danger'>It burns!</span></font>", 50)
|
H.custom_pain("<font size=3><span class='danger'>It burns!</span></font>", 50)
|
||||||
if(do_mob(usr, H, 100))
|
if(do_mob(usr, H, 100))
|
||||||
H.remove_implant(S, FALSE)
|
H.remove_implant(S, FALSE)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
/obj/item/material/sword/perform_technique(var/mob/living/carbon/human/target, var/mob/living/carbon/human/user, var/target_zone)
|
/obj/item/material/sword/perform_technique(var/mob/living/carbon/human/target, var/mob/living/carbon/human/user, var/target_zone)
|
||||||
var/armor_reduction = target.get_blocked_ratio(target_zone, BRUTE, DAM_EDGE|DAM_SHARP, damage = force)*100
|
var/armor_reduction = target.get_blocked_ratio(target_zone, DAMAGE_BRUTE, DAMAGE_FLAG_EDGE|DAMAGE_FLAG_SHARP, damage = force)*100
|
||||||
var/obj/item/organ/external/affecting = target.get_organ(target_zone)
|
var/obj/item/organ/external/affecting = target.get_organ(target_zone)
|
||||||
if(!affecting)
|
if(!affecting)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -605,7 +605,7 @@
|
|||||||
icon_state = "flag_hegemony0"
|
icon_state = "flag_hegemony0"
|
||||||
base_icon = "flag_hegemony"
|
base_icon = "flag_hegemony"
|
||||||
contained_sprite = TRUE
|
contained_sprite = TRUE
|
||||||
damtype = BURN
|
damtype = DAMAGE_BURN
|
||||||
|
|
||||||
/obj/item/material/twohanded/pike/silver/Initialize(newloc, material_key)
|
/obj/item/material/twohanded/pike/silver/Initialize(newloc, material_key)
|
||||||
. = ..(newloc, MATERIAL_SILVER)
|
. = ..(newloc, MATERIAL_SILVER)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
user.Weaken(3 * force)
|
user.Weaken(3 * force)
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
H.apply_damage(2*force, BRUTE, BP_HEAD)
|
H.apply_damage(2*force, DAMAGE_BRUTE, BP_HEAD)
|
||||||
else
|
else
|
||||||
user.take_organ_damage(2*force)
|
user.take_organ_damage(2*force)
|
||||||
return
|
return
|
||||||
@@ -96,14 +96,14 @@
|
|||||||
user.Weaken(3 * force)
|
user.Weaken(3 * force)
|
||||||
if(ishuman(user))
|
if(ishuman(user))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
H.apply_damage(2 * force, BRUTE, BP_HEAD)
|
H.apply_damage(2 * force, DAMAGE_BRUTE, BP_HEAD)
|
||||||
else
|
else
|
||||||
user.take_organ_damage(2 * force)
|
user.take_organ_damage(2 * force)
|
||||||
return
|
return
|
||||||
if(..() && user.a_intent == I_DISARM)
|
if(..() && user.a_intent == I_DISARM)
|
||||||
if(ishuman(target))
|
if(ishuman(target))
|
||||||
var/mob/living/carbon/human/T = target
|
var/mob/living/carbon/human/T = target
|
||||||
T.apply_damage(40, PAIN, target_zone)
|
T.apply_damage(40, DAMAGE_PAIN, target_zone)
|
||||||
return
|
return
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
|
|||||||
@@ -533,7 +533,7 @@
|
|||||||
T.visible_message("<span class='danger'>\The [src] turns on.</span>")
|
T.visible_message("<span class='danger'>\The [src] turns on.</span>")
|
||||||
playsound(loc, 'sound/items/welder_activate.ogg', 50, 1)
|
playsound(loc, 'sound/items/welder_activate.ogg', 50, 1)
|
||||||
force = 15
|
force = 15
|
||||||
damtype = BURN
|
damtype = DAMAGE_BURN
|
||||||
w_class = ITEMSIZE_LARGE
|
w_class = ITEMSIZE_LARGE
|
||||||
welding = TRUE
|
welding = TRUE
|
||||||
hitsound = SOUNDS_LASER_MEAT
|
hitsound = SOUNDS_LASER_MEAT
|
||||||
@@ -552,7 +552,7 @@
|
|||||||
T.visible_message("<span class='warning'>\The [src] turns off.</span>")
|
T.visible_message("<span class='warning'>\The [src] turns off.</span>")
|
||||||
playsound(loc, 'sound/items/welder_deactivate.ogg', 50, 1)
|
playsound(loc, 'sound/items/welder_deactivate.ogg', 50, 1)
|
||||||
force = 3
|
force = 3
|
||||||
damtype = BRUTE
|
damtype = DAMAGE_BRUTE
|
||||||
w_class = initial(w_class)
|
w_class = initial(w_class)
|
||||||
welding = FALSE
|
welding = FALSE
|
||||||
hitsound = /singleton/sound_category/swing_hit_sound
|
hitsound = /singleton/sound_category/swing_hit_sound
|
||||||
@@ -946,10 +946,10 @@
|
|||||||
if(!user.gloves)
|
if(!user.gloves)
|
||||||
var/UserLoc = get_equip_slot()
|
var/UserLoc = get_equip_slot()
|
||||||
if(UserLoc == slot_l_hand)
|
if(UserLoc == slot_l_hand)
|
||||||
user.apply_damage(5, BURN, BP_L_HAND)
|
user.apply_damage(5, DAMAGE_BURN, BP_L_HAND)
|
||||||
to_chat(user, SPAN_DANGER("The steel wool burns your left hand!"))
|
to_chat(user, SPAN_DANGER("The steel wool burns your left hand!"))
|
||||||
else if(UserLoc == slot_r_hand)
|
else if(UserLoc == slot_r_hand)
|
||||||
user.apply_damage(5, BURN, BP_R_HAND)
|
user.apply_damage(5, DAMAGE_BURN, BP_R_HAND)
|
||||||
to_chat(user, SPAN_DANGER("The steel wool burns your right hand!"))
|
to_chat(user, SPAN_DANGER("The steel wool burns your right hand!"))
|
||||||
|
|
||||||
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
else
|
else
|
||||||
target_zone = pick(BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG)
|
target_zone = pick(BP_L_FOOT, BP_R_FOOT, BP_L_LEG, BP_R_LEG)
|
||||||
|
|
||||||
var/success = L.apply_damage(30, BRUTE, target_zone, used_weapon = src, armor_pen = activated_armor_penetration)
|
var/success = L.apply_damage(30, DAMAGE_BRUTE, target_zone, used_weapon = src, armor_pen = activated_armor_penetration)
|
||||||
if(!success)
|
if(!success)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
var/sharp = 0 // whether this object cuts
|
var/sharp = 0 // whether this object cuts
|
||||||
var/edge = FALSE // whether this object is more likely to dismember
|
var/edge = FALSE // whether this object is more likely to dismember
|
||||||
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
|
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
|
||||||
var/damtype = BRUTE
|
var/damtype = DAMAGE_BRUTE
|
||||||
var/force = 0
|
var/force = 0
|
||||||
var/armor_penetration = 0
|
var/armor_penetration = 0
|
||||||
var/noslice = 0 // To make it not able to slice things.
|
var/noslice = 0 // To make it not able to slice things.
|
||||||
@@ -251,8 +251,8 @@
|
|||||||
/obj/proc/damage_flags()
|
/obj/proc/damage_flags()
|
||||||
. = 0
|
. = 0
|
||||||
if(has_edge(src))
|
if(has_edge(src))
|
||||||
. |= DAM_EDGE
|
. |= DAMAGE_FLAG_EDGE
|
||||||
if(is_sharp(src))
|
if(is_sharp(src))
|
||||||
. |= DAM_SHARP
|
. |= DAMAGE_FLAG_SHARP
|
||||||
if(damtype == BURN)
|
if(damtype == DAMAGE_BURN)
|
||||||
. |= DAM_LASER
|
. |= DAMAGE_FLAG_LASER
|
||||||
|
|||||||
@@ -551,7 +551,7 @@
|
|||||||
log_debug("random_obj (voidsuit): Type [suit.type] was unable to spawn a matching helmet!")
|
log_debug("random_obj (voidsuit): Type [suit.type] was unable to spawn a matching helmet!")
|
||||||
new /obj/item/clothing/shoes/magboots(loc)
|
new /obj/item/clothing/shoes/magboots(loc)
|
||||||
if (damaged && prob(60))
|
if (damaged && prob(60))
|
||||||
suit.create_breaches(pick(BRUTE, BURN), rand(1, 5))
|
suit.create_breaches(pick(DAMAGE_BRUTE, DAMAGE_BURN), rand(1, 5))
|
||||||
|
|
||||||
//Random MRE stuff
|
//Random MRE stuff
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
playsound(src, barricade_hitsound, 50, 1)
|
playsound(src, barricade_hitsound, 50, 1)
|
||||||
if(is_wired)
|
if(is_wired)
|
||||||
visible_message(SPAN_DANGER("\The [src]'s barbed wire slices into [L]!"))
|
visible_message(SPAN_DANGER("\The [src]'s barbed wire slices into [L]!"))
|
||||||
L.apply_damage(rand(5, 10), BRUTE, pick(BP_R_HAND, BP_L_HAND), "barbed wire", DAM_SHARP|DAM_EDGE, 25)
|
L.apply_damage(rand(5, 10), DAMAGE_BRUTE, pick(BP_R_HAND, BP_L_HAND), "barbed wire", DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE, 25)
|
||||||
L.do_attack_animation(src)
|
L.do_attack_animation(src)
|
||||||
take_damage(damage)
|
take_damage(damage)
|
||||||
|
|
||||||
|
|||||||
@@ -203,6 +203,7 @@
|
|||||||
new /obj/item/clothing/head/radiation(src)
|
new /obj/item/clothing/head/radiation(src)
|
||||||
new /obj/item/clothing/suit/radiation(src)
|
new /obj/item/clothing/suit/radiation(src)
|
||||||
new /obj/item/clothing/glasses/safety/goggles(src)
|
new /obj/item/clothing/glasses/safety/goggles(src)
|
||||||
|
new /obj/item/device/geiger(src)
|
||||||
for(var/i = 1 to 2)
|
for(var/i = 1 to 2)
|
||||||
new /obj/item/reagent_containers/hypospray/autoinjector/hyronalin(src)
|
new /obj/item/reagent_containers/hypospray/autoinjector/hyronalin(src)
|
||||||
|
|
||||||
|
|||||||
@@ -69,7 +69,7 @@
|
|||||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
user.do_attack_animation(src, W)
|
user.do_attack_animation(src, W)
|
||||||
var/force_damage = W.force
|
var/force_damage = W.force
|
||||||
if(W.damtype == BURN)
|
if(W.damtype == DAMAGE_BURN)
|
||||||
force_damage *= 1.25
|
force_damage *= 1.25
|
||||||
health -= force_damage
|
health -= force_damage
|
||||||
playsound(loc, 'sound/effects/attackblob.ogg', 80, TRUE)
|
playsound(loc, 'sound/effects/attackblob.ogg', 80, TRUE)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
user.do_attack_animation(src, W)
|
user.do_attack_animation(src, W)
|
||||||
var/force_damage = W.force
|
var/force_damage = W.force
|
||||||
if(W.damtype == BURN)
|
if(W.damtype == DAMAGE_BURN)
|
||||||
force_damage *= 1.25
|
force_damage *= 1.25
|
||||||
health -= force_damage
|
health -= force_damage
|
||||||
playsound(loc, 'sound/effects/attackblob.ogg', 80, TRUE)
|
playsound(loc, 'sound/effects/attackblob.ogg', 80, TRUE)
|
||||||
|
|||||||
@@ -74,7 +74,7 @@
|
|||||||
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
|
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
|
||||||
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
|
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
|
||||||
switch(Proj.damage_type)
|
switch(Proj.damage_type)
|
||||||
if(BRUTE)
|
if(DAMAGE_BRUTE)
|
||||||
//bullets
|
//bullets
|
||||||
if(Proj.original == src || prob(20))
|
if(Proj.original == src || prob(20))
|
||||||
Proj.damage *= between(0, Proj.damage/60, 0.5)
|
Proj.damage *= between(0, Proj.damage/60, 0.5)
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
else
|
else
|
||||||
Proj.damage *= between(0, Proj.damage/60, 1)
|
Proj.damage *= between(0, Proj.damage/60, 1)
|
||||||
passthrough = 1
|
passthrough = 1
|
||||||
if(BURN)
|
if(DAMAGE_BURN)
|
||||||
//beams and other projectiles are either blocked completely by grilles or stop half the damage.
|
//beams and other projectiles are either blocked completely by grilles or stop half the damage.
|
||||||
if(!(Proj.original == src || prob(20)))
|
if(!(Proj.original == src || prob(20)))
|
||||||
Proj.damage *= 0.5
|
Proj.damage *= 0.5
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
if(passthrough)
|
if(passthrough)
|
||||||
. = PROJECTILE_CONTINUE
|
. = PROJECTILE_CONTINUE
|
||||||
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
|
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == DAMAGE_BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
|
||||||
|
|
||||||
src.health -= damage*0.2
|
src.health -= damage*0.2
|
||||||
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
|
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
|
||||||
|
|||||||
@@ -105,7 +105,7 @@
|
|||||||
if(W.can_puncture())
|
if(W.can_puncture())
|
||||||
user.visible_message(SPAN_DANGER("[user] pierces \the [src] with \the [W]!"), SPAN_WARNING("You pierce \the [src] with \the [W]!"))
|
user.visible_message(SPAN_DANGER("[user] pierces \the [src] with \the [W]!"), SPAN_WARNING("You pierce \the [src] with \the [W]!"))
|
||||||
deflate(TRUE)
|
deflate(TRUE)
|
||||||
else if(W.damtype == BRUTE || W.damtype == BURN)
|
else if(W.damtype == DAMAGE_BRUTE || W.damtype == DAMAGE_BURN)
|
||||||
hit(W.force)
|
hit(W.force)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
if(!material || !material.radioactivity)
|
if(!material || !material.radioactivity)
|
||||||
return
|
return
|
||||||
for(var/mob/living/L in range(1,src))
|
for(var/mob/living/L in range(1,src))
|
||||||
L.apply_damage(round(material.radioactivity / 20), IRRADIATE)
|
L.apply_damage(round(material.radioactivity / 20), DAMAGE_RADIATION)
|
||||||
|
|
||||||
/obj/structure/railing/Initialize()
|
/obj/structure/railing/Initialize()
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -213,7 +213,7 @@
|
|||||||
playsound(get_turf(src), 'sound/effects/grillehit.ogg', 50, TRUE)
|
playsound(get_turf(src), 'sound/effects/grillehit.ogg', 50, TRUE)
|
||||||
if(prob(30))
|
if(prob(30))
|
||||||
G.affecting.Weaken(5)
|
G.affecting.Weaken(5)
|
||||||
G.affecting.apply_damage(15, BRUTE, BP_HEAD)
|
G.affecting.apply_damage(15, DAMAGE_BRUTE, BP_HEAD)
|
||||||
else
|
else
|
||||||
G.affecting.forceMove(get_step(src, get_dir(user, src)))
|
G.affecting.forceMove(get_step(src, get_dir(user, src)))
|
||||||
G.affecting.Weaken(5)
|
G.affecting.Weaken(5)
|
||||||
@@ -273,7 +273,7 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
if(W.force && (W.damtype == BURN || W.damtype == BRUTE))
|
if(W.force && (W.damtype == DAMAGE_BURN || W.damtype == DAMAGE_BRUTE))
|
||||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
visible_message(SPAN_WARNING("\The [src] has been [LAZYLEN(W.attack_verb) ? pick(W.attack_verb) : "attacked"] with \the [W] by \the [user]!"))
|
visible_message(SPAN_WARNING("\The [src] has been [LAZYLEN(W.attack_verb) ? pick(W.attack_verb) : "attacked"] with \the [W] by \the [user]!"))
|
||||||
take_damage(W.force)
|
take_damage(W.force)
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
else if(istype(W,/obj/item))
|
else if(istype(W,/obj/item))
|
||||||
var/obj/item/I = W
|
var/obj/item/I = W
|
||||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
if(I.damtype == DAMAGE_BRUTE || I.damtype == DAMAGE_BURN)
|
||||||
if(I.force < 10)
|
if(I.force < 10)
|
||||||
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [I] with no visible effect.</span>")
|
user.visible_message("<span class='danger'>\The [user] hits \the [src] with \the [I] with no visible effect.</span>")
|
||||||
else
|
else
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
if(!material.radioactivity)
|
if(!material.radioactivity)
|
||||||
return
|
return
|
||||||
for(var/mob/living/L in range(1,src))
|
for(var/mob/living/L in range(1,src))
|
||||||
L.apply_damage(round(material.radioactivity/3),IRRADIATE, damage_flags = DAM_DISPERSED)
|
L.apply_damage(round(material.radioactivity/3),DAMAGE_RADIATION, damage_flags = DAMAGE_FLAG_DISPERSED)
|
||||||
|
|
||||||
/obj/structure/simple_door/iron/New(var/newloc,var/material_name, var/complexity)
|
/obj/structure/simple_door/iron/New(var/newloc,var/material_name, var/complexity)
|
||||||
..(newloc, MATERIAL_IRON, complexity)
|
..(newloc, MATERIAL_IRON, complexity)
|
||||||
|
|||||||
@@ -292,7 +292,7 @@
|
|||||||
occupant.apply_effect(6, STUN)
|
occupant.apply_effect(6, STUN)
|
||||||
occupant.apply_effect(6, WEAKEN)
|
occupant.apply_effect(6, WEAKEN)
|
||||||
occupant.apply_effect(6, STUTTER)
|
occupant.apply_effect(6, STUTTER)
|
||||||
occupant.apply_damage(10, BRUTE, def_zone)
|
occupant.apply_damage(10, DAMAGE_BRUTE, def_zone)
|
||||||
playsound(src.loc, "punch", 50, 1, -1)
|
playsound(src.loc, "punch", 50, 1, -1)
|
||||||
if(isliving(A))
|
if(isliving(A))
|
||||||
var/mob/living/victim = A
|
var/mob/living/victim = A
|
||||||
@@ -300,7 +300,7 @@
|
|||||||
victim.apply_effect(6, STUN)
|
victim.apply_effect(6, STUN)
|
||||||
victim.apply_effect(6, WEAKEN)
|
victim.apply_effect(6, WEAKEN)
|
||||||
victim.apply_effect(6, STUTTER)
|
victim.apply_effect(6, STUTTER)
|
||||||
victim.apply_damage(10, BRUTE, def_zone)
|
victim.apply_damage(10, DAMAGE_BRUTE, def_zone)
|
||||||
|
|
||||||
if(pulling)
|
if(pulling)
|
||||||
occupant.visible_message(SPAN_DANGER("[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!"))
|
occupant.visible_message(SPAN_DANGER("[pulling] has thrusted \the [name] into \the [A], throwing \the [occupant] out of it!"))
|
||||||
|
|||||||
@@ -207,9 +207,9 @@
|
|||||||
|
|
||||||
/obj/item/material/stool/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
/obj/item/material/stool/apply_hit_effect(mob/living/target, mob/living/user, var/hit_zone)
|
||||||
if(prob(300 / force)) // Weaker materials are more likely to shatter on people randomly.
|
if(prob(300 / force)) // Weaker materials are more likely to shatter on people randomly.
|
||||||
var/blocked = target.get_blocked_ratio(hit_zone, BRUTE)
|
var/blocked = target.get_blocked_ratio(hit_zone, DAMAGE_BRUTE)
|
||||||
target.Weaken(force * BLOCKED_MULT(blocked))
|
target.Weaken(force * BLOCKED_MULT(blocked))
|
||||||
target.apply_damage(force * 2, BRUTE, hit_zone, blocked, src)
|
target.apply_damage(force * 2, DAMAGE_BRUTE, hit_zone, blocked, src)
|
||||||
user.visible_message(SPAN_DANGER("[user] [material.destruction_desc] \the [src] to pieces against \the [target]'s [hit_zone]!"), SPAN_DANGER("\The [src] [material.destruction_desc] to pieces against \the [target]'s [hit_zone]!"))
|
user.visible_message(SPAN_DANGER("[user] [material.destruction_desc] \the [src] to pieces against \the [target]'s [hit_zone]!"), SPAN_DANGER("\The [src] [material.destruction_desc] to pieces against \the [target]'s [hit_zone]!"))
|
||||||
use_material_shatter = FALSE
|
use_material_shatter = FALSE
|
||||||
shatter()
|
shatter()
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
hider = user
|
hider = user
|
||||||
if(ishuman(user) && prob(5))
|
if(ishuman(user) && prob(5))
|
||||||
var/mob/living/carbon/human/H = user
|
var/mob/living/carbon/human/H = user
|
||||||
H.take_overall_damage(5, 0, DAM_SHARP, src)
|
H.take_overall_damage(5, 0, DAMAGE_FLAG_SHARP, src)
|
||||||
to_chat(user, SPAN_WARNING("You cut yourself while climbing into \the [src]!"))
|
to_chat(user, SPAN_WARNING("You cut yourself while climbing into \the [src]!"))
|
||||||
|
|
||||||
/obj/structure/trash_pile/relaymove(mob/user)
|
/obj/structure/trash_pile/relaymove(mob/user)
|
||||||
|
|||||||
@@ -247,7 +247,7 @@
|
|||||||
if(istype(W, /obj/item/grab) && get_dist(src,user)<2)
|
if(istype(W, /obj/item/grab) && get_dist(src,user)<2)
|
||||||
var/obj/item/grab/G = W
|
var/obj/item/grab/G = W
|
||||||
if(istype(G.affecting,/mob/living))
|
if(istype(G.affecting,/mob/living))
|
||||||
grab_smash_attack(G, BRUTE)
|
grab_smash_attack(G, DAMAGE_BRUTE)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(W.flags & NOBLUDGEON)
|
if(W.flags & NOBLUDGEON)
|
||||||
@@ -284,7 +284,7 @@
|
|||||||
dismantle_window()
|
dismantle_window()
|
||||||
else
|
else
|
||||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
if(W.damtype == DAMAGE_BRUTE || W.damtype == DAMAGE_BURN)
|
||||||
if(reinf)
|
if(reinf)
|
||||||
user.do_attack_animation(src)
|
user.do_attack_animation(src)
|
||||||
if(W.force >= REINFORCED_WINDOW_DAMAGE_FORCE)
|
if(W.force >= REINFORCED_WINDOW_DAMAGE_FORCE)
|
||||||
@@ -305,7 +305,7 @@
|
|||||||
playsound(src, hitsound, 10, 1)
|
playsound(src, hitsound, 10, 1)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/structure/window/proc/grab_smash_attack(obj/item/grab/G, var/damtype = BRUTE)
|
/obj/structure/window/proc/grab_smash_attack(obj/item/grab/G, var/damtype = DAMAGE_BRUTE)
|
||||||
var/mob/living/M = G.affecting
|
var/mob/living/M = G.affecting
|
||||||
var/mob/living/user = G.assailant
|
var/mob/living/user = G.assailant
|
||||||
|
|
||||||
@@ -673,7 +673,7 @@
|
|||||||
if(istype(W, /obj/item/grab) && get_dist(src,user)<2)
|
if(istype(W, /obj/item/grab) && get_dist(src,user)<2)
|
||||||
var/obj/item/grab/G = W
|
var/obj/item/grab/G = W
|
||||||
if(istype(G.affecting,/mob/living))
|
if(istype(G.affecting,/mob/living))
|
||||||
grab_smash_attack(G, BRUTE)
|
grab_smash_attack(G, DAMAGE_BRUTE)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(W.flags & NOBLUDGEON)
|
if(W.flags & NOBLUDGEON)
|
||||||
@@ -709,7 +709,7 @@
|
|||||||
dismantle_window()
|
dismantle_window()
|
||||||
else
|
else
|
||||||
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
user.setClickCooldown(DEFAULT_ATTACK_COOLDOWN)
|
||||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
if(W.damtype == DAMAGE_BRUTE || W.damtype == DAMAGE_BURN)
|
||||||
if(reinf)
|
if(reinf)
|
||||||
user.do_attack_animation(src)
|
user.do_attack_animation(src)
|
||||||
if(W.force >= FULL_REINFORCED_WINDOW_DAMAGE_FORCE)
|
if(W.force >= FULL_REINFORCED_WINDOW_DAMAGE_FORCE)
|
||||||
|
|||||||
@@ -254,8 +254,7 @@
|
|||||||
if(!total_radiation)
|
if(!total_radiation)
|
||||||
return
|
return
|
||||||
|
|
||||||
for(var/mob/living/L in range(3,src))
|
SSradiation.radiate(src, total_radiation)
|
||||||
L.apply_damage(total_radiation, IRRADIATE, damage_flags = DAM_DISPERSED)
|
|
||||||
return total_radiation
|
return total_radiation
|
||||||
|
|
||||||
/turf/simulated/wall/proc/burn(temperature)
|
/turf/simulated/wall/proc/burn(temperature)
|
||||||
|
|||||||
@@ -39,15 +39,15 @@
|
|||||||
if("feet")
|
if("feet")
|
||||||
zone = pick(BP_L_FOOT, BP_R_FOOT)
|
zone = pick(BP_L_FOOT, BP_R_FOOT)
|
||||||
if(!H.shoes)
|
if(!H.shoes)
|
||||||
H.apply_effect(400 / (target.mob_size * (target.mob_size * 0.25)), PAIN)//Halloss instead of instant knockdown
|
H.apply_effect(400 / (target.mob_size * (target.mob_size * 0.25)), DAMAGE_PAIN)//Halloss instead of instant knockdown
|
||||||
//Mainly for the benefit of giant monsters like vaurca breeders
|
//Mainly for the benefit of giant monsters like vaurca breeders
|
||||||
if(BP_L_HAND, BP_R_HAND)
|
if(BP_L_HAND, BP_R_HAND)
|
||||||
zone = type
|
zone = type
|
||||||
if(!H.gloves)
|
if(!H.gloves)
|
||||||
H.apply_effect(250 / (target.mob_size * (target.mob_size * 0.25)), PAIN)
|
H.apply_effect(250 / (target.mob_size * (target.mob_size * 0.25)), DAMAGE_PAIN)
|
||||||
if(!(types & TYPE_SYNTHETIC))
|
if(!(types & TYPE_SYNTHETIC))
|
||||||
target.apply_damage(rand(6 , 14), PAIN, def_zone = zone, used_weapon = src)
|
target.apply_damage(rand(6 , 14), DAMAGE_PAIN, def_zone = zone, used_weapon = src)
|
||||||
target.apply_damage(rand(1 , 3), BRUTE, def_zone = zone, used_weapon = src)
|
target.apply_damage(rand(1 , 3), DAMAGE_BRUTE, def_zone = zone, used_weapon = src)
|
||||||
|
|
||||||
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
|
playsound(target.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||||
layer = MOB_LAYER - 0.2
|
layer = MOB_LAYER - 0.2
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
heat_limit = H.species.heat_level_3
|
heat_limit = H.species.heat_level_3
|
||||||
|
|
||||||
if(pipe_air.temperature > heat_limit + 1)
|
if(pipe_air.temperature > heat_limit + 1)
|
||||||
M.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BP_CHEST, used_weapon = "Excessive Heat")
|
M.apply_damage(4 * log(pipe_air.temperature - heat_limit), DAMAGE_BURN, BP_CHEST, used_weapon = "Excessive Heat")
|
||||||
|
|
||||||
//fancy radiation glowing
|
//fancy radiation glowing
|
||||||
if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //start glowing at 500K
|
if(pipe_air.temperature && (icon_temperature > 500 || pipe_air.temperature > 500)) //start glowing at 500K
|
||||||
|
|||||||
@@ -178,7 +178,7 @@
|
|||||||
/obj/effect/blob/proc/attack_living(var/mob/living/L)
|
/obj/effect/blob/proc/attack_living(var/mob/living/L)
|
||||||
if(!L)
|
if(!L)
|
||||||
return
|
return
|
||||||
var/blob_damage = pick(BRUTE, BURN)
|
var/blob_damage = pick(DAMAGE_BRUTE, DAMAGE_BURN)
|
||||||
attack_msg(L)
|
attack_msg(L)
|
||||||
L.apply_damage(rand(damage_min, damage_max), blob_damage, used_weapon = "blob tendril")
|
L.apply_damage(rand(damage_min, damage_max), blob_damage, used_weapon = "blob tendril")
|
||||||
|
|
||||||
@@ -195,9 +195,9 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
switch(Proj.damage_type)
|
switch(Proj.damage_type)
|
||||||
if(BRUTE)
|
if(DAMAGE_BRUTE)
|
||||||
take_damage(Proj.damage / brute_resist)
|
take_damage(Proj.damage / brute_resist)
|
||||||
if(BURN)
|
if(DAMAGE_BURN)
|
||||||
take_damage((Proj.damage / laser_resist) / fire_resist)
|
take_damage((Proj.damage / laser_resist) / fire_resist)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
|
||||||
@@ -218,11 +218,11 @@
|
|||||||
|
|
||||||
var/damage = 0
|
var/damage = 0
|
||||||
switch(W.damtype)
|
switch(W.damtype)
|
||||||
if(BURN)
|
if(DAMAGE_BURN)
|
||||||
damage = (W.force / fire_resist)
|
damage = (W.force / fire_resist)
|
||||||
if(W.iswelder())
|
if(W.iswelder())
|
||||||
playsound(get_turf(src), 'sound/items/Welder.ogg', 100, TRUE)
|
playsound(get_turf(src), 'sound/items/Welder.ogg', 100, TRUE)
|
||||||
if(BRUTE)
|
if(DAMAGE_BRUTE)
|
||||||
damage = (W.force / brute_resist)
|
damage = (W.force / brute_resist)
|
||||||
|
|
||||||
take_damage(damage)
|
take_damage(damage)
|
||||||
@@ -391,7 +391,7 @@
|
|||||||
origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2)
|
origin_tech = list(TECH_MATERIAL = 2, TECH_BIO = 2)
|
||||||
if(TENDRIL_FIRE)
|
if(TENDRIL_FIRE)
|
||||||
desc = "A tendril removed from an asteroclast. It's hot to the touch."
|
desc = "A tendril removed from an asteroclast. It's hot to the touch."
|
||||||
damtype = BURN
|
damtype = DAMAGE_BURN
|
||||||
force = 15
|
force = 15
|
||||||
color = COLOR_AMBER
|
color = COLOR_AMBER
|
||||||
origin_tech = list(TECH_POWER = 2, TECH_BIO = 2)
|
origin_tech = list(TECH_POWER = 2, TECH_BIO = 2)
|
||||||
|
|||||||
@@ -399,7 +399,7 @@
|
|||||||
var/obj/item/clothing/ring/ring = null //Covered ring
|
var/obj/item/clothing/ring/ring = null //Covered ring
|
||||||
var/mob/living/carbon/human/wearer = null //Used for covered rings when dropping
|
var/mob/living/carbon/human/wearer = null //Used for covered rings when dropping
|
||||||
var/punch_force = 0 //How much damage do these gloves add to a punch?
|
var/punch_force = 0 //How much damage do these gloves add to a punch?
|
||||||
var/punch_damtype = BRUTE //What type of damage does this make fists be?
|
var/punch_damtype = DAMAGE_BRUTE //What type of damage does this make fists be?
|
||||||
body_parts_covered = HANDS
|
body_parts_covered = HANDS
|
||||||
slot_flags = SLOT_GLOVES
|
slot_flags = SLOT_GLOVES
|
||||||
attack_verb = list("challenged")
|
attack_verb = list("challenged")
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
/datum/breach
|
/datum/breach
|
||||||
var/class = 0 // Size. Lower is smaller. Uses floating point values!
|
var/class = 0 // Size. Lower is smaller. Uses floating point values!
|
||||||
var/descriptor // 'gaping hole' etc.
|
var/descriptor // 'gaping hole' etc.
|
||||||
var/damtype = BURN // Punctured or melted
|
var/damtype = DAMAGE_BURN // Punctured or melted
|
||||||
var/obj/item/clothing/suit/space/holder // Suit containing the list of breaches holding this instance.
|
var/obj/item/clothing/suit/space/holder // Suit containing the list of breaches holding this instance.
|
||||||
|
|
||||||
/obj/item/clothing/suit/space
|
/obj/item/clothing/suit/space
|
||||||
@@ -46,9 +46,9 @@ var/global/list/breach_burn_descriptors = list(
|
|||||||
//Sanity...
|
//Sanity...
|
||||||
class = between(1, round(class), 5)
|
class = between(1, round(class), 5)
|
||||||
//Apply the correct descriptor.
|
//Apply the correct descriptor.
|
||||||
if(damtype == BURN)
|
if(damtype == DAMAGE_BURN)
|
||||||
descriptor = breach_burn_descriptors[class]
|
descriptor = breach_burn_descriptors[class]
|
||||||
else if(damtype == BRUTE)
|
else if(damtype == DAMAGE_BRUTE)
|
||||||
descriptor = breach_brute_descriptors[class]
|
descriptor = breach_brute_descriptors[class]
|
||||||
|
|
||||||
//Repair a certain amount of brute or burn damage to the suit.
|
//Repair a certain amount of brute or burn damage to the suit.
|
||||||
@@ -118,9 +118,9 @@ var/global/list/breach_burn_descriptors = list(
|
|||||||
existing.class = 5
|
existing.class = 5
|
||||||
amount -= needs
|
amount -= needs
|
||||||
|
|
||||||
if(existing.damtype == BRUTE)
|
if(existing.damtype == DAMAGE_BRUTE)
|
||||||
T.visible_message("<span class = 'warning'>\The [existing.descriptor] on [src] gapes wider!</span>")
|
T.visible_message("<span class = 'warning'>\The [existing.descriptor] on [src] gapes wider!</span>")
|
||||||
else if(existing.damtype == BURN)
|
else if(existing.damtype == DAMAGE_BURN)
|
||||||
T.visible_message("<span class = 'warning'>\The [existing.descriptor] on [src] widens!</span>")
|
T.visible_message("<span class = 'warning'>\The [existing.descriptor] on [src] widens!</span>")
|
||||||
|
|
||||||
if (amount)
|
if (amount)
|
||||||
@@ -134,9 +134,9 @@ var/global/list/breach_burn_descriptors = list(
|
|||||||
B.update_descriptor()
|
B.update_descriptor()
|
||||||
B.holder = src
|
B.holder = src
|
||||||
|
|
||||||
if(B.damtype == BRUTE)
|
if(B.damtype == DAMAGE_BRUTE)
|
||||||
T.visible_message("<span class = 'warning'>\A [B.descriptor] opens up on [src]!</span>")
|
T.visible_message("<span class = 'warning'>\A [B.descriptor] opens up on [src]!</span>")
|
||||||
else if(B.damtype == BURN)
|
else if(B.damtype == DAMAGE_BURN)
|
||||||
T.visible_message("<span class = 'warning'>\A [B.descriptor] marks the surface of [src]!</span>")
|
T.visible_message("<span class = 'warning'>\A [B.descriptor] marks the surface of [src]!</span>")
|
||||||
|
|
||||||
calc_breach_damage()
|
calc_breach_damage()
|
||||||
@@ -158,9 +158,9 @@ var/global/list/breach_burn_descriptors = list(
|
|||||||
qdel(B)
|
qdel(B)
|
||||||
else
|
else
|
||||||
damage += B.class
|
damage += B.class
|
||||||
if(B.damtype == BRUTE)
|
if(B.damtype == DAMAGE_BRUTE)
|
||||||
brute_damage += B.class
|
brute_damage += B.class
|
||||||
else if(B.damtype == BURN)
|
else if(B.damtype == DAMAGE_BURN)
|
||||||
burn_damage += B.class
|
burn_damage += B.class
|
||||||
|
|
||||||
if(damage >= 3)
|
if(damage >= 3)
|
||||||
@@ -200,7 +200,7 @@ var/global/list/breach_burn_descriptors = list(
|
|||||||
var/obj/item/stack/P = W
|
var/obj/item/stack/P = W
|
||||||
var/use_amt = min(P.get_amount(), 3)
|
var/use_amt = min(P.get_amount(), 3)
|
||||||
if(use_amt && P.use(use_amt))
|
if(use_amt && P.use(use_amt))
|
||||||
repair_breaches(BURN, use_amt * repair_power, user)
|
repair_breaches(DAMAGE_BURN, use_amt * repair_power, user)
|
||||||
return
|
return
|
||||||
|
|
||||||
else if(W.iswelder())
|
else if(W.iswelder())
|
||||||
@@ -218,7 +218,7 @@ var/global/list/breach_burn_descriptors = list(
|
|||||||
to_chat(user, "<span class='warning'>You need more welding fuel to repair this suit.</span>")
|
to_chat(user, "<span class='warning'>You need more welding fuel to repair this suit.</span>")
|
||||||
return
|
return
|
||||||
|
|
||||||
repair_breaches(BRUTE, 3, user)
|
repair_breaches(DAMAGE_BRUTE, 3, user)
|
||||||
return
|
return
|
||||||
|
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
var/cooking // Whether or not the machine is currently operating.
|
var/cooking // Whether or not the machine is currently operating.
|
||||||
var/cook_type // A string value used to track what kind of food this machine makes.
|
var/cook_type // A string value used to track what kind of food this machine makes.
|
||||||
var/can_cook_mobs // Whether or not this machine accepts grabbed mobs.
|
var/can_cook_mobs // Whether or not this machine accepts grabbed mobs.
|
||||||
var/mobdamagetype = BRUTE // Burn damage for cooking appliances, brute for cereal/candy
|
var/mobdamagetype = DAMAGE_BRUTE // Burn damage for cooking appliances, brute for cereal/candy
|
||||||
var/food_color // Colour of resulting food item.
|
var/food_color // Colour of resulting food item.
|
||||||
var/cooked_sound = 'sound/machines/ding.ogg' // Sound played when cooking completes.
|
var/cooked_sound = 'sound/machines/ding.ogg' // Sound played when cooking completes.
|
||||||
var/can_burn_food // Can the object burn food that is left inside?
|
var/can_burn_food // Can the object burn food that is left inside?
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
var/light_x = 0
|
var/light_x = 0
|
||||||
var/light_y = 0
|
var/light_y = 0
|
||||||
mobdamagetype = BURN
|
mobdamagetype = DAMAGE_BURN
|
||||||
cooking_coeff = 0
|
cooking_coeff = 0
|
||||||
cooking_power = 0
|
cooking_power = 0
|
||||||
flags = null
|
flags = null
|
||||||
|
|||||||
@@ -180,7 +180,7 @@
|
|||||||
|
|
||||||
E.take_damage(0, damage, used_weapon = "hot oil")
|
E.take_damage(0, damage, used_weapon = "hot oil")
|
||||||
else
|
else
|
||||||
victim.apply_damage(damage, BURN, user.zone_sel.selecting)
|
victim.apply_damage(damage, DAMAGE_BURN, user.zone_sel.selecting)
|
||||||
|
|
||||||
if(!nopain)
|
if(!nopain)
|
||||||
var/arrows_var1 = E ? E.name : "flesh"
|
var/arrows_var1 = E ? E.name : "flesh"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
name = "kinetic force"
|
name = "kinetic force"
|
||||||
icon_state = null
|
icon_state = null
|
||||||
damage = 0 //Base damage handled elsewhere.
|
damage = 0 //Base damage handled elsewhere.
|
||||||
damage_type = BRUTE
|
damage_type = DAMAGE_BRUTE
|
||||||
check_armor = "bomb"
|
check_armor = "bomb"
|
||||||
range = 5
|
range = 5
|
||||||
var/pressure_decrease = 0.25
|
var/pressure_decrease = 0.25
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
icon_state = "loader_arms"
|
icon_state = "loader_arms"
|
||||||
has_hardpoints = list(HARDPOINT_LEFT_HAND, HARDPOINT_RIGHT_HAND)
|
has_hardpoints = list(HARDPOINT_LEFT_HAND, HARDPOINT_RIGHT_HAND)
|
||||||
power_use = 50
|
power_use = 50
|
||||||
var/damagetype = BRUTE
|
var/damagetype = DAMAGE_BRUTE
|
||||||
|
|
||||||
var/punch_sound = 'sound/mecha/mech_punch.ogg'
|
var/punch_sound = 'sound/mecha/mech_punch.ogg'
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
return 0
|
return 0
|
||||||
|
|
||||||
if(LAZYLEN(pilots) && (!hatch_closed || !prob(body.pilot_coverage)))
|
if(LAZYLEN(pilots) && (!hatch_closed || !prob(body.pilot_coverage)))
|
||||||
if(effect > 0 && effecttype == IRRADIATE)
|
if(effect > 0 && effecttype == DAMAGE_RADIATION)
|
||||||
var/mob/living/pilot = pick(pilots)
|
var/mob/living/pilot = pick(pilots)
|
||||||
return pilot.apply_effect(effect, effecttype, blocked)
|
return pilot.apply_effect(effect, effecttype, blocked)
|
||||||
if(!(effecttype in list(PAIN, STUTTER, EYE_BLUR, DROWSY, STUN, WEAKEN)))
|
if(!(effecttype in list(DAMAGE_PAIN, STUTTER, EYE_BLUR, DROWSY, STUN, WEAKEN)))
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
/mob/living/heavy_vehicle/hitby(atom/movable/AM, speed)
|
/mob/living/heavy_vehicle/hitby(atom/movable/AM, speed)
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
else
|
else
|
||||||
return body
|
return body
|
||||||
|
|
||||||
/mob/living/heavy_vehicle/apply_damage(var/damage = 0, var/damagetype = BRUTE, var/def_zone, var/used_weapon, var/damage_flags, var/armor_pen, var/silent = FALSE)
|
/mob/living/heavy_vehicle/apply_damage(var/damage = 0, var/damagetype = DAMAGE_BRUTE, var/def_zone, var/used_weapon, var/damage_flags, var/armor_pen, var/silent = FALSE)
|
||||||
if(!damage)
|
if(!damage)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
@@ -80,12 +80,12 @@
|
|||||||
var/target = zoneToComponent(def_zone)
|
var/target = zoneToComponent(def_zone)
|
||||||
//Only 2 types of damage concern mechs and vehicles
|
//Only 2 types of damage concern mechs and vehicles
|
||||||
switch(damagetype)
|
switch(damagetype)
|
||||||
if(BRUTE)
|
if(DAMAGE_BRUTE)
|
||||||
adjustBruteLoss(damage, target)
|
adjustBruteLoss(damage, target)
|
||||||
if(BURN)
|
if(DAMAGE_BURN)
|
||||||
adjustFireLoss(damage, target)
|
adjustFireLoss(damage, target)
|
||||||
|
|
||||||
if((damagetype == BRUTE || damagetype == BURN) && prob(25+(damage*2)))
|
if((damagetype == DAMAGE_BRUTE || damagetype == DAMAGE_BURN) && prob(25+(damage*2)))
|
||||||
spark(src, 3)
|
spark(src, 3)
|
||||||
updatehealth()
|
updatehealth()
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
return total
|
return total
|
||||||
|
|
||||||
/mob/living/heavy_vehicle/emp_act(var/severity)
|
/mob/living/heavy_vehicle/emp_act(var/severity)
|
||||||
var/ratio = get_blocked_ratio(null, BURN, null, (4-severity) * 20)
|
var/ratio = get_blocked_ratio(null, DAMAGE_BURN, null, (4-severity) * 20)
|
||||||
|
|
||||||
if(ratio >= 0.5)
|
if(ratio >= 0.5)
|
||||||
for(var/mob/living/m in pilots)
|
for(var/mob/living/m in pilots)
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
var/z_velocity = 5 * (levels_fallen**2) // 1z - 5, 2z - 20, 3z - 45
|
var/z_velocity = 5 * (levels_fallen**2) // 1z - 5, 2z - 20, 3z - 45
|
||||||
var/damage = max((z_velocity + rand(-10, 10)) * damage_mod, 0)
|
var/damage = max((z_velocity + rand(-10, 10)) * damage_mod, 0)
|
||||||
|
|
||||||
apply_damage(damage, BRUTE, BP_L_LEG) // can target any leg, it will be changed to the proper component
|
apply_damage(damage, DAMAGE_BRUTE, BP_L_LEG) // can target any leg, it will be changed to the proper component
|
||||||
|
|
||||||
playsound(loc, "sound/effects/bang.ogg", 100, 1)
|
playsound(loc, "sound/effects/bang.ogg", 100, 1)
|
||||||
playsound(loc, "sound/effects/bamf.ogg", 100, 1)
|
playsound(loc, "sound/effects/bamf.ogg", 100, 1)
|
||||||
|
|||||||
@@ -550,7 +550,7 @@
|
|||||||
attack_log += text("\[[time_stamp()]\] <span class='warning'>trampled [D.name] ([D.ckey]) with \the [src].</span>")
|
attack_log += text("\[[time_stamp()]\] <span class='warning'>trampled [D.name] ([D.ckey]) with \the [src].</span>")
|
||||||
msg_admin_attack("[src] trampled [key_name(D)] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[D.x];Y=[D.y];Z=[D.z]'>JMP</a>)" )
|
msg_admin_attack("[src] trampled [key_name(D)] at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[D.x];Y=[D.y];Z=[D.z]'>JMP</a>)" )
|
||||||
src.visible_message("<span class='danger'>\The [src] runs over \the [D]!</span>")
|
src.visible_message("<span class='danger'>\The [src] runs over \the [D]!</span>")
|
||||||
D.apply_damage(legs.trample_damage, BRUTE)
|
D.apply_damage(legs.trample_damage, DAMAGE_BRUTE)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
else
|
else
|
||||||
@@ -560,7 +560,7 @@
|
|||||||
if(issmall(L) && (L.stat == DEAD))
|
if(issmall(L) && (L.stat == DEAD))
|
||||||
L.gib()
|
L.gib()
|
||||||
return TRUE
|
return TRUE
|
||||||
L.apply_damage(legs.trample_damage, BRUTE)
|
L.apply_damage(legs.trample_damage, DAMAGE_BRUTE)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
/mob/living/heavy_vehicle/proc/ToggleLockdown()
|
/mob/living/heavy_vehicle/proc/ToggleLockdown()
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
bodytemperature += ((environment.temperature - bodytemperature) / 3)
|
bodytemperature += ((environment.temperature - bodytemperature) / 3)
|
||||||
|
|
||||||
if(environment.temperature >= T0C+1400) //A bit higher because I like to assume there's a difference between a mech and a wall
|
if(environment.temperature >= T0C+1400) //A bit higher because I like to assume there's a difference between a mech and a wall
|
||||||
apply_damage(damage = environment.temperature /5 , damagetype = BURN)
|
apply_damage(damage = environment.temperature /5 , damagetype = DAMAGE_BURN)
|
||||||
//A possibility is to hook up interface icons here. But this works pretty well in my experience
|
//A possibility is to hook up interface icons here. But this works pretty well in my experience
|
||||||
if(prob(5))
|
if(prob(5))
|
||||||
visible_message("<span class='danger'>\The [src]'s hull bends and buckles under the intense heat!</span>")
|
visible_message("<span class='danger'>\The [src]'s hull bends and buckles under the intense heat!</span>")
|
||||||
|
|||||||
@@ -159,7 +159,7 @@
|
|||||||
if (safety_disabled)
|
if (safety_disabled)
|
||||||
item_power_usage = 2500
|
item_power_usage = 2500
|
||||||
for(var/obj/item/holo/esword/H in linkedholodeck)
|
for(var/obj/item/holo/esword/H in linkedholodeck)
|
||||||
H.damtype = BRUTE
|
H.damtype = DAMAGE_BRUTE
|
||||||
else
|
else
|
||||||
item_power_usage = initial(item_power_usage)
|
item_power_usage = initial(item_power_usage)
|
||||||
for(var/obj/item/holo/esword/H in linkedholodeck)
|
for(var/obj/item/holo/esword/H in linkedholodeck)
|
||||||
|
|||||||
@@ -171,7 +171,7 @@
|
|||||||
if (istype(W, /obj/item/grab) && get_dist(src,user)<2)
|
if (istype(W, /obj/item/grab) && get_dist(src,user)<2)
|
||||||
var/obj/item/grab/G = W
|
var/obj/item/grab/G = W
|
||||||
if(istype(G.affecting,/mob/living))
|
if(istype(G.affecting,/mob/living))
|
||||||
grab_smash_attack(G, PAIN)
|
grab_smash_attack(G, DAMAGE_PAIN)
|
||||||
return
|
return
|
||||||
|
|
||||||
if(W.flags & NOBLUDGEON) return
|
if(W.flags & NOBLUDGEON) return
|
||||||
@@ -183,7 +183,7 @@
|
|||||||
else if(W.iswrench() && !anchored && (!state || !reinf))
|
else if(W.iswrench() && !anchored && (!state || !reinf))
|
||||||
to_chat(user, ("<span class='notice'>It's a holowindow, you can't dismantle it!</span>"))
|
to_chat(user, ("<span class='notice'>It's a holowindow, you can't dismantle it!</span>"))
|
||||||
else
|
else
|
||||||
if(W.damtype == BRUTE || W.damtype == BURN)
|
if(W.damtype == DAMAGE_BRUTE || W.damtype == DAMAGE_BURN)
|
||||||
hit(W.force)
|
hit(W.force)
|
||||||
if(health <= 7)
|
if(health <= 7)
|
||||||
anchored = 0
|
anchored = 0
|
||||||
@@ -216,7 +216,7 @@
|
|||||||
var/aforce = I.force
|
var/aforce = I.force
|
||||||
playsound(src.loc, 'sound/effects/glass_hit.ogg', 75, 1)
|
playsound(src.loc, 'sound/effects/glass_hit.ogg', 75, 1)
|
||||||
visible_message("<span class='danger'>[src] was hit by [I].</span>")
|
visible_message("<span class='danger'>[src] was hit by [I].</span>")
|
||||||
if(I.damtype == BRUTE || I.damtype == BURN)
|
if(I.damtype == DAMAGE_BRUTE || I.damtype == DAMAGE_BURN)
|
||||||
take_damage(aforce)
|
take_damage(aforce)
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -254,7 +254,7 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/holo
|
/obj/item/holo
|
||||||
damtype = PAIN
|
damtype = DAMAGE_PAIN
|
||||||
no_attack_log = 1
|
no_attack_log = 1
|
||||||
|
|
||||||
/obj/item/holo/esword
|
/obj/item/holo/esword
|
||||||
|
|||||||
@@ -119,13 +119,13 @@
|
|||||||
real_damage += G.punch_force
|
real_damage += G.punch_force
|
||||||
hit_dam_type = G.punch_damtype
|
hit_dam_type = G.punch_damtype
|
||||||
if(A.pulling_punches)
|
if(A.pulling_punches)
|
||||||
hit_dam_type = PAIN
|
hit_dam_type = DAMAGE_PAIN
|
||||||
|
|
||||||
if(G.sharp)
|
if(G.sharp)
|
||||||
damage_flags |= DAM_SHARP
|
damage_flags |= DAMAGE_FLAG_SHARP
|
||||||
|
|
||||||
if(G.edge)
|
if(G.edge)
|
||||||
damage_flags |= DAM_EDGE
|
damage_flags |= DAMAGE_FLAG_EDGE
|
||||||
|
|
||||||
if(istype(A.gloves,/obj/item/clothing/gloves/force))
|
if(istype(A.gloves,/obj/item/clothing/gloves/force))
|
||||||
var/obj/item/clothing/gloves/force/X = A.gloves
|
var/obj/item/clothing/gloves/force/X = A.gloves
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
/datum/martial_art/revenant/proc/bash_slash(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
/datum/martial_art/revenant/proc/bash_slash(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||||
A.do_attack_animation(D)
|
A.do_attack_animation(D)
|
||||||
D.visible_message(SPAN_DANGER("[A] bashes [D] away!"), SPAN_DANGER("[A] bashes you away!"))
|
D.visible_message(SPAN_DANGER("[A] bashes [D] away!"), SPAN_DANGER("[A] bashes you away!"))
|
||||||
D.apply_damage(rand(5, 10), BRUTE, damage_flags = DAM_SHARP)
|
D.apply_damage(rand(5, 10), DAMAGE_BRUTE, damage_flags = DAMAGE_FLAG_SHARP)
|
||||||
var/throw_range = rand(1, 2)
|
var/throw_range = rand(1, 2)
|
||||||
D.throw_at(get_step_away(D, A, throw_range), throw_range, THROWNOBJ_KNOCKBACK_SPEED / 3, A, FALSE)
|
D.throw_at(get_step_away(D, A, throw_range), throw_range, THROWNOBJ_KNOCKBACK_SPEED / 3, A, FALSE)
|
||||||
playsound(get_turf(D), 'sound/weapons/slash.ogg', 25, 1, -1)
|
playsound(get_turf(D), 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
return 0
|
return 0
|
||||||
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>")
|
D.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>")
|
||||||
playsound(get_turf(A), /singleton/sound_category/swing_hit_sound, 50, 1, -1)
|
playsound(get_turf(A), /singleton/sound_category/swing_hit_sound, 50, 1, -1)
|
||||||
D.apply_damage(5, BRUTE)
|
D.apply_damage(5, DAMAGE_BRUTE)
|
||||||
D.Weaken(2)
|
D.Weaken(2)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
A.visible_message("<span class='warning'>[A] strikes [D] with their open palm!</span>")
|
A.visible_message("<span class='warning'>[A] strikes [D] with their open palm!</span>")
|
||||||
playsound(get_turf(A), /singleton/sound_category/punch_sound, 50, 1, -1)
|
playsound(get_turf(A), /singleton/sound_category/punch_sound, 50, 1, -1)
|
||||||
var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
|
var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
|
||||||
D.apply_damage(25, PAIN, affecting)
|
D.apply_damage(25, DAMAGE_PAIN, affecting)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/martial_art/karak_virul/proc/dislocating_strike(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
/datum/martial_art/karak_virul/proc/dislocating_strike(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
playsound(get_turf(A), /singleton/sound_category/punch_sound, 50, 1, -1)
|
playsound(get_turf(A), /singleton/sound_category/punch_sound, 50, 1, -1)
|
||||||
D.apply_damage(5, BRUTE)
|
D.apply_damage(5, DAMAGE_BRUTE)
|
||||||
A.visible_message("<span class='warning'>[A] strikes [D] with their closed fist!</span>")
|
A.visible_message("<span class='warning'>[A] strikes [D] with their closed fist!</span>")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
D.visible_message("<span class='warning'>[A] grabs [D]'s wrist and wrenches it sideways!</span>")
|
D.visible_message("<span class='warning'>[A] grabs [D]'s wrist and wrenches it sideways!</span>")
|
||||||
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||||
D.drop_item()
|
D.drop_item()
|
||||||
D.apply_damage(5, BRUTE, pick(BP_L_ARM, BP_R_ARM))
|
D.apply_damage(5, DAMAGE_BRUTE, pick(BP_L_ARM, BP_R_ARM))
|
||||||
D.Stun(3)
|
D.Stun(3)
|
||||||
return 1
|
return 1
|
||||||
return basic_hit(A,D)
|
return basic_hit(A,D)
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
A.do_attack_animation(D)
|
A.do_attack_animation(D)
|
||||||
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
|
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
|
||||||
"<span class='danger'>[A] kicks you in the jaw!</span>")
|
"<span class='danger'>[A] kicks you in the jaw!</span>")
|
||||||
D.apply_damage(20, BRUTE, BP_HEAD)
|
D.apply_damage(20, DAMAGE_BRUTE, BP_HEAD)
|
||||||
D.drop_item()
|
D.drop_item()
|
||||||
playsound(get_turf(D), "punch", 50, 1, -1)
|
playsound(get_turf(D), "punch", 50, 1, -1)
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@
|
|||||||
D.visible_message("<span class='danger'>[A] elbow drops [D]!</span>")
|
D.visible_message("<span class='danger'>[A] elbow drops [D]!</span>")
|
||||||
if(D.shock_stage >= 60)
|
if(D.shock_stage >= 60)
|
||||||
D.death() //FINISH HIM!
|
D.death() //FINISH HIM!
|
||||||
D.apply_damage(50, BRUTE, BP_CHEST)
|
D.apply_damage(50, DAMAGE_BRUTE, BP_CHEST)
|
||||||
playsound(get_turf(D), "punch", 75, 1, -1)
|
playsound(get_turf(D), "punch", 75, 1, -1)
|
||||||
return 1
|
return 1
|
||||||
return basic_hit(A,D)
|
return basic_hit(A,D)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
return 0
|
return 0
|
||||||
A.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>")
|
A.visible_message("<span class='warning'>[A] leg sweeps [D]!</span>")
|
||||||
playsound(get_turf(A), /singleton/sound_category/swing_hit_sound, 50, 1, -1)
|
playsound(get_turf(A), /singleton/sound_category/swing_hit_sound, 50, 1, -1)
|
||||||
D.apply_damage(5, BRUTE)
|
D.apply_damage(5, DAMAGE_BRUTE)
|
||||||
D.Weaken(2)
|
D.Weaken(2)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
A.do_attack_animation(D)
|
A.do_attack_animation(D)
|
||||||
A.visible_message("<span class='warning'>[A] karate chops [D]'s neck!</span>")
|
A.visible_message("<span class='warning'>[A] karate chops [D]'s neck!</span>")
|
||||||
playsound(get_turf(A), /singleton/sound_category/punch_sound, 50, 1, -1)
|
playsound(get_turf(A), /singleton/sound_category/punch_sound, 50, 1, -1)
|
||||||
D.apply_damage(5, BRUTE)
|
D.apply_damage(5, DAMAGE_BRUTE)
|
||||||
D.silent += 10
|
D.silent += 10
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ datum/martial_art/sol_combat/grab_act(var/mob/living/carbon/human/A, var/mob/liv
|
|||||||
if(D.weakened || D.resting || D.lying)
|
if(D.weakened || D.resting || D.lying)
|
||||||
bonus_damage += 5
|
bonus_damage += 5
|
||||||
picked_hit_type = "stomped on"
|
picked_hit_type = "stomped on"
|
||||||
D.apply_damage(bonus_damage, BRUTE)
|
D.apply_damage(bonus_damage, DAMAGE_BRUTE)
|
||||||
if(picked_hit_type == "kicked" || picked_hit_type == "stomped")
|
if(picked_hit_type == "kicked" || picked_hit_type == "stomped")
|
||||||
playsound(get_turf(D), /singleton/sound_category/swing_hit_sound, 50, 1, -1)
|
playsound(get_turf(D), /singleton/sound_category/swing_hit_sound, 50, 1, -1)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
var/obj/item/organ/internal/eyes/eyes = D.get_eyes()
|
var/obj/item/organ/internal/eyes/eyes = D.get_eyes()
|
||||||
eyes.take_damage(rand(3,4), 1)
|
eyes.take_damage(rand(3,4), 1)
|
||||||
D.apply_damage(10,BRUTE, BP_HEAD, damage_flags = DAM_SHARP|DAM_EDGE)
|
D.apply_damage(10,DAMAGE_BRUTE, BP_HEAD, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
A.visible_message("<span class='danger'>[A] lunges forwards and strikes [D] with their claws!</span>")
|
A.visible_message("<span class='danger'>[A] lunges forwards and strikes [D] with their claws!</span>")
|
||||||
playsound(get_turf(A), 'sound/weapons/slice.ogg', 50, 1, -1)
|
playsound(get_turf(A), 'sound/weapons/slice.ogg', 50, 1, -1)
|
||||||
var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
|
var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
|
||||||
D.apply_damage(20, BRUTE, affecting, damage_flags = DAM_SHARP|DAM_EDGE)
|
D.apply_damage(20, DAMAGE_BRUTE, affecting, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE)
|
||||||
if(prob(20))
|
if(prob(20))
|
||||||
D.apply_effect(4, WEAKEN)
|
D.apply_effect(4, WEAKEN)
|
||||||
return 1
|
return 1
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
A.do_attack_animation(D)
|
A.do_attack_animation(D)
|
||||||
var/obj/item/organ/external/organ = D.get_organ(A.zone_sel.selecting)
|
var/obj/item/organ/external/organ = D.get_organ(A.zone_sel.selecting)
|
||||||
A.visible_message("<span class='danger'>[A] stabs [D]'s [organ.name] with their claws!</span>")
|
A.visible_message("<span class='danger'>[A] stabs [D]'s [organ.name] with their claws!</span>")
|
||||||
D.apply_damage(organ.brute_dam, BRUTE, organ, damage_flags = DAM_SHARP|DAM_EDGE)
|
D.apply_damage(organ.brute_dam, DAMAGE_BRUTE, organ, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/martial_art/baghrar/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
/datum/martial_art/baghrar/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
TornadoAnimate(A)
|
TornadoAnimate(A)
|
||||||
A.visible_message("<span class='warning'>[A] sweeps [D] with their tail!</span>")
|
A.visible_message("<span class='warning'>[A] sweeps [D] with their tail!</span>")
|
||||||
playsound(get_turf(A), /singleton/sound_category/swing_hit_sound, 50, 1, -1)
|
playsound(get_turf(A), /singleton/sound_category/swing_hit_sound, 50, 1, -1)
|
||||||
D.apply_damage(5, BRUTE)
|
D.apply_damage(5, DAMAGE_BRUTE)
|
||||||
D.Weaken(2)
|
D.Weaken(2)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
var/atk_verb = pick("slices", "pinches", "chops", "bites", "claws")
|
var/atk_verb = pick("slices", "pinches", "chops", "bites", "claws")
|
||||||
D.visible_message("<span class='danger'>[A] [atk_verb] [D]!</span>", \
|
D.visible_message("<span class='danger'>[A] [atk_verb] [D]!</span>", \
|
||||||
"<span class='danger'>[A] [atk_verb] you!</span>")
|
"<span class='danger'>[A] [atk_verb] you!</span>")
|
||||||
D.apply_damage(rand(5,15), BRUTE, damage_flags = DAM_SHARP)
|
D.apply_damage(rand(5,15), DAMAGE_BRUTE, damage_flags = DAMAGE_FLAG_SHARP)
|
||||||
playsound(get_turf(D), 'sound/weapons/slash.ogg', 25, 1, -1)
|
playsound(get_turf(D), 'sound/weapons/slash.ogg', 25, 1, -1)
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
var/obj/item/grab/G = A.get_active_hand()
|
var/obj/item/grab/G = A.get_active_hand()
|
||||||
if(G && G.affecting == D)
|
if(G && G.affecting == D)
|
||||||
A.visible_message("<span class='warning'>[A] crushes [D] with its mandibles!</span>")
|
A.visible_message("<span class='warning'>[A] crushes [D] with its mandibles!</span>")
|
||||||
D.apply_damage(30, BRUTE)
|
D.apply_damage(30, DAMAGE_BRUTE)
|
||||||
D.apply_effect(6, WEAKEN)
|
D.apply_effect(6, WEAKEN)
|
||||||
qdel(G)
|
qdel(G)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
D.visible_message("<span class='danger'>[A] suplexes [D]!</span>")
|
D.visible_message("<span class='danger'>[A] suplexes [D]!</span>")
|
||||||
D.forceMove(A.loc)
|
D.forceMove(A.loc)
|
||||||
D.apply_damage(30, BRUTE)
|
D.apply_damage(30, DAMAGE_BRUTE)
|
||||||
D.apply_effect(6, WEAKEN)
|
D.apply_effect(6, WEAKEN)
|
||||||
add_logs(A, D, "suplexed")
|
add_logs(A, D, "suplexed")
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@
|
|||||||
D.grabbedby(A,1)
|
D.grabbedby(A,1)
|
||||||
D.visible_message("<span class='danger'>[A] holds [D] down!</span>")
|
D.visible_message("<span class='danger'>[A] holds [D] down!</span>")
|
||||||
var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
|
var/obj/item/organ/external/affecting = D.get_organ(ran_zone(A.zone_sel.selecting))
|
||||||
D.apply_damage(40, PAIN, affecting)
|
D.apply_damage(40, DAMAGE_PAIN, affecting)
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
/datum/martial_art/wrestling/proc/wrestling_help()
|
/datum/martial_art/wrestling/proc/wrestling_help()
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
A.do_attack_animation(D)
|
A.do_attack_animation(D)
|
||||||
var/atk_verb = pick("chomps", "bites")
|
var/atk_verb = pick("chomps", "bites")
|
||||||
D.visible_message(SPAN_DANGER("[A] [atk_verb] down hard on [D]!"), SPAN_DANGER("[A] [atk_verb] down hard on you!"))
|
D.visible_message(SPAN_DANGER("[A] [atk_verb] down hard on [D]!"), SPAN_DANGER("[A] [atk_verb] down hard on you!"))
|
||||||
D.apply_damage(rand(5, 10), BRUTE, damage_flags = DAM_SHARP, armor_pen = 100)
|
D.apply_damage(rand(5, 10), DAMAGE_BRUTE, damage_flags = DAMAGE_FLAG_SHARP, armor_pen = 100)
|
||||||
playsound(get_turf(D), 'sound/weapons/bloodyslice.ogg', 25, 1, -1)
|
playsound(get_turf(D), 'sound/weapons/bloodyslice.ogg', 25, 1, -1)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
|||||||
@@ -493,12 +493,12 @@
|
|||||||
connected.system_error("Unexpected user interface error.")
|
connected.system_error("Unexpected user interface error.")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
H.apply_damage(25, BRUTE, damage_flags = DAM_SHARP|DAM_EDGE)
|
H.apply_damage(25, DAMAGE_BRUTE, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE)
|
||||||
connected.system_error("Unexpected user interface error.")
|
connected.system_error("Unexpected user interface error.")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
var/mob/living/M = user
|
var/mob/living/M = user
|
||||||
M.apply_damage(25, BRUTE, damage_flags = DAM_SHARP|DAM_EDGE)
|
M.apply_damage(25, DAMAGE_BRUTE, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE)
|
||||||
|
|
||||||
if(default_deconstruction_screwdriver(user, W))
|
if(default_deconstruction_screwdriver(user, W))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1095,7 +1095,7 @@ var/list/total_extraction_beacons = list()
|
|||||||
if(creator)
|
if(creator)
|
||||||
add_logs(creator, L, "used a resonator field on", "resonator")
|
add_logs(creator, L, "used a resonator field on", "resonator")
|
||||||
to_chat(L, SPAN_DANGER("\The [src] ruptured with you in it!"))
|
to_chat(L, SPAN_DANGER("\The [src] ruptured with you in it!"))
|
||||||
L.apply_damage(resonance_damage, BRUTE)
|
L.apply_damage(resonance_damage, DAMAGE_BRUTE)
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -488,5 +488,5 @@ var/list/slot_equipment_priority = list( \
|
|||||||
|
|
||||||
//When you drop an extremely heavy 406mm shell onto your foot. Oops!
|
//When you drop an extremely heavy 406mm shell onto your foot. Oops!
|
||||||
/mob/living/carbon/proc/throw_fail_consequences(var/obj/item/I)
|
/mob/living/carbon/proc/throw_fail_consequences(var/obj/item/I)
|
||||||
apply_damage(45, BRUTE, pick(list(BP_L_FOOT, BP_R_FOOT)), I, armor_pen = 30)
|
apply_damage(45, DAMAGE_BRUTE, pick(list(BP_L_FOOT, BP_R_FOOT)), I, armor_pen = 30)
|
||||||
I.throw_fail_consequences(src)
|
I.throw_fail_consequences(src)
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
if(shock_damage<1)
|
if(shock_damage<1)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
src.apply_damage(shock_damage, BURN, def_zone, used_weapon="Electrocution")
|
src.apply_damage(shock_damage, DAMAGE_BURN, def_zone, used_weapon="Electrocution")
|
||||||
playsound(loc, /singleton/sound_category/spark_sound, 50, 1, -1)
|
playsound(loc, /singleton/sound_category/spark_sound, 50, 1, -1)
|
||||||
if(shock_damage > 15 || tesla_shock)
|
if(shock_damage > 15 || tesla_shock)
|
||||||
src.visible_message(
|
src.visible_message(
|
||||||
|
|||||||
@@ -102,14 +102,14 @@
|
|||||||
apply_damage(effective_force, I.damtype, hit_zone, I, damage_flags, I.armor_penetration)
|
apply_damage(effective_force, I.damtype, hit_zone, I, damage_flags, I.armor_penetration)
|
||||||
|
|
||||||
//Melee weapon embedded object code.
|
//Melee weapon embedded object code.
|
||||||
if (I && I.damtype == BRUTE && !I.anchored && !is_robot_module(I) && I.canremove)
|
if (I && I.damtype == DAMAGE_BRUTE && !I.anchored && !is_robot_module(I) && I.canremove)
|
||||||
var/damage = effective_force //just the effective damage used for sorting out embedding, no further damage is applied here
|
var/damage = effective_force //just the effective damage used for sorting out embedding, no further damage is applied here
|
||||||
damage *= 1 - get_blocked_ratio(hit_zone, I.damtype, I.damage_flags(), I.armor_penetration, I.force)
|
damage *= 1 - get_blocked_ratio(hit_zone, I.damtype, I.damage_flags(), I.armor_penetration, I.force)
|
||||||
|
|
||||||
if(I.can_embed) //If this weapon is allowed to embed in people.
|
if(I.can_embed) //If this weapon is allowed to embed in people.
|
||||||
//blunt objects should really not be embedding in things unless a huge amount of force is involved
|
//blunt objects should really not be embedding in things unless a huge amount of force is involved
|
||||||
var/sharp = damage_flags & DAM_SHARP
|
var/sharp = damage_flags & DAMAGE_FLAG_SHARP
|
||||||
var/edge = damage_flags & DAM_EDGE
|
var/edge = damage_flags & DAMAGE_FLAG_EDGE
|
||||||
var/embed_chance = sharp? damage/I.w_class : damage/(I.w_class*3)
|
var/embed_chance = sharp? damage/I.w_class : damage/(I.w_class*3)
|
||||||
var/embed_threshold = edge? 5*I.w_class : 15*I.w_class
|
var/embed_threshold = edge? 5*I.w_class : 15*I.w_class
|
||||||
|
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
// Knifing
|
// Knifing
|
||||||
/mob/living/carbon/proc/attack_throat(obj/item/W, obj/item/grab/G, mob/user)
|
/mob/living/carbon/proc/attack_throat(obj/item/W, obj/item/grab/G, mob/user)
|
||||||
var/damage_flags = W.damage_flags()
|
var/damage_flags = W.damage_flags()
|
||||||
if(!(damage_flags & (DAM_SHARP|DAM_EDGE)) || W.damtype != BRUTE)
|
if(!(damage_flags & (DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE)) || W.damtype != DAMAGE_BRUTE)
|
||||||
return FALSE //unsuitable weapon
|
return FALSE //unsuitable weapon
|
||||||
|
|
||||||
user.visible_message("<span class='danger'>\The [user] begins to slit [src]'s throat with \the [W]!</span>")
|
user.visible_message("<span class='danger'>\The [user] begins to slit [src]'s throat with \the [W]!</span>")
|
||||||
@@ -148,7 +148,7 @@
|
|||||||
if(istype(helmet) && (helmet.body_parts_covered & HEAD) && (helmet.min_pressure_protection == 0))
|
if(istype(helmet) && (helmet.body_parts_covered & HEAD) && (helmet.min_pressure_protection == 0))
|
||||||
var/datum/component/armor/armor_component = helmet.GetComponent(/datum/component/armor)
|
var/datum/component/armor/armor_component = helmet.GetComponent(/datum/component/armor)
|
||||||
if(armor_component)
|
if(armor_component)
|
||||||
damage_mod -= armor_component.get_blocked(BRUTE, damage_flags, W.armor_penetration, W.force*1.5)
|
damage_mod -= armor_component.get_blocked(DAMAGE_BRUTE, damage_flags, W.armor_penetration, W.force*1.5)
|
||||||
|
|
||||||
var/total_damage = 0
|
var/total_damage = 0
|
||||||
for(var/i in 1 to 3)
|
for(var/i in 1 to 3)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user