mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-23 16:51:53 +00:00
* Adds the check components * Adds in trailing newlines * Converts all CRLF to LF * Post merge EOF * Post merge line endings * Final commit
54 lines
1.7 KiB
Plaintext
54 lines
1.7 KiB
Plaintext
/obj/structure/blob/shield
|
|
name = "strong blob"
|
|
icon = 'icons/mob/blob.dmi'
|
|
icon_state = "blob_shield"
|
|
desc = "Some blob creature thingy"
|
|
max_integrity = 150
|
|
brute_resist = 0.25
|
|
explosion_block = 3
|
|
atmosblock = TRUE
|
|
armor = list("melee" = 0, "bullet" = 0, "laser" = 0, "energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 90, "acid" = 90)
|
|
|
|
/obj/structure/blob/shield/core
|
|
point_return = 0
|
|
|
|
/obj/structure/blob/shield/update_icon()
|
|
..()
|
|
if(obj_integrity < max_integrity * 0.5)
|
|
icon_state = "[initial(icon_state)]_damaged"
|
|
name = "weakened [initial(name)]"
|
|
desc = "A wall of twitching tendrils."
|
|
atmosblock = FALSE
|
|
else
|
|
icon_state = initial(icon_state)
|
|
name = initial(name)
|
|
desc = initial(desc)
|
|
atmosblock = TRUE
|
|
air_update_turf(1)
|
|
|
|
/obj/structure/blob/shield/CanPass(atom/movable/mover, turf/target, height=0)
|
|
if(istype(mover) && mover.checkpass(PASSBLOB)) return 1
|
|
return 0
|
|
|
|
/obj/structure/blob/shield/reflective
|
|
name = "reflective blob"
|
|
desc = "A solid wall of slightly twitching tendrils with a reflective glow."
|
|
icon_state = "blob_glow"
|
|
max_integrity = 100
|
|
brute_resist = 0.5
|
|
explosion_block = 2
|
|
point_return = 9
|
|
flags_2 = CHECK_RICOCHET_2
|
|
|
|
/obj/structure/blob/shield/reflective/handle_ricochet(obj/item/projectile/P)
|
|
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 + 180))
|
|
if(abs(incidence_s) > 90 && abs(incidence_s) < 270)
|
|
return FALSE
|
|
var/new_angle_s = SIMPLIFY_DEGREES(face_angle + incidence_s)
|
|
P.setAngle(new_angle_s)
|
|
visible_message("<span class='warning'>[P] reflects off [src]!</span>")
|
|
return TRUE
|