mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 19:22:56 +00:00
Merge pull request #7175 from atlantiscze/pewPEWPEWboom
[Ready To Merge] Emitter update or how I might learn to love the revert button.
This commit is contained in:
@@ -1059,6 +1059,10 @@ About the new airlock wires panel:
|
|||||||
/obj/machinery/door/airlock/New(var/newloc, var/obj/structure/door_assembly/assembly=null)
|
/obj/machinery/door/airlock/New(var/newloc, var/obj/structure/door_assembly/assembly=null)
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
//High-sec airlocks are much harder to completely break by emitters.
|
||||||
|
if(secured_wires)
|
||||||
|
emitter_resistance *= 3
|
||||||
|
|
||||||
//if assembly is given, create the new door from the assembly
|
//if assembly is given, create the new door from the assembly
|
||||||
if (assembly)
|
if (assembly)
|
||||||
assembly_type = assembly.type
|
assembly_type = assembly.type
|
||||||
|
|||||||
@@ -25,6 +25,8 @@
|
|||||||
var/air_properties_vary_with_direction = 0
|
var/air_properties_vary_with_direction = 0
|
||||||
var/maxhealth = 300
|
var/maxhealth = 300
|
||||||
var/health
|
var/health
|
||||||
|
var/emitter_hits = 0 // For use when tracking amount of emitter hits taken.
|
||||||
|
var/emitter_resistance = 10 // Amount of emitter hits doors whistand
|
||||||
var/min_force = 10 //minimum amount of force needed to damage the door with a melee weapon
|
var/min_force = 10 //minimum amount of force needed to damage the door with a melee weapon
|
||||||
var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon
|
var/hitsound = 'sound/weapons/smash.ogg' //sound door makes when hit with a weapon
|
||||||
|
|
||||||
@@ -133,9 +135,22 @@
|
|||||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
// Emitter Blasts - these will eventually completely destroy the door, given enough time.
|
||||||
|
if (istype(Proj, /obj/item/projectile/beam/emitter))
|
||||||
|
if(health > 0)
|
||||||
|
Proj.damage /= 4
|
||||||
|
else
|
||||||
|
emitter_hits ++
|
||||||
|
if(emitter_hits >= emitter_resistance)
|
||||||
|
visible_message("\red <B>[src.name] breaks apart!</B>", 1)
|
||||||
|
new /obj/effect/decal/cleanable/ash(src.loc) // Turn it to ashes!
|
||||||
|
del(src)
|
||||||
|
|
||||||
if(Proj.damage)
|
if(Proj.damage)
|
||||||
take_damage(Proj.damage)
|
take_damage(Proj.damage)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/door/hitby(AM as mob|obj)
|
/obj/machinery/door/hitby(AM as mob|obj)
|
||||||
|
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
var/id = 1.0
|
var/id = 1.0
|
||||||
dir = 1
|
dir = 1
|
||||||
explosion_resistance = 25
|
explosion_resistance = 25
|
||||||
|
emitter_resistance = 50 // Lots of emitter blasts, it's blast door after all.
|
||||||
|
|
||||||
/obj/machinery/door/poddoor/New()
|
/obj/machinery/door/poddoor/New()
|
||||||
. = ..()
|
. = ..()
|
||||||
@@ -28,6 +29,7 @@
|
|||||||
icon_state = "pdoor0"
|
icon_state = "pdoor0"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
/obj/machinery/door/poddoor/attackby(obj/item/weapon/C as obj, mob/user as mob)
|
/obj/machinery/door/poddoor/attackby(obj/item/weapon/C as obj, mob/user as mob)
|
||||||
src.add_fingerprint(user)
|
src.add_fingerprint(user)
|
||||||
if (!( istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/twohanded/fireaxe) && C:wielded == 1) ))
|
if (!( istype(C, /obj/item/weapon/crowbar) || (istype(C, /obj/item/weapon/twohanded/fireaxe) && C:wielded == 1) ))
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
var/damage = 0
|
var/damage = 0
|
||||||
var/damage_cap = 100 //Wall will break down to girders if damage reaches this point
|
var/damage_cap = 100 //Wall will break down to girders if damage reaches this point
|
||||||
|
var/armor = 0.5 // Damage is multiplied by this
|
||||||
|
|
||||||
var/damage_overlay
|
var/damage_overlay
|
||||||
var/global/damage_overlays[8]
|
var/global/damage_overlays[8]
|
||||||
@@ -22,6 +23,21 @@
|
|||||||
|
|
||||||
var/walltype = "metal"
|
var/walltype = "metal"
|
||||||
|
|
||||||
|
/turf/simulated/wall/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
|
||||||
|
// Tasers and stuff? No thanks.
|
||||||
|
if(Proj.damage_type == HALLOSS)
|
||||||
|
return
|
||||||
|
|
||||||
|
// Emitter blasts are somewhat weaker as emitters have large rate of fire and don't require limited power cell to run
|
||||||
|
if(istype(Proj, /obj/item/projectile/beam/emitter))
|
||||||
|
Proj.damage /= 4
|
||||||
|
|
||||||
|
take_damage(Proj.damage * armor)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/turf/simulated/wall/Del()
|
/turf/simulated/wall/Del()
|
||||||
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
|
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
|
||||||
..()
|
..()
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
|
|
||||||
damage_cap = 200
|
damage_cap = 200
|
||||||
max_temperature = 6000
|
max_temperature = 6000
|
||||||
|
armor = 0.1 // Only 10% damage from gunfire, it's made from strong alloys and stuff.
|
||||||
|
|
||||||
walltype = "rwall"
|
walltype = "rwall"
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
var/mineral/mineral
|
var/mineral/mineral
|
||||||
var/mined_ore = 0
|
var/mined_ore = 0
|
||||||
var/last_act = 0
|
var/last_act = 0
|
||||||
|
var/emitter_blasts_taken = 0 // EMITTER MINING! Muhehe.
|
||||||
|
|
||||||
var/datum/geosample/geologic_data
|
var/datum/geosample/geologic_data
|
||||||
var/excavation_level = 0
|
var/excavation_level = 0
|
||||||
@@ -52,6 +53,16 @@
|
|||||||
mined_ore = 2 //some of the stuff gets blown up
|
mined_ore = 2 //some of the stuff gets blown up
|
||||||
GetDrilled()
|
GetDrilled()
|
||||||
|
|
||||||
|
/turf/simulated/mineral/bullet_act(var/obj/item/projectile/Proj)
|
||||||
|
|
||||||
|
// Emitter blasts
|
||||||
|
if(istype(Proj, /obj/item/projectile/beam/emitter))
|
||||||
|
emitter_blasts_taken++
|
||||||
|
|
||||||
|
if(emitter_blasts_taken > 2) // 3 blasts per tile
|
||||||
|
mined_ore = 1
|
||||||
|
GetDrilled()
|
||||||
|
|
||||||
/turf/simulated/mineral/Bumped(AM)
|
/turf/simulated/mineral/Bumped(AM)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(istype(AM,/mob/living/carbon/human))
|
if(istype(AM,/mob/living/carbon/human))
|
||||||
|
|||||||
Reference in New Issue
Block a user