[DNM][DNM][WIP] Projectile backend code port and update

Ports#54924,  #65061, #59804 from /tg.
adds auxiliary code from /tg to make code work.
This commit is contained in:
Solaris-Shade
2022-03-06 15:20:23 -05:00
parent 8b77ee159f
commit 2fdb70b2b9
84 changed files with 597 additions and 503 deletions
+1 -5
View File
@@ -6,6 +6,7 @@
blocks_air = 1
rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
rad_insulation = RAD_MEDIUM_INSULATION
pass_flags_self = PASSCLOSEDTURF
wave_explosion_block = 10
wave_explosion_multiply = 0.75
/// How much we block yelling
@@ -23,11 +24,6 @@
/turf/closed/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
return FALSE
/turf/closed/CanPass(atom/movable/mover, turf/target)
if(istype(mover) && (mover.pass_flags & PASSCLOSEDTURF))
return TRUE
return ..()
/turf/closed/indestructible
name = "wall"
icon = 'icons/turf/walls.dmi'
-3
View File
@@ -77,9 +77,6 @@
else
to_chat(user, "<span class='warning'>The plating is going to need some support! Place metal rods first.</span>")
/turf/open/chasm/CanPass(atom/movable/mover, turf/target)
return 1
// Chasms for Lavaland, with planetary atmos and lava glow
/turf/open/chasm/lavaland
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
+4 -19
View File
@@ -225,16 +225,6 @@ GLOBAL_LIST_EMPTY(station_turfs)
return FALSE
/turf/CanPass(atom/movable/mover, turf/target)
if(!target)
return FALSE
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
return !density
stack_trace("Non movable passed to turf CanPass : [mover]")
return FALSE
//There's a lot of QDELETED() calls here if someone can figure out how to optimize this but not runtime when something gets deleted by a Bump/CanPass/Cross call, lemme know or go ahead and fix this mess - kevinz000
/turf/Enter(atom/movable/mover, atom/oldloc)
// Do not call ..()
@@ -243,7 +233,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
// Here's hoping it doesn't stay like this for years before we finish conversion to step_
var/atom/firstbump
var/canPassSelf = CanPass(mover, src)
if(canPassSelf || (mover.movement_type & UNSTOPPABLE))
if(canPassSelf || (mover.movement_type & PHASING))
for(var/i in contents)
if(QDELETED(mover))
return FALSE //We were deleted, do not attempt to proceed with movement.
@@ -253,7 +243,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
if(!thing.Cross(mover))
if(QDELETED(mover)) //Mover deleted from Cross/CanPass, do not proceed.
return FALSE
if((mover.movement_type & UNSTOPPABLE))
if((mover.movement_type & PHASING))
mover.Bump(thing)
continue
else
@@ -265,7 +255,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
firstbump = src
if(firstbump)
mover.Bump(firstbump)
return (mover.movement_type & UNSTOPPABLE)
return (mover.movement_type & PHASING)
return TRUE
/turf/Exit(atom/movable/mover, atom/newloc)
@@ -279,7 +269,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
if(!thing.Uncross(mover, newloc))
if(thing.flags_1 & ON_BORDER_1)
mover.Bump(thing)
if(!(mover.movement_type & UNSTOPPABLE))
if(!(mover.movement_type & PHASING))
return FALSE
if(QDELETED(mover))
return FALSE //We were deleted.
@@ -621,11 +611,6 @@ GLOBAL_LIST_EMPTY(station_turfs)
/turf/proc/Melt()
return ScrapeAway(flags = CHANGETURF_INHERIT_AIR)
/turf/bullet_act(obj/item/projectile/P)
. = ..()
if(. != BULLET_ACT_FORCE_PIERCE)
. = BULLET_ACT_TURF
/turf/proc/get_yelling_resistance(power)
. = 0
// don't bother checking fulltile, we don't need accuracy