mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 06:57:42 +01:00
even-still-though-time-itself-be-shattered
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
force = 20
|
||||
use_power = NO_POWER_USE
|
||||
can_unwrench = 1
|
||||
damage_deflection = 12
|
||||
var/alert_pressure = 80*ONE_ATMOSPHERE //minimum pressure before check_pressure(...) should be called
|
||||
|
||||
//Buckling
|
||||
|
||||
@@ -102,6 +102,9 @@
|
||||
#define BODY_ZONE_PRECISE_L_FOOT "l_foot"
|
||||
#define BODY_ZONE_PRECISE_R_FOOT "r_foot"
|
||||
|
||||
//We will round to this value in damage calculations.
|
||||
#define DAMAGE_PRECISION 0.1
|
||||
|
||||
//Gun Stuff
|
||||
#define SAWN_INTACT 0
|
||||
#define SAWN_OFF 1
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
#define MECHA_INT_FIRE (1<<0)
|
||||
#define MECHA_INT_TEMP_CONTROL (1<<1)
|
||||
#define MECHA_INT_SHORT_CIRCUIT (1<<2)
|
||||
#define MECHA_INT_TANK_BREACH (1<<3)
|
||||
#define MECHA_INT_CONTROL_LOST (1<<4)
|
||||
|
||||
#define MECHA_MELEE (1<<0)
|
||||
#define MECHA_RANGED (1<<1)
|
||||
|
||||
#define MECHAMOVE_RAND (1<<0)
|
||||
#define MECHAMOVE_TURN (1<<1)
|
||||
#define MECHAMOVE_STEP (1<<2)
|
||||
|
||||
#define MECHA_FRONT_ARMOUR 1
|
||||
#define MECHA_SIDE_ARMOUR 2
|
||||
#define MECHA_BACK_ARMOUR 3
|
||||
|
||||
#define MECHA_LOCKED 0
|
||||
#define MECHA_SECURE_BOLTS 1
|
||||
#define MECHA_LOOSE_BOLTS 2
|
||||
#define MECHA_OPEN_HATCH 3
|
||||
#define MECHA_UNSECURE_CELL 4
|
||||
@@ -6,7 +6,6 @@
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 75, "acid" = 90)
|
||||
fire_resist = 2
|
||||
point_return = -1
|
||||
var/mob/camera/blob/overmind = null // the blob core's overmind
|
||||
var/overmind_get_delay = 0 // we don't want to constantly try to find an overmind, do it every 5 minutes
|
||||
var/resource_delay = 0
|
||||
var/point_rate = 2
|
||||
@@ -47,6 +46,12 @@
|
||||
GLOB.poi_list.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/structure/blob/core/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir, overmind_reagent_trigger = 1)
|
||||
. = ..()
|
||||
if(obj_integrity > 0)
|
||||
if(overmind) //we should have an overmind, but...
|
||||
overmind.update_health_hud()
|
||||
|
||||
/obj/structure/blob/core/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE)
|
||||
return
|
||||
|
||||
@@ -56,7 +61,7 @@
|
||||
return
|
||||
// update_icon is called when health changes so... call update_health in the overmind
|
||||
if(overmind)
|
||||
overmind.update_health()
|
||||
overmind.update_health_hud()
|
||||
return
|
||||
|
||||
/obj/structure/blob/core/RegenHealth()
|
||||
@@ -71,7 +76,7 @@
|
||||
overmind.add_points(point_rate)
|
||||
health = min(initial(health), health + 1)
|
||||
if(overmind)
|
||||
overmind.update_health()
|
||||
overmind.update_health_hud()
|
||||
if(overmind)
|
||||
for(var/i = 1; i < 8; i += i)
|
||||
Pulse(0, i, overmind.blob_reagent_datum.color)
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
var/list/spores = list()
|
||||
var/max_spores = 3
|
||||
var/spore_delay = 0
|
||||
var/mob/camera/blob/overmind
|
||||
|
||||
/obj/structure/blob/factory/update_icon()
|
||||
if(health <= 0)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 65, "acid" = 90)
|
||||
fire_resist = 2
|
||||
point_return = 18
|
||||
var/mob/camera/blob/overmind
|
||||
|
||||
/obj/structure/blob/node/New(loc, var/h = 100)
|
||||
blob_nodes += src
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
health = 30
|
||||
fire_resist = 2
|
||||
point_return = 12
|
||||
var/mob/camera/blob/overmind = null
|
||||
var/resource_delay = 0
|
||||
|
||||
/obj/structure/blob/resource/update_icon()
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
health = 30
|
||||
fire_resist = 2
|
||||
point_return = 12
|
||||
var/mob/camera/blob/overmind = null
|
||||
|
||||
/obj/structure/blob/storage/update_icon()
|
||||
if(health <= 0 && !QDELETED(src))
|
||||
|
||||
@@ -45,11 +45,11 @@
|
||||
..()
|
||||
sync_mind()
|
||||
blob_help()
|
||||
update_health()
|
||||
update_health_hud()
|
||||
|
||||
/mob/camera/blob/proc/update_health()
|
||||
/mob/camera/blob/update_health_hud()
|
||||
if(blob_core)
|
||||
hud_used.blobhealthdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#e36600'>[round(blob_core.health)]</font></div>"
|
||||
hud_used.blobhealthdisplay.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='#e36600'>[round(blob_core.obj_integrity)]</font></div>"
|
||||
|
||||
/mob/camera/blob/proc/add_points(var/points)
|
||||
if(points != 0)
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
var/health_timestamp = 0
|
||||
var/brute_resist = 4
|
||||
var/fire_resist = 1
|
||||
var/mob/camera/blob/overmind
|
||||
|
||||
|
||||
/obj/structure/blob/New(loc)
|
||||
@@ -176,16 +177,27 @@
|
||||
take_damage(damage, BRUTE)
|
||||
return
|
||||
|
||||
/obj/structure/blob/take_damage(damage, damage_type)
|
||||
if(!damage || damage_type == STAMINA) // Avoid divide by zero errors
|
||||
return
|
||||
/obj/structure/blob/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
damage /= max(brute_resist, 1)
|
||||
damage_amount *= brute_resist
|
||||
if(BURN)
|
||||
damage /= max(fire_resist, 1)
|
||||
health -= damage
|
||||
update_icon()
|
||||
damage_amount *= fire_resist
|
||||
if(CLONE)
|
||||
else
|
||||
return 0
|
||||
var/armor_protection = 0
|
||||
if(damage_flag)
|
||||
armor_protection = armor[damage_flag]
|
||||
damage_amount = round(damage_amount * (100 - armor_protection)*0.01, 0.1)
|
||||
if(overmind && damage_flag)
|
||||
damage_amount = overmind.blob_reagent_datum.damage_reaction(src, damage_amount, damage_type, damage_flag)
|
||||
return damage_amount
|
||||
|
||||
/obj/structure/blob/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(. && obj_integrity > 0)
|
||||
update_icon()
|
||||
|
||||
/obj/structure/blob/proc/change_to(var/type)
|
||||
if(!ispath(type))
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
for(var/obj/machinery/light/L in range(4, user))
|
||||
L.on = 1
|
||||
L.broken()
|
||||
L.break_light_tube()
|
||||
|
||||
feedback_add_details("changeling_powers","RS")
|
||||
return 1
|
||||
@@ -40,6 +40,6 @@
|
||||
/datum/action/changeling/dissonant_shriek/sting_action(var/mob/user)
|
||||
for(var/obj/machinery/light/L in range(5, usr))
|
||||
L.on = 1
|
||||
L.broken()
|
||||
L.break_light_tube()
|
||||
empulse(get_turf(user), 2, 4, 1)
|
||||
return 1
|
||||
|
||||
@@ -73,11 +73,6 @@
|
||||
if(health <= 0)
|
||||
destroy_structure()
|
||||
|
||||
/obj/structure/cult/functional/take_damage(damage, damage_type = BRUTE)
|
||||
if(damage_type == BRUTE || damage_type == BURN)
|
||||
health -= damage
|
||||
updatehealth()
|
||||
|
||||
/obj/structure/cult/functional/attackby(obj/item/I, mob/living/user)
|
||||
..()
|
||||
take_damage(I.force, I.damtype)
|
||||
|
||||
@@ -509,11 +509,6 @@
|
||||
spawn(5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/swarmer/take_damage(damage)
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/swarmer/bullet_act(obj/item/projectile/Proj)
|
||||
if(Proj.damage)
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
active_power_usage = 10
|
||||
layer = WALL_OBJ_LAYER
|
||||
resistance_flags = FIRE_PROOF
|
||||
|
||||
damage_deflection = 12
|
||||
armor = list("melee" = 50, "bullet" = 20, "laser" = 20, "energy" = 20, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 50)
|
||||
var/datum/wires/camera/wires = null // Wires datum
|
||||
max_integrity = 100
|
||||
@@ -229,7 +229,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/machinery/camera/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee" && damage_amount < 12 && !(stat & BROKEN))
|
||||
if(!(stat & BROKEN))
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -472,6 +472,7 @@
|
||||
icon = 'icons/obj/doors/airlocks/cult/runed/cult.dmi'
|
||||
overlays_file = 'icons/obj/doors/airlocks/cult/runed/overlays.dmi'
|
||||
assemblytype = /obj/structure/door_assembly/door_assembly_cult
|
||||
damage_deflection = 10
|
||||
hackProof = TRUE
|
||||
aiControlDisabled = TRUE
|
||||
var/openingoverlaytype = /obj/effect/temp_visual/cult/door
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
max_integrity = 350
|
||||
armor = list("melee" = 30, "bullet" = 30, "laser" = 20, "energy" = 20, "bomb" = 10, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 70)
|
||||
flags = PREVENT_CLICK_UNDER
|
||||
damage_deflection = 10
|
||||
var/closingLayer = CLOSED_DOOR_LAYER
|
||||
var/visible = 1
|
||||
var/operating = FALSE
|
||||
@@ -24,7 +25,6 @@
|
||||
var/auto_close_time_dangerous = 15
|
||||
var/assemblytype //the type of door frame to drop during deconstruction
|
||||
var/datum/effect_system/spark_spread/spark_system
|
||||
var/damage_deflection = 10
|
||||
var/real_explosion_block //ignore this, just use explosion_block
|
||||
var/heat_proof = FALSE // For rglass-windowed airlocks and firedoors
|
||||
var/emergency = FALSE
|
||||
@@ -203,11 +203,6 @@
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
/obj/machinery/door/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee" && damage_amount < damage_deflection)
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(. && obj_integrity > 0)
|
||||
|
||||
@@ -143,6 +143,13 @@ FIRE ALARM
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/machinery/firealarm/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(.) //damage received
|
||||
if(obj_integrity > 0 && !(stat & BROKEN) && buildstage != 0)
|
||||
if(prob(33))
|
||||
alarm()
|
||||
|
||||
/obj/machinery/firealarm/process()//Note: this processing was mostly phased out due to other code, and only runs when needed
|
||||
if(stat & (NOPOWER|BROKEN))
|
||||
return
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
desc = "A wall-mounted flashbulb device."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "mflash1"
|
||||
damage_deflection = 10
|
||||
var/id = null
|
||||
var/range = 2 //this is roughly the size of brig cell
|
||||
var/disable = 0
|
||||
|
||||
@@ -159,6 +159,10 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/newscaster/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/newscaster/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
|
||||
@@ -452,18 +452,6 @@ var/list/turret_icons
|
||||
sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit
|
||||
enabled = 1 //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here
|
||||
|
||||
/obj/machinery/porta_turret/take_damage(force)
|
||||
if(!raised && !raising)
|
||||
force = force / 8
|
||||
if(force < 5)
|
||||
return
|
||||
|
||||
health -= force
|
||||
if(force > 5 && prob(45) && spark_system)
|
||||
spark_system.start()
|
||||
if(health <= 0)
|
||||
die() //the death process :(
|
||||
|
||||
/obj/machinery/porta_turret/bullet_act(obj/item/projectile/Proj)
|
||||
if(Proj.damage_type == STAMINA)
|
||||
return
|
||||
@@ -498,6 +486,18 @@ var/list/turret_icons
|
||||
|
||||
..()
|
||||
|
||||
/obj/machinery/porta_turret/take_damage(damage, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
. = ..()
|
||||
if(. && obj_integrity > 0) //damage received
|
||||
if(prob(30))
|
||||
spark_system.start()
|
||||
if(enabled && !attacked && !emagged)
|
||||
attacked = TRUE
|
||||
addtimer(CALLBACK(src, .proc/reset_attacked), 60)
|
||||
|
||||
/obj/machinery/porta_turret/proc/reset_attacked()
|
||||
attacked = FALSE
|
||||
|
||||
/obj/machinery/porta_turret/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/equip_ready = 1
|
||||
var/energy_drain = 0
|
||||
var/obj/mecha/chassis = null
|
||||
var/range = MELEE //bitflags
|
||||
var/range = MECHA_MELEE //bitflags
|
||||
var/salvageable = 1
|
||||
var/selectable = 1 // Set to 0 for passive equipment such as mining scanner or armor plates
|
||||
|
||||
@@ -59,10 +59,10 @@
|
||||
return txt
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/is_ranged()//add a distance restricted equipment. Why not?
|
||||
return range&RANGED
|
||||
return range & MECHA_RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/is_melee()
|
||||
return range&MELEE
|
||||
return range & MECHA_MELEE
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/proc/action_checks(atom/target)
|
||||
if(!target)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
icon_state = "sleeper"
|
||||
origin_tech = "engineering=3;biotech=3;plasmatech=2"
|
||||
energy_drain = 20
|
||||
range = MELEE
|
||||
range = MECHA_MELEE
|
||||
equip_cooldown = 20
|
||||
var/mob/living/carbon/patient = null
|
||||
var/inject_amount = 10
|
||||
@@ -250,7 +250,7 @@
|
||||
var/synth_speed = 5 //[num] reagent units per cycle
|
||||
energy_drain = 10
|
||||
var/mode = 0 //0 - fire syringe, 1 - analyze reagents.
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE | MECHA_RANGED
|
||||
equip_cooldown = 10
|
||||
origin_tech = "materials=3;biotech=4;magnets=4"
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
origin_tech = "bluespace=7"
|
||||
equip_cooldown = 150
|
||||
energy_drain = 8000
|
||||
range = RANGED
|
||||
range = MECHA_RANGED
|
||||
var/tele_precision = 4
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
|
||||
@@ -39,7 +39,7 @@
|
||||
origin_tech = "bluespace=4;magnets=4;plasmatech=2"
|
||||
equip_cooldown = 50
|
||||
energy_drain = 300
|
||||
range = RANGED
|
||||
range = MECHA_RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target)
|
||||
if(!action_checks(target) || !is_teleport_allowed(loc.z))
|
||||
@@ -85,7 +85,7 @@
|
||||
origin_tech = "bluespace=3;magnets=3;engineering=4"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 100
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE | MECHA_RANGED
|
||||
var/atom/movable/locked
|
||||
var/mode = 1 //1 - gravsling 2 - gravpush
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
desc = "An exosuit module that generates power using solid plasma as fuel. Pollutes the environment."
|
||||
icon_state = "tesla"
|
||||
origin_tech = "plasmatech=2;powerstorage=2;engineering=2"
|
||||
range = MELEE
|
||||
range = MECHA_MELEE
|
||||
var/coeff = 100
|
||||
var/fuel_type = MAT_PLASMA
|
||||
var/max_fuel = 150000
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
icon_state = "mecha_exting"
|
||||
equip_cooldown = 5
|
||||
energy_drain = 0
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE | MECHA_RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/extinguisher/New()
|
||||
create_reagents(1000)
|
||||
@@ -190,7 +190,7 @@
|
||||
origin_tech = "materials=4;bluespace=3;magnets=4;powerstorage=4;engineering=4"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 250
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE | MECHA_RANGED
|
||||
flags_2 = NO_MAT_REDEMPTION_2
|
||||
var/mode = 0 //0 - deconstruct, 1 - wall or floor, 2 - airlock.
|
||||
var/canRwall = 0
|
||||
@@ -290,7 +290,7 @@
|
||||
origin_tech = "materials=4;bluespace=3;magnets=4;powerstorage=4;engineering=4"
|
||||
equip_cooldown = 10
|
||||
energy_drain = 250
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE | MECHA_RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/mimercd/can_attach(obj/mecha/combat/reticence/M)
|
||||
if(..())
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon
|
||||
name = "mecha weapon"
|
||||
range = RANGED
|
||||
range = MECHA_RANGED
|
||||
origin_tech = "materials=3;combat=3"
|
||||
var/projectile
|
||||
var/fire_sound
|
||||
@@ -186,7 +186,7 @@
|
||||
icon_state = "mecha_honker"
|
||||
energy_drain = 200
|
||||
equip_cooldown = 150
|
||||
range = MELEE|RANGED
|
||||
range = MECHA_MELEE | MECHA_RANGED
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/honker/M as obj)
|
||||
if(..())
|
||||
|
||||
+101
-130
@@ -1,11 +1,4 @@
|
||||
#define MECHA_INT_FIRE 1
|
||||
#define MECHA_INT_TEMP_CONTROL 2
|
||||
#define MECHA_INT_SHORT_CIRCUIT 4
|
||||
#define MECHA_INT_TANK_BREACH 8
|
||||
#define MECHA_INT_CONTROL_LOST 16
|
||||
|
||||
#define MELEE 1
|
||||
#define RANGED 2
|
||||
|
||||
#define MECHAMOVE_RAND 1
|
||||
#define MECHAMOVE_TURN 2
|
||||
@@ -23,6 +16,7 @@
|
||||
infra_luminosity = 15 //byond implementation is bugged.
|
||||
force = 5
|
||||
armor = list(melee = 20, bullet = 10, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 100, acid = 100)
|
||||
var/list/facing_modifiers = list(MECHA_FRONT_ARMOUR = 1.5, MECHA_SIDE_ARMOUR = 1, MECHA_BACK_ARMOUR = 0.5)
|
||||
var/ruin_mecha = FALSE //if the mecha starts on a ruin, don't automatically give it a tracking beacon to prevent metagaming.
|
||||
var/initial_icon = null //Mech type for resetting icon. Only used for reskinning kits (see custom items)
|
||||
var/can_move = 0 // time of next allowed movement
|
||||
@@ -502,13 +496,60 @@
|
||||
//////// Health related procs ////////
|
||||
////////////////////////////////////////
|
||||
|
||||
/obj/mecha/take_damage(amount, type="brute")
|
||||
if(amount)
|
||||
var/damage = absorbDamage(amount,type)
|
||||
health -= damage
|
||||
update_health()
|
||||
log_append_to_last("Took [damage] points of damage. Damage type: \"[type]\".",1)
|
||||
return
|
||||
/obj/mecha/proc/get_armour_facing(relative_dir)
|
||||
switch(relative_dir)
|
||||
if(0) // BACKSTAB!
|
||||
return facing_modifiers[MECHA_BACK_ARMOUR]
|
||||
if(45, 90, 270, 315)
|
||||
return facing_modifiers[MECHA_SIDE_ARMOUR]
|
||||
if(225, 180, 135)
|
||||
return facing_modifiers[MECHA_FRONT_ARMOUR]
|
||||
return 1 //always return non-0
|
||||
|
||||
/obj/mecha/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(. && obj_integrity > 0)
|
||||
spark_system.start()
|
||||
switch(damage_flag)
|
||||
if("fire")
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL))
|
||||
if("melee")
|
||||
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
else
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT))
|
||||
if(. >= 5 || prob(33))
|
||||
occupant_message("<span class='userdanger'>Taking damage!</span>")
|
||||
log_message("Took [damage_amount] points of damage. Damage type: [damage_type]")
|
||||
|
||||
/obj/mecha/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
. = ..()
|
||||
if(!damage_amount)
|
||||
return 0
|
||||
var/booster_deflection_modifier = 1
|
||||
var/booster_damage_modifier = 1
|
||||
if(damage_flag == "bullet" || damage_flag == "laser" || damage_flag == "energy")
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/B in equipment)
|
||||
if(B.projectile_react())
|
||||
booster_deflection_modifier = B.deflect_coeff
|
||||
booster_damage_modifier = B.damage_coeff
|
||||
break
|
||||
else if(damage_flag == "melee")
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/B in equipment)
|
||||
if(B.attack_react())
|
||||
booster_deflection_modifier *= B.deflect_coeff
|
||||
booster_damage_modifier *= B.damage_coeff
|
||||
break
|
||||
|
||||
if(attack_dir)
|
||||
var/facing_modifier = get_armour_facing(dir2angle(attack_dir) - dir2angle(src))
|
||||
booster_damage_modifier /= facing_modifier
|
||||
booster_deflection_modifier *= facing_modifier
|
||||
if(prob(deflect_chance * booster_deflection_modifier))
|
||||
visible_message("<span class='danger'>[src]'s armour deflects the attack!</span>")
|
||||
log_message("Armor saved.")
|
||||
return 0
|
||||
if(.)
|
||||
. *= booster_damage_modifier
|
||||
|
||||
/obj/mecha/proc/absorbDamage(damage,damage_type)
|
||||
return call((proc_res["dynabsorbdamage"]||src), "dynabsorbdamage")(damage,damage_type)
|
||||
@@ -527,53 +568,34 @@
|
||||
|
||||
/obj/mecha/attack_hand(mob/living/user)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
log_message("Attack by hand/paw. Attacker - [user].",1)
|
||||
user.do_attack_animation(src, ATTACK_EFFECT_PUNCH)
|
||||
playsound(loc, 'sound/weapons/tap.ogg', 40, 1, -1)
|
||||
user.visible_message("<span class='danger'>[user] hits [name]. Nothing happens</span>", "<span class='danger'>You hit [name] with no visible effect.</span>")
|
||||
log_append_to_last("Armor saved.")
|
||||
log_message("Attack by hand/paw. Attacker - [user].")
|
||||
|
||||
|
||||
/obj/mecha/attack_alien(mob/living/user)
|
||||
log_message("Attack by alien. Attacker - [user].",1)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if(!prob(deflect_chance))
|
||||
take_damage(15)
|
||||
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
to_chat(user, "<span class='warning'>You slash at the armored suit!</span>")
|
||||
visible_message("<span class='warning'>The [user] slashes at [name]'s armor!</span>")
|
||||
else
|
||||
log_append_to_last("Armor saved.")
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
to_chat(user, "<span class=notice'>Your claws had no effect!</span>")
|
||||
occupant_message("<span class='notice'>The [user]'s claws are stopped by the armor.</span>")
|
||||
visible_message("<span class='notice'>The [user] rebounds off [name]'s armor!</span>")
|
||||
return
|
||||
|
||||
log_message("Attack by alien. Attacker - [user].")
|
||||
playsound(src.loc, 'sound/weapons/slash.ogg', 100, TRUE)
|
||||
attack_generic(user, 15, BRUTE, "melee", 0)
|
||||
|
||||
/obj/mecha/attack_animal(mob/living/simple_animal/user)
|
||||
log_message("Attack by simple animal. Attacker - [user].",1)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
if((user.a_intent == INTENT_HELP && user.ckey) || user.melee_damage_upper == 0)
|
||||
log_message("Attack by simple animal. Attacker - [user].")
|
||||
if(!user.melee_damage_upper && !user.obj_damage)
|
||||
user.custom_emote(1, "[user.friendly] [src].")
|
||||
return FALSE
|
||||
else
|
||||
user.do_attack_animation(src)
|
||||
if(!prob(deflect_chance))
|
||||
var/damage = rand(user.melee_damage_lower, user.melee_damage_upper)
|
||||
take_damage(damage)
|
||||
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
visible_message("<span class='danger'>[user]</span> [user.attacktext] [src]!")
|
||||
user.create_attack_log("<font color='red'>attacked [name]</font>")
|
||||
else
|
||||
log_append_to_last("Armor saved.")
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 50, 1, -1)
|
||||
occupant_message("<span class='notice'>The [user]'s attack is stopped by the armor.</span>")
|
||||
visible_message("<span class='notice'>The [user] rebounds off [name]'s armor!</span>")
|
||||
user.create_attack_log("<font color='red'>attacked [name]</font>")
|
||||
return
|
||||
var/play_soundeffect = 1
|
||||
if(user.environment_smash)
|
||||
play_soundeffect = 0
|
||||
playsound(src, 'sound/effects/bang.ogg', 50, TRUE)
|
||||
var/animal_damage = rand(user.melee_damage_lower,user.melee_damage_upper)
|
||||
if(user.obj_damage)
|
||||
animal_damage = user.obj_damage
|
||||
animal_damage = min(animal_damage, 20*user.environment_smash)
|
||||
user.create_attack_log("<font color='red'>attacked [name]</font>")
|
||||
attack_generic(user, animal_damage, user.melee_damage_type, "melee", play_soundeffect)
|
||||
return TRUE
|
||||
|
||||
/obj/mecha/hulk_damage()
|
||||
return 15
|
||||
@@ -581,65 +603,39 @@
|
||||
/obj/mecha/attack_hulk(mob/living/carbon/human/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL, MECHA_INT_TANK_BREACH, MECHA_INT_CONTROL_LOST))
|
||||
log_message("Attack by hulk. Attacker - [user].", 1)
|
||||
add_attack_logs(user, src, "Punched with hulk powers")
|
||||
|
||||
/obj/mecha/hitby(atom/movable/A) //wrapper
|
||||
/obj/mecha/blob_act(obj/structure/blob/B)
|
||||
log_message("Attack by blob. Attacker - [B].")
|
||||
take_damage(30, BRUTE, "melee", 0, get_dir(src, B))
|
||||
|
||||
/obj/mecha/attack_tk()
|
||||
return
|
||||
|
||||
/obj/mecha/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum) //wrapper
|
||||
log_message("Hit by [AM].")
|
||||
. = ..()
|
||||
|
||||
/obj/mecha/bullet_act(obj/item/projectile/Proj) //wrapper
|
||||
log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).")
|
||||
..()
|
||||
log_message("Hit by [A].",1)
|
||||
|
||||
var/def_coeff = 1
|
||||
var/dam_coeff = 1
|
||||
var/counter_tracking = 0
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/B in equipment)
|
||||
if(B.projectile_react())
|
||||
def_coeff = B.deflect_coeff
|
||||
dam_coeff = B.damage_coeff
|
||||
counter_tracking = 1
|
||||
break
|
||||
|
||||
if(istype(A, /obj/item/mecha_parts/mecha_tracking))
|
||||
if(!counter_tracking)
|
||||
A.forceMove(src)
|
||||
visible_message("The [A] fastens firmly to [src].")
|
||||
return
|
||||
|
||||
if(prob(deflect_chance * def_coeff) || ismob(A))
|
||||
occupant_message("<span class='danger'>[A] bounces off the armor.</span>")
|
||||
visible_message("<span class='danger'>[A] bounces off the [src]\s armor!</span>")
|
||||
log_append_to_last("Armor saved.")
|
||||
if(isliving(A))
|
||||
var/mob/living/M = A
|
||||
M.take_organ_damage(10)
|
||||
|
||||
if(isobj(A))
|
||||
var/obj/O = A
|
||||
if(O.throwforce)
|
||||
take_damage(O.throwforce * dam_coeff)
|
||||
check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST))
|
||||
|
||||
|
||||
/obj/mecha/bullet_act(var/obj/item/projectile/Proj) //wrapper
|
||||
log_message("Hit by projectile. Type: [Proj.name]([Proj.flag]).",1)
|
||||
|
||||
var/deflection = 1
|
||||
var/dam_coeff = 1
|
||||
for(var/obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/B in equipment)
|
||||
if(B.projectile_react())
|
||||
deflection = B.deflect_coeff
|
||||
dam_coeff = B.damage_coeff
|
||||
break
|
||||
|
||||
if(Proj.damage_type != BRUTE && Proj.damage_type != BURN)
|
||||
visible_message("<span class='danger'>[src]'s armour is undamaged by [Proj]!</span>")
|
||||
else if(prob(deflect_chance * deflection))
|
||||
visible_message("<span class='danger'>[src]'s armour deflects [Proj]!</span>")
|
||||
else
|
||||
visible_message("<span class='danger'>[src] is hit by [Proj].</span>")
|
||||
take_damage(Proj.damage * dam_coeff, Proj.flag)
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT))
|
||||
Proj.on_hit(src)
|
||||
/obj/mecha/ex_act(severity, target)
|
||||
log_message("Affected by explosion of severity: [severity].")
|
||||
if(prob(deflect_chance))
|
||||
severity++
|
||||
log_message("Armor saved, changing severity to [severity]")
|
||||
..()
|
||||
severity++
|
||||
for(var/X in equipment)
|
||||
var/obj/item/mecha_parts/mecha_equipment/ME = X
|
||||
ME.ex_act(severity)
|
||||
for(var/Y in trackers)
|
||||
var/obj/item/mecha_parts/mecha_tracking/MT = Y
|
||||
MT.ex_act(severity)
|
||||
if(occupant)
|
||||
occupant.ex_act(severity)
|
||||
|
||||
|
||||
/obj/mecha/Destroy()
|
||||
@@ -692,32 +688,7 @@
|
||||
GLOB.mechas_list -= src //global mech list
|
||||
return ..()
|
||||
|
||||
/obj/mecha/ex_act(severity)
|
||||
log_message("Affected by explosion of severity: [severity].",1)
|
||||
if(prob(deflect_chance))
|
||||
severity++
|
||||
log_append_to_last("Armor saved, changing severity to [severity].")
|
||||
switch(severity)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if(2)
|
||||
if(prob(30))
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(initial(health)/2)
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL, MECHA_INT_TANK_BREACH, MECHA_INT_CONTROL_LOST, MECHA_INT_SHORT_CIRCUIT), 1)
|
||||
if(3)
|
||||
if(prob(5))
|
||||
qdel(src)
|
||||
else
|
||||
take_damage(initial(health) / 5)
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE, MECHA_INT_TEMP_CONTROL, MECHA_INT_TANK_BREACH, MECHA_INT_CONTROL_LOST, MECHA_INT_SHORT_CIRCUIT), 1)
|
||||
|
||||
//TODO
|
||||
/obj/mecha/blob_act()
|
||||
take_damage(30, "brute")
|
||||
return
|
||||
|
||||
/obj/mecha/emp_act(severity)
|
||||
if(get_charge())
|
||||
use_power((cell.charge/3)/(severity*2))
|
||||
|
||||
@@ -184,6 +184,14 @@
|
||||
step_rand(A)
|
||||
return ..()
|
||||
|
||||
/obj/mecha/working/ripley/ex_act(severity)
|
||||
..()
|
||||
for(var/X in cargo)
|
||||
var/obj/O = X
|
||||
if(prob(30 / severity))
|
||||
cargo -= O
|
||||
O.forceMove(drop_location())
|
||||
|
||||
/obj/mecha/working/ripley/proc/update_pressure()
|
||||
var/turf/T = get_turf(loc)
|
||||
|
||||
|
||||
@@ -8,6 +8,20 @@
|
||||
var/health = 15
|
||||
var/mob/living/carbon/human/master_commander = null
|
||||
|
||||
/obj/structure/spider/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
if(damage_type == BURN)//the stickiness of the web mutes all attack sounds except fire damage type
|
||||
playsound(loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
|
||||
/obj/structure/spider/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if(damage_flag == "melee")
|
||||
switch(damage_type)
|
||||
if(BURN)
|
||||
damage_amount *= 2
|
||||
if(BRUTE)
|
||||
damage_amount *= 0.25
|
||||
. = ..()
|
||||
|
||||
/obj/structure/spider/Destroy()
|
||||
master_commander = null
|
||||
return ..()
|
||||
|
||||
@@ -1,45 +1,52 @@
|
||||
//the essential proc to call when an obj must receive damage of any kind.
|
||||
/obj/proc/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir, armour_penetration = 0)
|
||||
/obj/proc/take_damage(damage_amount, damage_type = BRUTE, damage_flag = "", sound_effect = TRUE, attack_dir, armour_penetration = 0)
|
||||
if(QDELETED(src))
|
||||
stack_trace("[src] taking damage after deletion")
|
||||
return
|
||||
if(sound_effect)
|
||||
play_attack_sound(damage_amount, damage_type, damage_flag)
|
||||
if(!(resistance_flags & INDESTRUCTIBLE) && obj_integrity > 0)
|
||||
damage_amount = run_obj_armor(damage_amount, damage_type, damage_flag, attack_dir, armour_penetration)
|
||||
if(damage_amount >= 0.1)
|
||||
. = damage_amount
|
||||
var/old_integ = obj_integrity
|
||||
obj_integrity = max(old_integ - damage_amount, 0)
|
||||
if(obj_integrity <= 0)
|
||||
var/int_fail = integrity_failure
|
||||
if(int_fail && old_integ > int_fail)
|
||||
obj_break(damage_flag)
|
||||
obj_destruction(damage_flag)
|
||||
else if(integrity_failure)
|
||||
if(obj_integrity <= integrity_failure)
|
||||
obj_break(damage_flag)
|
||||
if((resistance_flags & INDESTRUCTIBLE) || obj_integrity <= 0)
|
||||
return
|
||||
damage_amount = run_obj_armor(damage_amount, damage_type, damage_flag, attack_dir, armour_penetration)
|
||||
if(damage_amount < DAMAGE_PRECISION)
|
||||
return
|
||||
. = damage_amount
|
||||
obj_integrity = max(obj_integrity - damage_amount, 0)
|
||||
//BREAKING FIRST
|
||||
if(integrity_failure && obj_integrity <= integrity_failure)
|
||||
obj_break(damage_flag)
|
||||
//DESTROYING SECOND
|
||||
if(obj_integrity <= 0)
|
||||
obj_destruction(damage_flag)
|
||||
|
||||
//returns the damage value of the attack after processing the obj's various armor protections
|
||||
///returns the damage value of the attack after processing the obj's various armor protections
|
||||
/obj/proc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir, armour_penetration = 0)
|
||||
if(!(damage_type in list(BRUTE, BURN)))
|
||||
if(damage_flag == "melee" && damage_amount < damage_deflection)
|
||||
return 0
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(BURN)
|
||||
else
|
||||
return 0
|
||||
var/armor_protection = 0
|
||||
if(damage_flag)
|
||||
armor_protection = armor[damage_flag]
|
||||
if(armor_protection) //Only apply weak-against-armor/hollowpoint effects if there actually IS armor.
|
||||
armor_protection = Clamp(armor_protection - armour_penetration, 0, 100)
|
||||
return round(damage_amount * (100 - armor_protection) * 0.01, 0.1)
|
||||
armor_protection = Clamp(armor_protection - armour_penetration, min(armor_protection, 0), 100)
|
||||
return round(damage_amount * (100 - armor_protection)*0.01, DAMAGE_PRECISION)
|
||||
|
||||
//the sound played when the obj is damaged.
|
||||
///the sound played when the obj is damaged.
|
||||
/obj/proc/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
if(damage_amount)
|
||||
playsound(src, 'sound/weapons/smash.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/smash.ogg', 50, TRUE)
|
||||
else
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/tap.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, 1)
|
||||
playsound(src.loc, 'sound/items/welder.ogg', 100, TRUE)
|
||||
|
||||
/obj/hitby(atom/movable/AM)
|
||||
/obj/hitby(atom/movable/AM, skipcatch, hitpush, blocked, datum/thrownthing/throwingdatum)
|
||||
..()
|
||||
var/tforce = 0
|
||||
if(ismob(AM))
|
||||
@@ -54,8 +61,7 @@
|
||||
return
|
||||
switch(severity)
|
||||
if(1)
|
||||
obj_integrity = 0
|
||||
qdel(src)
|
||||
take_damage(INFINITY, BRUTE, "bomb", 0)
|
||||
if(2)
|
||||
take_damage(rand(100, 250), BRUTE, "bomb", 0)
|
||||
if(3)
|
||||
@@ -63,11 +69,12 @@
|
||||
|
||||
/obj/bullet_act(obj/item/projectile/P)
|
||||
. = ..()
|
||||
playsound(src, P.hitsound, 50, 1)
|
||||
playsound(src, P.hitsound, 50, TRUE)
|
||||
visible_message("<span class='danger'>[src] is hit by \a [P]!</span>")
|
||||
if(!QDELETED(src)) //Bullet on_hit effect might have already destroyed this object
|
||||
take_damage(P.damage, P.damage_type, P.flag, 0, turn(P.dir, 180), P.armour_penetration)
|
||||
|
||||
///Called to get the damage that hulks will deal to the obj.
|
||||
/obj/proc/hulk_damage()
|
||||
return 150 //the damage hulks do on punches to this object, is affected by melee armor
|
||||
|
||||
@@ -84,17 +91,6 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/force_pushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
|
||||
return TRUE
|
||||
|
||||
/obj/move_crushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
|
||||
collision_damage(pusher, force, direction)
|
||||
return TRUE
|
||||
|
||||
/obj/proc/collision_damage(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
|
||||
var/amt = max(0, ((force - (move_resist * MOVE_FORCE_CRUSH_RATIO)) / (move_resist * MOVE_FORCE_CRUSH_RATIO)) * 10)
|
||||
take_damage(amt, BRUTE)
|
||||
|
||||
/obj/blob_act(obj/structure/blob/B)
|
||||
if(isturf(loc))
|
||||
var/turf/T = loc
|
||||
@@ -109,7 +105,7 @@
|
||||
|
||||
/obj/attack_alien(mob/living/carbon/alien/humanoid/user)
|
||||
if(attack_generic(user, 60, BRUTE, "melee", 0))
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 100, 1)
|
||||
playsound(loc, 'sound/weapons/slash.ogg', 100, TRUE)
|
||||
|
||||
/obj/attack_animal(mob/living/simple_animal/M)
|
||||
if((M.a_intent == INTENT_HELP && M.ckey) || (!M.melee_damage_upper && !M.obj_damage))
|
||||
@@ -126,6 +122,17 @@
|
||||
if(. && !play_soundeffect)
|
||||
playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1)
|
||||
|
||||
/obj/force_pushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
|
||||
return TRUE
|
||||
|
||||
/obj/move_crushed(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
|
||||
collision_damage(pusher, force, direction)
|
||||
return TRUE
|
||||
|
||||
/obj/proc/collision_damage(atom/movable/pusher, force = MOVE_FORCE_DEFAULT, direction)
|
||||
var/amt = max(0, ((force - (move_resist * MOVE_FORCE_CRUSH_RATIO)) / (move_resist * MOVE_FORCE_CRUSH_RATIO)) * 10)
|
||||
take_damage(amt, BRUTE)
|
||||
|
||||
/obj/attack_slime(mob/living/carbon/slime/user)
|
||||
if(!user.is_adult)
|
||||
return
|
||||
@@ -141,19 +148,19 @@
|
||||
else
|
||||
switch(M.damtype)
|
||||
if(BRUTE)
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, 1)
|
||||
playsound(src, 'sound/weapons/punch4.ogg', 50, TRUE)
|
||||
if(BURN)
|
||||
playsound(src, 'sound/items/welder.ogg', 50, 1)
|
||||
playsound(src, 'sound/items/welder.ogg', 50, TRUE)
|
||||
if(TOX)
|
||||
playsound(src, 'sound/effects/spray2.ogg', 50, 1)
|
||||
playsound(src, 'sound/effects/spray2.ogg', 50, TRUE)
|
||||
return 0
|
||||
else
|
||||
return 0
|
||||
visible_message("<span class='danger'>[M.name] has hit [src].</span>")
|
||||
M.visible_message("<span class='danger'>[M.name] hits [src]!</span>", "<span class='danger'>You hit [src]!</span>")
|
||||
return take_damage(M.force*3, mech_damtype, "melee", play_soundeffect, get_dir(src, M)) // multiplied by 3 so we can hit objs hard but not be overpowered against mobs.
|
||||
|
||||
/obj/singularity_act()
|
||||
ex_act(1)
|
||||
ex_act(EXPLODE_DEVASTATE)
|
||||
if(src && !QDELETED(src))
|
||||
qdel(src)
|
||||
return 2
|
||||
@@ -210,17 +217,20 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
add_overlay(fire_overlay, TRUE)
|
||||
return 1
|
||||
|
||||
///called when the obj is destroyed by fire
|
||||
/obj/proc/burn()
|
||||
if(resistance_flags & ON_FIRE)
|
||||
SSfires.processing -= src
|
||||
deconstruct(FALSE)
|
||||
|
||||
///Called when the obj is no longer on fire.
|
||||
/obj/proc/extinguish()
|
||||
if(resistance_flags & ON_FIRE)
|
||||
resistance_flags &= ~ON_FIRE
|
||||
cut_overlay(fire_overlay, TRUE)
|
||||
SSfires.processing -= src
|
||||
|
||||
///Called when the obj is hit by a tesla bolt.
|
||||
/obj/proc/tesla_act(power)
|
||||
being_shocked = TRUE
|
||||
var/power_bounced = power * 0.5
|
||||
@@ -232,6 +242,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
|
||||
//the obj is deconstructed into pieces, whether through careful disassembly or when destroyed.
|
||||
/obj/proc/deconstruct(disassembled = TRUE)
|
||||
SEND_SIGNAL(src, COMSIG_OBJ_DECONSTRUCT, disassembled)
|
||||
qdel(src)
|
||||
|
||||
//what happens when the obj's health is below integrity_failure level.
|
||||
@@ -247,8 +258,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
else
|
||||
deconstruct(FALSE)
|
||||
|
||||
//changes max_integrity while retaining current health percentage
|
||||
//returns TRUE if the obj broke, FALSE otherwise
|
||||
///changes max_integrity while retaining current health percentage, returns TRUE if the obj got broken.
|
||||
/obj/proc/modify_max_integrity(new_max, can_break = TRUE, damage_type = BRUTE, new_failure_integrity = null)
|
||||
var/current_integrity = obj_integrity
|
||||
var/current_max = max_integrity
|
||||
@@ -268,6 +278,6 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
//returns how much the object blocks an explosion
|
||||
///returns how much the object blocks an explosion. Used by subtypes.
|
||||
/obj/proc/GetExplosionBlock()
|
||||
CRASH("Unimplemented GetExplosionBlock()")
|
||||
CRASH("Unimplemented GetExplosionBlock()")
|
||||
@@ -12,11 +12,15 @@
|
||||
var/force = 0
|
||||
var/list/armor
|
||||
var/obj_integrity //defaults to max_integrity
|
||||
var/max_integrity = INFINITY
|
||||
var/max_integrity = 500
|
||||
var/integrity_failure = 0 //0 if we have no special broken behavior
|
||||
var/acid_level = 0 //how much acid is on that obj
|
||||
///Damage under this value will be completely ignored
|
||||
var/damage_deflection = 0
|
||||
|
||||
var/resistance_flags = NONE // INDESTRUCTIBLE
|
||||
|
||||
var/acid_level = 0 //how much acid is on that obj
|
||||
|
||||
var/can_be_hit = TRUE //can this be bludgeoned by items?
|
||||
|
||||
var/Mtoollink = 0 // variable to decide if an object should show the multitool menu linking menu, not all objects use it
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
locked = 1
|
||||
broken = 0
|
||||
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
damage_deflection = 20
|
||||
var/large = 1
|
||||
icon_closed = "secure"
|
||||
var/icon_locked = "secure1"
|
||||
|
||||
@@ -237,6 +237,8 @@
|
||||
var/sparks = "securecratesparks"
|
||||
var/emag = "securecrateemag"
|
||||
armor = list("melee" = 30, "bullet" = 50, "laser" = 50, "energy" = 100, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 80, "acid" = 80)
|
||||
damage_deflection = 25
|
||||
var/tamperproof = 0
|
||||
broken = 0
|
||||
locked = 1
|
||||
health = 1000
|
||||
@@ -253,6 +255,21 @@
|
||||
else
|
||||
overlays += greenlight
|
||||
|
||||
/obj/structure/closet/crate/secure/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
if(prob(tamperproof) && damage_amount >= DAMAGE_PRECISION)
|
||||
boom()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/structure/closet/crate/secure/proc/boom(mob/user)
|
||||
if(user)
|
||||
to_chat(user, "<span class='danger'>The crate's anti-tamper system activates!</span>")
|
||||
investigate_log("[key_name(user)] has detonated a [src]", INVESTIGATE_BOMB)
|
||||
for(var/atom/movable/AM in src)
|
||||
qdel(AM)
|
||||
explosion(get_turf(src), 0, 1, 5, 5)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/closet/crate/secure/can_open()
|
||||
return !locked
|
||||
|
||||
|
||||
@@ -41,12 +41,6 @@
|
||||
take_damage(rand(25, 75))
|
||||
return
|
||||
|
||||
/obj/structure/girder/take_damage(amount)
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/temperature_expose(datum/gas_mixture/air, exposed_temperature)
|
||||
..()
|
||||
var/temp_check = exposed_temperature
|
||||
@@ -502,12 +496,6 @@
|
||||
T.ChangeTurf(/turf/simulated/wall/cult)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/cult/take_damage(amount)
|
||||
health -= amount
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/runed_metal(get_turf(src))
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/girder/cult/narsie_act()
|
||||
return
|
||||
|
||||
|
||||
@@ -49,6 +49,10 @@
|
||||
else
|
||||
take_damage(rand(5,10), BRUTE, 0)
|
||||
|
||||
/obj/structure/grille/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/structure/grille/blob_act()
|
||||
if(!broken)
|
||||
obj_break()
|
||||
|
||||
@@ -480,9 +480,10 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
reinf = TRUE
|
||||
cancolor = TRUE
|
||||
heat_resistance = 1600
|
||||
armor = list("melee" = 90, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
|
||||
max_integrity = 50
|
||||
explosion_block = 1
|
||||
damage_deflection = 11
|
||||
glass_type = /obj/item/stack/sheet/rglass
|
||||
|
||||
/obj/structure/window/reinforced/tinted
|
||||
@@ -554,7 +555,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
heat_resistance = 32000
|
||||
max_integrity = 120
|
||||
explosion_block = 1
|
||||
armor = list("melee" = 90, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
|
||||
/obj/structure/window/plasmabasic/BlockSuperconductivity()
|
||||
return 1
|
||||
@@ -568,7 +569,8 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
reinf = TRUE
|
||||
max_integrity = 160
|
||||
explosion_block = 2
|
||||
armor = list("melee" = 90, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
damage_deflection = 21
|
||||
|
||||
/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
@@ -604,7 +606,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = list(/obj/structure/window/full/basic, /obj/structure/window/full/reinforced, /obj/structure/window/full/reinforced/tinted, /obj/structure/window/full/plasmabasic, /obj/structure/window/full/plasmareinforced)
|
||||
explosion_block = 1
|
||||
armor = list("melee" = 90, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 5, "laser" = 0, "energy" = 0, "bomb" = 45, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
|
||||
/obj/structure/window/full/plasmareinforced
|
||||
name = "reinforced plasma window"
|
||||
@@ -617,7 +619,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
reinf = TRUE
|
||||
max_integrity = 320
|
||||
explosion_block = 2
|
||||
armor = list("melee" = 90, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 20, "laser" = 0, "energy" = 0, "bomb" = 60, "bio" = 100, "rad" = 100, "fire" = 99, "acid" = 100)
|
||||
|
||||
/obj/structure/window/full/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
@@ -632,7 +634,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
max_integrity = 100
|
||||
reinf = TRUE
|
||||
heat_resistance = 1600
|
||||
armor = list("melee" = 90, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
|
||||
armor = list("melee" = 80, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 25, "bio" = 100, "rad" = 100, "fire" = 80, "acid" = 100)
|
||||
explosion_block = 1
|
||||
glass_type = /obj/item/stack/sheet/rglass
|
||||
cancolor = TRUE
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
return
|
||||
var/ticketID = text2num(href_list["openmentorticket"])
|
||||
SSmentor_tickets.showDetailUI(usr, ticketID)
|
||||
|
||||
|
||||
if(href_list["stickyban"])
|
||||
stickyban(href_list["stickyban"],href_list)
|
||||
|
||||
@@ -2768,7 +2768,7 @@
|
||||
feedback_add_details("admin_secrets_fun_used","BO")
|
||||
message_admins("[key_name_admin(usr)] broke all lights", 1)
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
L.broken()
|
||||
L.break_light_tube()
|
||||
if("whiteout")
|
||||
feedback_inc("admin_secrets_fun_used",1)
|
||||
feedback_add_details("admin_secrets_fun_used","WO")
|
||||
|
||||
@@ -534,11 +534,6 @@
|
||||
"<span class='notice'>You tap on the [name].</span>", \
|
||||
"You hear a knocking sound.")
|
||||
|
||||
/obj/machinery/fishtank/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
. = ..()
|
||||
if(.) //received damage
|
||||
check_health()
|
||||
|
||||
/obj/machinery/fishtank/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
if(BRUTE)
|
||||
|
||||
@@ -209,12 +209,4 @@
|
||||
if(locked)
|
||||
boom(user)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/structure/closet/crate/secure/loot/proc/boom(mob/user)
|
||||
to_chat(user, "<span class='danger'>The crate's anti-tamper system activates!</span>")
|
||||
for(var/atom/movable/AM in src)
|
||||
qdel(AM)
|
||||
var/turf/T = get_turf(src)
|
||||
explosion(T, -1, -1, 1, 1)
|
||||
qdel(src)
|
||||
..()
|
||||
@@ -91,7 +91,7 @@ GLOBAL_LIST(labor_sheet_values)
|
||||
if(href_list["handle_id"])
|
||||
if(inserted_id)
|
||||
if(!usr.put_in_hands(inserted_id))
|
||||
inserted_id.forceMove(get_turf(src))
|
||||
inserted_id.forceMove(get_turf(src))
|
||||
inserted_id = null
|
||||
else
|
||||
var/obj/item/I = usr.get_active_hand()
|
||||
@@ -143,6 +143,7 @@ GLOBAL_LIST(labor_sheet_values)
|
||||
|
||||
/**********************Prisoner Collection Unit**************************/
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker
|
||||
damage_deflection = 21
|
||||
var/points = 0 //The unclaimed value of ore stacked.
|
||||
|
||||
/obj/machinery/mineral/stacking_machine/laborstacker/process_sheet(obj/item/stack/sheet/inp)
|
||||
|
||||
@@ -27,6 +27,11 @@ var/const/MAX_ACTIVE_TIME = 400
|
||||
|
||||
var/attached = 0
|
||||
|
||||
/obj/item/clothing/mask/facehugger/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
..()
|
||||
if(obj_integrity < 90)
|
||||
Die()
|
||||
|
||||
/obj/item/clothing/mask/facehugger/attack_alien(mob/user) //can be picked up by aliens
|
||||
attack_hand(user)
|
||||
return
|
||||
|
||||
@@ -150,7 +150,7 @@
|
||||
. = ..()
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/carbon/slime/proc/update_health_hud()
|
||||
/mob/living/carbon/slime/update_health_hud()
|
||||
if(hud_used)
|
||||
var/severity = 0
|
||||
var/healthpercent = (health/maxHealth) * 100
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
. = ..()
|
||||
update_health_hud()
|
||||
|
||||
/mob/living/simple_animal/slime/proc/update_health_hud()
|
||||
/mob/living/simple_animal/slime/update_health_hud()
|
||||
if(hud_used)
|
||||
var/severity = 0
|
||||
var/healthpercent = (health/maxHealth) * 100
|
||||
|
||||
@@ -306,7 +306,7 @@
|
||||
visible_message("<span class='userdanger'>\The [src] emits a bone-chilling shriek!</span>")
|
||||
for(var/obj/machinery/light/L in orange(light_range, src))
|
||||
if(L.on && prob(light_chance))
|
||||
L.broken()
|
||||
L.break_light_tube()
|
||||
for(var/obj/machinery/camera/C in orange(camera_range, src))
|
||||
if(C.status && prob(camera_chance))
|
||||
C.toggle_cam(src, 0)
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
if(!L.status)
|
||||
step_to(src,L)
|
||||
L.on = 1
|
||||
L.broken()
|
||||
L.break_light_tube()
|
||||
do_attack_animation(L)
|
||||
visible_message("<span class='danger'>[src] smashes the [L.name].</span>")
|
||||
return
|
||||
|
||||
@@ -61,5 +61,8 @@
|
||||
/mob/proc/update_stat()
|
||||
return
|
||||
|
||||
/mob/proc/update_health_hud()
|
||||
return
|
||||
|
||||
/mob/proc/update_canmove()
|
||||
return 1
|
||||
|
||||
@@ -75,10 +75,6 @@
|
||||
|
||||
return TRUE // Good to go.
|
||||
|
||||
// Handles damage checks
|
||||
/obj/item/computer_hardware/take_damage(damage_amount)
|
||||
obj_integrity = max(obj_integrity - damage_amount, 0)
|
||||
|
||||
/obj/item/computer_hardware/examine(var/mob/user)
|
||||
. = ..()
|
||||
if(damage > damage_failure)
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
resistance_flags = FIRE_PROOF
|
||||
req_access = list(access_engine_equip)
|
||||
siemens_strength = 1
|
||||
damage_deflection = 10
|
||||
var/area/area
|
||||
var/areastring = null
|
||||
var/obj/item/stock_parts/cell/cell
|
||||
@@ -655,6 +656,11 @@
|
||||
"<span class='warning'>You hit the [src.name] with your [W.name]!</span>", \
|
||||
"You hear a bang.")
|
||||
|
||||
/obj/machinery/power/apc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
|
||||
if((!(stat & BROKEN) || malfai))
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
/obj/machinery/power/apc/emag_act(user as mob)
|
||||
if(!(emagged || malfhack)) // trying to unlock with an emag card
|
||||
if(opened)
|
||||
@@ -1355,12 +1361,12 @@
|
||||
spawn(0)
|
||||
for(var/obj/machinery/light/L in area)
|
||||
if(prob(chance))
|
||||
L.broken(0, 1)
|
||||
L.break_light_tube(0, 1)
|
||||
stoplag()
|
||||
|
||||
/obj/machinery/power/apc/proc/null_charge()
|
||||
for(var/obj/machinery/light/L in area)
|
||||
L.broken(0, 1)
|
||||
L.break_light_tube(0, 1)
|
||||
stoplag()
|
||||
|
||||
/obj/machinery/power/apc/proc/setsubsystem(val)
|
||||
|
||||
@@ -200,12 +200,12 @@
|
||||
if("tube")
|
||||
brightness_range = 8
|
||||
if(prob(2))
|
||||
broken(1)
|
||||
break_light_tube(1)
|
||||
if("bulb")
|
||||
brightness_range = 4
|
||||
brightness_color = "#a0a080"
|
||||
if(prob(5))
|
||||
broken(1)
|
||||
break_light_tube()
|
||||
spawn(1)
|
||||
update(0)
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
if(on && (W.flags & CONDUCT))
|
||||
if(prob(12))
|
||||
electrocute_mob(user, get_area(src), src, 0.3, TRUE)
|
||||
broken()
|
||||
break_light_tube()
|
||||
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user.name] hits the light.</span>")
|
||||
@@ -390,6 +390,12 @@
|
||||
electrocute_mob(user, get_area(src), src, rand(0.7, 1), TRUE)
|
||||
|
||||
|
||||
/obj/machinery/light/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1)
|
||||
. = ..()
|
||||
if(. && !QDELETED(src))
|
||||
if(prob(damage_amount * 5))
|
||||
break_light_tube()
|
||||
|
||||
// returns whether this light has power
|
||||
// true if area has power and lightswitch is on
|
||||
/obj/machinery/light/proc/has_power()
|
||||
@@ -423,7 +429,7 @@
|
||||
else if(status == LIGHT_OK||status == LIGHT_BURNED)
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user.name] smashed the light!</span>", "You hear a tinkle of breaking glass")
|
||||
broken()
|
||||
break_light_tube()
|
||||
return
|
||||
|
||||
/obj/machinery/light/attack_animal(mob/living/simple_animal/M)
|
||||
@@ -434,7 +440,7 @@
|
||||
else if(status == LIGHT_OK||status == LIGHT_BURNED)
|
||||
M.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[M.name] smashed the light!</span>", "You hear a tinkle of breaking glass")
|
||||
broken()
|
||||
break_light_tube()
|
||||
return
|
||||
// attack with hand - remove tube/bulb
|
||||
// if hands aren't protected and the light is on, burn the player
|
||||
@@ -529,7 +535,7 @@
|
||||
status = LIGHT_EMPTY
|
||||
update()
|
||||
|
||||
/obj/machinery/light/proc/broken(skip_sound_and_sparks = 0, overloaded = 0)
|
||||
/obj/machinery/light/proc/break_light_tube(skip_sound_and_sparks = 0, overloaded = 0)
|
||||
if(status == LIGHT_EMPTY || status == LIGHT_BROKEN)
|
||||
return
|
||||
|
||||
@@ -562,9 +568,9 @@
|
||||
qdel(src)
|
||||
return
|
||||
if(2.0)
|
||||
broken()
|
||||
break_light_tube()
|
||||
if(3.0)
|
||||
broken()
|
||||
break_light_tube()
|
||||
return
|
||||
|
||||
//blob effect
|
||||
@@ -588,14 +594,14 @@
|
||||
/obj/machinery/light/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(prob(max(0, exposed_temperature - 673))) //0% at <400C, 100% at >500C
|
||||
broken()
|
||||
break_light_tube()
|
||||
|
||||
// explode the light
|
||||
|
||||
/obj/machinery/light/proc/explode()
|
||||
var/turf/T = get_turf(src.loc)
|
||||
spawn(0)
|
||||
broken() // break it first to give a warning
|
||||
break_light_tube() // break it first to give a warning
|
||||
sleep(2)
|
||||
explosion(T, 0, 0, 2, 2)
|
||||
sleep(1)
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
/datum/reagent/blob/reaction_mob(mob/living/M, method=TOUCH, volume, show_message, touch_protection)
|
||||
return round(volume * min(1.5 - touch_protection, 1), 0.1) //full touch protection means 50% volume, any prot below 0.5 means 100% volume.
|
||||
|
||||
/datum/reagent/blob/proc/damage_reaction(obj/structure/blob/B, damage, damage_type, damage_flag) //when the blob takes damage, do this
|
||||
return damage
|
||||
|
||||
/datum/reagent/blob/ripping_tendrils //does brute and a little stamina damage
|
||||
name = "Ripping Tendrils"
|
||||
description = "Deals High Brute damage, as well as Stamina damage."
|
||||
|
||||
@@ -12,6 +12,12 @@
|
||||
var/reagent_id = "water" //The ID of the reagent that the dispenser uses
|
||||
var/lastrigger = "" // The last person to rig this fuel tank - Stored with the object. Only the last person matter for investigation
|
||||
|
||||
/obj/structure/reagent_dispensers/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
|
||||
. = ..()
|
||||
if(. && obj_integrity > 0)
|
||||
if(tank_volume && (damage_flag == "bullet" || damage_flag == "laser"))
|
||||
boom()
|
||||
|
||||
/obj/structure/reagent_dispensers/attackby(obj/item/I, mob/user, params)
|
||||
if(I.is_refillable())
|
||||
return FALSE //so we can refill them via their afterattack.
|
||||
|
||||
@@ -682,6 +682,7 @@
|
||||
dir = 0 // dir will contain dominant direction for junction pipes
|
||||
var/health = 10 // health points 0-10
|
||||
armor = list("melee" = 25, "bullet" = 10, "laser" = 10, "energy" = 100, "bomb" = 0, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 30)
|
||||
damage_deflection = 10
|
||||
layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes
|
||||
var/base_icon_state // initial icon state on map
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "code\__DEFINES\machines.dm"
|
||||
#include "code\__DEFINES\math.dm"
|
||||
#include "code\__DEFINES\MC.dm"
|
||||
#include "code\__DEFINES\mecha.dm"
|
||||
#include "code\__DEFINES\medal.dm"
|
||||
#include "code\__DEFINES\misc.dm"
|
||||
#include "code\__DEFINES\mobs.dm"
|
||||
|
||||
Reference in New Issue
Block a user