Pixel projectile ricochets and reflections! (#1220)
This commit is contained in:
committed by
kevinz000
parent
6c1159bf85
commit
e5f2a09622
@@ -104,6 +104,9 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/atom/proc/handle_ricochet(obj/item/projectile/P)
|
||||
return
|
||||
|
||||
/atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
return (!density || !height)
|
||||
|
||||
|
||||
@@ -24,9 +24,6 @@
|
||||
/turf/closed/indestructible/oldshuttle/corner
|
||||
icon_state = "corner"
|
||||
|
||||
|
||||
|
||||
|
||||
/turf/closed/indestructible/splashscreen
|
||||
name = "Space Station 13"
|
||||
icon = 'config/title_screens/images/blank.png'
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
desc = "A light-weight titanium wall used in shuttles."
|
||||
icon = 'icons/turf/walls/shuttle_wall.dmi'
|
||||
icon_state = "map-shuttle"
|
||||
flags = CAN_BE_DIRTY | CHECK_RICOCHET
|
||||
sheet_type = /obj/item/stack/sheet/mineral/titanium
|
||||
smooth = SMOOTH_MORE|SMOOTH_DIAGONAL
|
||||
canSmoothWith = list(/turf/closed/wall/mineral/titanium, /obj/machinery/door/airlock/shuttle, /obj/machinery/door/airlock/, /turf/closed/wall/shuttle, /obj/structure/window/shuttle, /obj/structure/shuttle/engine/heater, /obj/structure/falsewall/titanium)
|
||||
|
||||
@@ -28,6 +28,20 @@
|
||||
/turf/closed/wall/attack_tk()
|
||||
return
|
||||
|
||||
/turf/closed/wall/handle_ricochet(obj/item/projectile/P) //A huge pile of shitcode!
|
||||
var/turf/p_turf = get_turf(P)
|
||||
var/face_direction = get_dir(src, p_turf)
|
||||
var/face_angle = dir2angle(face_direction)
|
||||
var/incidence_s = get_angle_of_incidence(face_angle, P.Angle)
|
||||
var/new_angle = face_angle + incidence_s
|
||||
var/new_angle_s = new_angle
|
||||
while(new_angle_s > 180) // Translate to regular projectile degrees
|
||||
new_angle_s -= 360
|
||||
while(new_angle_s < -180)
|
||||
new_angle_s += 360
|
||||
P.Angle = new_angle_s
|
||||
return TRUE
|
||||
|
||||
/turf/closed/wall/proc/dismantle_wall(devastated=0, explode=0)
|
||||
if(devastated)
|
||||
devastate_wall()
|
||||
|
||||
Reference in New Issue
Block a user