[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:
@@ -166,7 +166,7 @@
|
||||
/obj/item/projectile/beam/lasertag/mag //the projectile, compatible with regular laser tag armor
|
||||
icon_state = "magjectile-toy"
|
||||
name = "lasertag magbolt"
|
||||
movement_type = FLYING | UNSTOPPABLE //for penetration memes
|
||||
movement_type = FLYING | PHASING //for penetration memes
|
||||
range = 5 //so it isn't super annoying
|
||||
light_range = 2
|
||||
light_color = LIGHT_COLOR_YELLOW
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
damage = 10
|
||||
armour_penetration = 20
|
||||
stamina = 10
|
||||
movement_type = FLYING | UNSTOPPABLE
|
||||
movement_type = FLYING | PHASING
|
||||
range = 6
|
||||
fired_light_range = 1
|
||||
fired_light_color = LIGHT_COLOR_RED
|
||||
@@ -37,7 +37,7 @@
|
||||
icon_state = "magjectile-large"
|
||||
damage = 10
|
||||
armour_penetration = 20
|
||||
movement_type = FLYING | UNSTOPPABLE
|
||||
movement_type = FLYING | PHASING
|
||||
range = 20
|
||||
pixels_per_second = TILES_TO_PIXELS(12.5)
|
||||
fired_light_range = 4
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
icon_state = "gauss"
|
||||
name = "penetrator round"
|
||||
damage = 60
|
||||
movement_type = FLYING | UNSTOPPABLE
|
||||
projectile_piercing = PASSMOB
|
||||
projectile_phasing = (ALL & (~PASSMOB))
|
||||
dismemberment = 0 //It goes through you cleanly.
|
||||
knockdown = 0
|
||||
breakthings = FALSE
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
/obj/item/projectile/bullet/honker
|
||||
damage = 0
|
||||
knockdown = 60
|
||||
movement_type = FLYING | UNSTOPPABLE
|
||||
movement_type = FLYING
|
||||
projectile_piercing = ALL
|
||||
nodamage = TRUE
|
||||
candink = FALSE
|
||||
hitsound = 'sound/items/bikehorn.ogg'
|
||||
|
||||
@@ -344,18 +344,17 @@
|
||||
var/created = FALSE //prevents creation of more then one locker if it has multiple hits
|
||||
var/locker_suck = TRUE
|
||||
|
||||
/obj/item/projectile/magic/locker/prehit(atom/A)
|
||||
/obj/item/projectile/magic/locker/prehit_pierce(atom/A)
|
||||
. = ..()
|
||||
if(ismob(A) && locker_suck)
|
||||
var/mob/M = A
|
||||
if(M.anti_magic_check())
|
||||
if(M.anti_magic_check()) // no this doesn't check if ..() returned to phase through do I care no it's magic ain't gotta explain shit - Silly-Cons
|
||||
M.visible_message("<span class='warning'>[src] vanishes on contact with [A]!</span>")
|
||||
qdel(src)
|
||||
return
|
||||
return PROJECTILE_DELETE_WITHOUT_HITTING
|
||||
if(M.anchored)
|
||||
return ..()
|
||||
return
|
||||
M.forceMove(src)
|
||||
return FALSE
|
||||
return ..()
|
||||
return PROJECTILE_PIERCE_PHASE
|
||||
|
||||
/obj/item/projectile/magic/locker/on_hit(target)
|
||||
if(created)
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
knockdown = 20
|
||||
pixels_per_second = TILES_TO_PIXELS(5)
|
||||
range = 16
|
||||
movement_type = FLYING | UNSTOPPABLE
|
||||
var/datum/beam/arm
|
||||
var/handedness = 0
|
||||
|
||||
@@ -29,18 +28,14 @@
|
||||
arm = starting.Beam(src, icon_state = "curse[handedness]", time = INFINITY, maxdistance = INFINITY, beam_type=/obj/effect/ebeam/curse_arm)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/curse_hand/prehit(atom/target)
|
||||
if(target == original)
|
||||
movement_type &= ~(UNSTOPPABLE)
|
||||
else if(!isturf(target))
|
||||
return FALSE
|
||||
return ..()
|
||||
/obj/projectile/curse_hand/prehit_pierce(atom/target)
|
||||
return (target == original)? PROJECTILE_PIERCE_NONE : PROJECTILE_PIERCE_PHASE
|
||||
|
||||
/obj/item/projectile/curse_hand/Destroy()
|
||||
if(arm)
|
||||
arm.End()
|
||||
arm = null
|
||||
if((movement_type & UNSTOPPABLE))
|
||||
if((movement_type & PHASING))
|
||||
playsound(src, 'sound/effects/curse3.ogg', 25, 1, -1)
|
||||
var/turf/T = get_step(src, dir)
|
||||
var/obj/effect/temp_visual/dir_setting/curse/hand/leftover = new(T, dir)
|
||||
|
||||
Reference in New Issue
Block a user