mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
penetration
This commit is contained in:
@@ -20,6 +20,7 @@ var/global/list/ghdel_profiling = list()
|
||||
var/throwpass = 0
|
||||
var/germ_level = 0 // The higher the germ level, the more germ on the atom.
|
||||
var/pressure_resistance = ONE_ATMOSPHERE
|
||||
var/penetration_dampening = 5 //drains some of a projectile's penetration power whenever it goes through the atom
|
||||
|
||||
///Chemistry.
|
||||
var/datum/reagents/reagents = null
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
density = 0
|
||||
opacity = 0
|
||||
anchored = 1
|
||||
penetration_dampening = 17
|
||||
var/health = 20
|
||||
var/health_timestamp = 0
|
||||
var/brute_resist = 4
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
var/busy = 0
|
||||
soundeffect = 'sound/machines/airlock.ogg'
|
||||
var/pitch = 30
|
||||
penetration_dampening = 10
|
||||
|
||||
explosion_block = 1
|
||||
|
||||
@@ -104,6 +105,7 @@
|
||||
icon = 'icons/obj/doors/Doorglass.dmi'
|
||||
opacity = 0
|
||||
glass = 1
|
||||
penetration_dampening = 3
|
||||
//pitch = 100
|
||||
|
||||
/obj/machinery/door/airlock/centcom
|
||||
@@ -119,6 +121,7 @@
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_vault
|
||||
|
||||
explosion_block = 3//that's some high quality plasteel door
|
||||
penetration_dampening = 20
|
||||
|
||||
/obj/machinery/door/airlock/freezer
|
||||
name = "Freezer Airlock"
|
||||
@@ -144,6 +147,7 @@
|
||||
opacity = 0
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_com
|
||||
glass = 1
|
||||
penetration_dampening = 3
|
||||
|
||||
/obj/machinery/door/airlock/glass_engineering
|
||||
name = "Maintenance Hatch"
|
||||
@@ -151,6 +155,7 @@
|
||||
opacity = 0
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_eng
|
||||
glass = 1
|
||||
penetration_dampening = 3
|
||||
|
||||
/obj/machinery/door/airlock/glass_security
|
||||
name = "Maintenance Hatch"
|
||||
@@ -158,6 +163,7 @@
|
||||
opacity = 0
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_sec
|
||||
glass = 1
|
||||
penetration_dampening = 3
|
||||
|
||||
/obj/machinery/door/airlock/glass_medical
|
||||
name = "Maintenance Hatch"
|
||||
@@ -188,6 +194,7 @@
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_research
|
||||
glass = 1
|
||||
heat_proof = 1
|
||||
penetration_dampening = 3
|
||||
|
||||
/obj/machinery/door/airlock/glass_mining
|
||||
name = "Maintenance Hatch"
|
||||
@@ -195,6 +202,7 @@
|
||||
opacity = 0
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_min
|
||||
glass = 1
|
||||
penetration_dampening = 3
|
||||
|
||||
/obj/machinery/door/airlock/glass_atmos
|
||||
name = "Maintenance Hatch"
|
||||
@@ -202,6 +210,7 @@
|
||||
opacity = 0
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_atmo
|
||||
glass = 1
|
||||
penetration_dampening = 3
|
||||
|
||||
/obj/machinery/door/airlock/gold
|
||||
name = "Gold Airlock"
|
||||
@@ -217,6 +226,7 @@
|
||||
name = "Diamond Airlock"
|
||||
icon = 'icons/obj/doors/Doordiamond.dmi'
|
||||
mineral = "diamond"
|
||||
penetration_dampening = 15
|
||||
|
||||
/obj/machinery/door/airlock/uranium
|
||||
name = "Uranium Airlock"
|
||||
@@ -295,6 +305,7 @@
|
||||
opacity = 0
|
||||
assembly_type = /obj/structure/door_assembly/door_assembly_science
|
||||
glass = 1
|
||||
penetration_dampening = 3
|
||||
|
||||
/obj/machinery/door/airlock/highsecurity
|
||||
name = "High Tech Security Airlock"
|
||||
|
||||
@@ -17,6 +17,7 @@ var/list/all_doors = list()
|
||||
opacity = 1
|
||||
density = 1
|
||||
layer = DOOR_LAYER
|
||||
penetration_dampening = 10
|
||||
var/base_layer = DOOR_LAYER
|
||||
|
||||
var/secondsElectrified = 0
|
||||
@@ -422,4 +423,5 @@ var/list/all_doors = list()
|
||||
|
||||
/obj/machinery/door/morgue
|
||||
icon = 'icons/obj/doors/morgue.dmi'
|
||||
animation_delay = 15
|
||||
animation_delay = 15
|
||||
penetration_dampening = 15
|
||||
|
||||
@@ -8,6 +8,7 @@ var/list/poddoors = list()
|
||||
explosion_resistance = 25//used by the old deprecated explosion_recursive.dm
|
||||
|
||||
explosion_block = 3
|
||||
penetration_dampening = 20
|
||||
|
||||
var/id_tag = 1.0
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
machine_flags = EMAGGABLE
|
||||
soundeffect = 'sound/machines/windowdoor.ogg'
|
||||
var/shard = /obj/item/weapon/shard
|
||||
penetration_dampening = 2
|
||||
|
||||
/obj/machinery/door/window/New()
|
||||
..()
|
||||
@@ -315,6 +316,7 @@
|
||||
secure = 1
|
||||
var/id_tag = null
|
||||
health = 200
|
||||
penetration_dampening = 4
|
||||
|
||||
/obj/machinery/door/window/brigdoor/make_assembly(mob/user as mob)
|
||||
var/obj/structure/windoor_assembly/WA = ..(user)
|
||||
@@ -328,6 +330,7 @@
|
||||
icon = 'icons/obj/doors/plasmawindoor.dmi'
|
||||
health = 300
|
||||
shard = /obj/item/weapon/shard/plasma
|
||||
penetration_dampening = 6
|
||||
|
||||
/obj/machinery/door/window/plasma/make_assembly(mob/user as mob)
|
||||
// Windoor assembly
|
||||
@@ -341,6 +344,7 @@
|
||||
base_state = "leftsecure"
|
||||
health = 400
|
||||
secure = 1
|
||||
penetration_dampening = 8
|
||||
|
||||
/obj/machinery/door/window/plasma/secure/make_assembly(mob/user as mob)
|
||||
var/obj/structure/windoor_assembly/plasma/WA = ..(user)
|
||||
|
||||
@@ -116,6 +116,8 @@ Class Procs:
|
||||
|
||||
w_type = NOT_RECYCLABLE
|
||||
|
||||
penetration_dampening = 5
|
||||
|
||||
var/stat = 0
|
||||
var/emagged = 0
|
||||
var/use_power = 1
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
obj/structure
|
||||
icon = 'icons/obj/structures.dmi'
|
||||
penetration_dampening = 5
|
||||
|
||||
obj/structure/blob_act()
|
||||
if(prob(50))
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
var/sheettype = /obj/item/stack/sheet/glass //Used for deconstruction
|
||||
var/sheetamount = 1 //Number of sheets needed to build this window (determines how much shit is spawned via Destroy())
|
||||
var/reinforced = 0 //Used for deconstruction steps
|
||||
penetration_dampening = 1
|
||||
|
||||
var/obj/Overlays/damage_overlay
|
||||
var/cracked_base = "crack"
|
||||
@@ -493,6 +494,7 @@
|
||||
health = 40
|
||||
d_state = WINDOWSECURE
|
||||
reinforced = 1
|
||||
penetration_dampening = 3
|
||||
|
||||
/obj/structure/window/plasma
|
||||
|
||||
@@ -502,6 +504,7 @@
|
||||
shardtype = /obj/item/weapon/shard/plasma
|
||||
sheettype = /obj/item/stack/sheet/glass/plasmaglass
|
||||
health = 120
|
||||
penetration_dampening = 5
|
||||
|
||||
fire_temp_threshold = 32000
|
||||
fire_volume_mod = 1000
|
||||
@@ -514,6 +517,7 @@
|
||||
shardtype = /obj/item/weapon/shard/plasma
|
||||
sheettype = /obj/item/stack/sheet/glass/plasmarglass
|
||||
health = 160
|
||||
penetration_dampening = 7
|
||||
|
||||
/obj/structure/window/reinforced/plasma/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
@@ -226,6 +226,21 @@
|
||||
/turf/simulated/shuttle/wall/shuttle_rotate(angle) //delete this when autosmooth is added
|
||||
src.transform = turn(src.transform, angle)
|
||||
|
||||
/turf/simulated/shuttle/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.delayNextAttack(8)
|
||||
if (!user.dexterity_check())
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/solder) && bullet_marks)
|
||||
var/obj/item/weapon/solder/S = W
|
||||
if(!S.remove_fuel(bullet_marks*2,user))
|
||||
return
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
user << "<span class='notice'>You remove the bullet marks with \the [W].</span>"
|
||||
bullet_marks = 0
|
||||
icon = initial(icon)
|
||||
..()
|
||||
|
||||
/turf/simulated/shuttle/wall/cultify()
|
||||
ChangeTurf(/turf/simulated/wall/cult)
|
||||
turf_animation('icons/effects/effects.dmi',"cultwall",0,0,MOB_LAYER-1)
|
||||
|
||||
@@ -143,6 +143,16 @@
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
|
||||
if(istype(W,/obj/item/weapon/solder) && bullet_marks)
|
||||
var/obj/item/weapon/solder/S = W
|
||||
if(!S.remove_fuel(bullet_marks*2,user))
|
||||
return
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
user << "<span class='notice'>You remove the bullet marks with \the [W].</span>"
|
||||
bullet_marks = 0
|
||||
icon = initial(icon)
|
||||
return
|
||||
|
||||
//Get the user's location
|
||||
if(!istype(user.loc, /turf))
|
||||
return //Can't do this stuff whilst inside objects and such
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
explosion_block = 2
|
||||
girder_type = /obj/structure/girder/reinforced
|
||||
|
||||
penetration_dampening = 20
|
||||
|
||||
var/d_state = WALLCOMPLETED
|
||||
|
||||
/turf/simulated/wall/r_wall/examine(mob/user)
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
// wizard sleep spell probably better way to do this
|
||||
var/sleeping = 0
|
||||
|
||||
// left by bullets that went all the way through
|
||||
var/bullet_marks = 0
|
||||
penetration_dampening = 10
|
||||
|
||||
/*
|
||||
* Technically obsoleted by base_turf
|
||||
//For building on the asteroid.
|
||||
@@ -55,6 +59,12 @@
|
||||
var/dynamic_lighting = 1
|
||||
|
||||
forceinvertredraw = 1
|
||||
|
||||
/turf/examine(mob/user)
|
||||
..()
|
||||
if(bullet_marks)
|
||||
user << "It has bullet markings on it."
|
||||
|
||||
/turf/proc/process()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/turf/proc/process() called tick#: [world.time]")
|
||||
universe.OnTurfTick(src)
|
||||
|
||||
@@ -15,6 +15,20 @@
|
||||
opacity = 0
|
||||
canSmoothWith = null
|
||||
|
||||
/turf/unsimulated/wall/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.delayNextAttack(8)
|
||||
if (!user.dexterity_check())
|
||||
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
|
||||
return
|
||||
if(istype(W,/obj/item/weapon/solder) && bullet_marks)
|
||||
var/obj/item/weapon/solder/S = W
|
||||
if(!S.remove_fuel(bullet_marks*2,user))
|
||||
return
|
||||
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
|
||||
user << "<span class='notice'>You remove the bullet marks with \the [W].</span>"
|
||||
bullet_marks = 0
|
||||
icon = initial(icon)
|
||||
|
||||
turf/unsimulated/wall/splashscreen
|
||||
name = "Space Station 13"
|
||||
icon = null
|
||||
|
||||
@@ -267,6 +267,8 @@
|
||||
|
||||
var/iscorpse = 0 //Keeps track of whether this was spawned from a landmark or not.
|
||||
|
||||
penetration_dampening = 7
|
||||
|
||||
var/list/languages[0]
|
||||
var/stat_fucked = 0
|
||||
var/event/on_uattack
|
||||
|
||||
@@ -63,7 +63,8 @@ var/list/impact_master = list()
|
||||
var/bounces = 0 //if set to -1, will always bounce off obstacles
|
||||
|
||||
var/phase_type = null//PHASEHTROUGH_WALLS, PHASEHTROUGH_WINDOWS, PHASEHTROUGH_OBJS, PHASEHTROUGH_MOBS
|
||||
var/phases = 0 //if set to -1, will always phase through obstacles
|
||||
var/penetration = 0 //if set to -1, will always phase through obstacles
|
||||
var/mark_type = "trace" //what marks will the bullet leave on a wall that it penetrates? from 'icons/effects/96x96.dmi'
|
||||
|
||||
var/step_delay = 0 //how long it goes between moving. You should probably leave this as 0 for a lot of things
|
||||
|
||||
@@ -275,28 +276,33 @@ var/list/impact_master = list()
|
||||
rebound(A)
|
||||
bounces--
|
||||
return 1
|
||||
else if(phases && (phase_type & reaction_type))
|
||||
else if(penetration && (phase_type & reaction_type))
|
||||
if((penetration > 0) && (penetration < A.penetration_dampening)) //if the obstacle is too resistant, we don't go through it.
|
||||
penetration = 0
|
||||
bullet_die()
|
||||
return 1
|
||||
A.visible_message("<span class='warning'>\The [src] goes right through \the [A]!</span>")
|
||||
src.forceMove(get_step(src.loc,dir))
|
||||
if(linear_movement)
|
||||
update_pixel()
|
||||
pixel_x = PixelX
|
||||
pixel_y = PixelY
|
||||
phases--
|
||||
if(isturf(A))//if the bullet goes through a wall, we leave a nice mark on it
|
||||
damage -= (damage/4)//and diminish the bullet's damage a bit
|
||||
penetration = max(0, penetration - A.penetration_dampening)
|
||||
if(isturf(A)) //if the bullet goes through a wall, we leave a nice mark on it
|
||||
damage -= (damage/4) //and diminish the bullet's damage a bit
|
||||
var/turf/T = A
|
||||
T.bullet_marks++
|
||||
var/icon/I = icon(T.icon, T.icon_state)
|
||||
var/icon/trace = icon('icons/effects/96x96.dmi',"trace")
|
||||
trace.Turn(target_angle+45)
|
||||
trace.Crop(33-pixel_x,33-pixel_y,64-pixel_x,64-pixel_y)
|
||||
I.Blend(trace,ICON_MULTIPLY ,1 ,1)
|
||||
var/icon/trace = icon('icons/effects/96x96.dmi',mark_type) //first we take the 96x96 icon with the overlay we want to blend on the wall
|
||||
trace.Turn(target_angle+45) //then we rotate it so it matches the bullet's angle
|
||||
trace.Crop(33-pixel_x,33-pixel_y,64-pixel_x,64-pixel_y) //lastly we crop a 32x32 square in the icon whose offset matches the projectile's pixel offset *-1
|
||||
I.Blend(trace,ICON_MULTIPLY ,1 ,1) //we can now blend our resulting icon on the wall
|
||||
T.icon = I
|
||||
return 1
|
||||
|
||||
bullet_die()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/projectile/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
if(air_group || (height==0)) return 1
|
||||
|
||||
|
||||
@@ -945,7 +945,7 @@
|
||||
bounce_type = PROJREACT_WALLS|PROJREACT_WINDOWS
|
||||
bounces = -1
|
||||
phase_type = PROJREACT_OBJS|PROJREACT_MOBS
|
||||
phases = -1
|
||||
penetration = -1
|
||||
|
||||
/obj/item/projectile/energy/osipr/Destroy()
|
||||
var/turf/T = loc
|
||||
@@ -956,6 +956,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/projectile/bullet/hecate
|
||||
name = "high penetration bullet"
|
||||
icon = 'icons/obj/projectiles_experimental.dmi'
|
||||
icon_state = "hecate"
|
||||
damage = 101//you're going to crit, lad
|
||||
@@ -963,8 +964,8 @@
|
||||
stun = 5
|
||||
weaken = 5
|
||||
stutter = 5
|
||||
phase_type = PROJREACT_WALLS|PROJREACT_WINDOWS|PROJREACT_OBJS|PROJREACT_MOBS
|
||||
phases = 2//goes through up to two obstacle. That also means it can potentially hit three mobs at once. dayumm
|
||||
phase_type = PROJREACT_WALLS|PROJREACT_WINDOWS|PROJREACT_OBJS|PROJREACT_MOBS|PROJREACT_MOBS|PROJREACT_BLOB
|
||||
penetration = 20//can hit 3 mobs at once, or go through a wall and hit 2 more mobs, or go through an rwall/blast door and hit 1 mob
|
||||
var/superspeed = 1
|
||||
|
||||
/obj/item/projectile/bullet/hecate/OnFired()
|
||||
|
||||
Reference in New Issue
Block a user