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:
@@ -913,9 +913,9 @@ About the new airlock wires panel:
|
||||
if(operating == -1)
|
||||
new /obj/item/weapon/circuitboard/broken(src.loc)
|
||||
operating = 0
|
||||
else
|
||||
else
|
||||
if (!electronics) create_electronics()
|
||||
|
||||
|
||||
electronics.loc = src.loc
|
||||
electronics = null
|
||||
|
||||
@@ -1059,13 +1059,17 @@ About the new airlock wires panel:
|
||||
/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)
|
||||
assembly_type = assembly.type
|
||||
|
||||
|
||||
electronics = assembly.electronics
|
||||
electronics.loc = src
|
||||
|
||||
|
||||
//update the door's access to match the electronics'
|
||||
secured_wires = electronics.secure
|
||||
if(electronics.one_access)
|
||||
@@ -1073,7 +1077,7 @@ About the new airlock wires panel:
|
||||
req_one_access = src.electronics.conf_access
|
||||
else
|
||||
req_access = src.electronics.conf_access
|
||||
|
||||
|
||||
//get the name from the assembly
|
||||
if(assembly.created_name)
|
||||
name = assembly.created_name
|
||||
@@ -1093,8 +1097,8 @@ About the new airlock wires panel:
|
||||
src.closeOther = A
|
||||
break
|
||||
|
||||
// Most doors will never be deconstructed over the course of a round,
|
||||
// so as an optimization defer the creation of electronics until
|
||||
// Most doors will never be deconstructed over the course of a round,
|
||||
// so as an optimization defer the creation of electronics until
|
||||
// the airlock is deconstructed
|
||||
/obj/machinery/door/airlock/proc/create_electronics()
|
||||
//create new electronics
|
||||
@@ -1102,7 +1106,7 @@ About the new airlock wires panel:
|
||||
src.electronics = new/obj/item/weapon/airlock_electronics/secure( src.loc )
|
||||
else
|
||||
src.electronics = new/obj/item/weapon/airlock_electronics( src.loc )
|
||||
|
||||
|
||||
//update the electronics to match the door's access
|
||||
if(!src.req_access)
|
||||
src.check_access()
|
||||
|
||||
@@ -25,6 +25,8 @@
|
||||
var/air_properties_vary_with_direction = 0
|
||||
var/maxhealth = 300
|
||||
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/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))
|
||||
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)
|
||||
take_damage(Proj.damage)
|
||||
|
||||
|
||||
|
||||
/obj/machinery/door/hitby(AM as mob|obj)
|
||||
|
||||
..()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
var/id = 1.0
|
||||
dir = 1
|
||||
explosion_resistance = 25
|
||||
emitter_resistance = 50 // Lots of emitter blasts, it's blast door after all.
|
||||
|
||||
/obj/machinery/door/poddoor/New()
|
||||
. = ..()
|
||||
@@ -28,6 +29,7 @@
|
||||
icon_state = "pdoor0"
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/poddoor/attackby(obj/item/weapon/C as obj, mob/user as mob)
|
||||
src.add_fingerprint(user)
|
||||
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_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/global/damage_overlays[8]
|
||||
@@ -22,6 +23,21 @@
|
||||
|
||||
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()
|
||||
for(var/obj/effect/E in src) if(E.name == "Wallrot") del E
|
||||
..()
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
damage_cap = 200
|
||||
max_temperature = 6000
|
||||
armor = 0.1 // Only 10% damage from gunfire, it's made from strong alloys and stuff.
|
||||
|
||||
walltype = "rwall"
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
var/mineral/mineral
|
||||
var/mined_ore = 0
|
||||
var/last_act = 0
|
||||
var/emitter_blasts_taken = 0 // EMITTER MINING! Muhehe.
|
||||
|
||||
var/datum/geosample/geologic_data
|
||||
var/excavation_level = 0
|
||||
@@ -52,6 +53,16 @@
|
||||
mined_ore = 2 //some of the stuff gets blown up
|
||||
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)
|
||||
. = ..()
|
||||
if(istype(AM,/mob/living/carbon/human))
|
||||
|
||||
Reference in New Issue
Block a user