mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 11:37:40 +01:00
-tg- SpaceMove update
This commit updates the spacemove system to -tg-'s; All objects now drift in space, not just mobs. A few hardcoded space checks have been replaced with has_gravity(); So it applies to zero-G as well as space. Spacepods no longer drift, because their snowflakey shitcode just doesn't work. So they just move.
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
var/can_flashlight = 0
|
||||
var/heavy_weapon = 0
|
||||
var/randomspread = 0
|
||||
|
||||
|
||||
var/burst_size = 1
|
||||
|
||||
proc/ready_to_fire()
|
||||
@@ -186,6 +186,7 @@
|
||||
user.drop_item()
|
||||
break
|
||||
|
||||
user.newtonian_move(get_dir(target, user))
|
||||
update_icon()
|
||||
if(user.hand)
|
||||
user.update_inv_l_hand()
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
return L.apply_effects(stun, weaken, paralyze, irradiate, slur, stutter, eyeblur, drowsy, agony, blocked, stamina, jitter)
|
||||
|
||||
proc/OnFired() //if assigned, allows for code when the projectile gets fired
|
||||
return 1
|
||||
|
||||
return 1
|
||||
|
||||
proc/check_fire(var/mob/living/target as mob, var/mob/living/user as mob) //Checks if you can hit them or not.
|
||||
if(!istype(target) || !istype(user))
|
||||
return 0
|
||||
@@ -137,7 +137,7 @@
|
||||
var/mob/living/carbon/human/H = A
|
||||
var/obj/item/organ/external/organ = H.get_organ(check_zone(def_zone))
|
||||
if(isnull(organ))
|
||||
return
|
||||
return
|
||||
if(silenced)
|
||||
playsound(loc, hitsound, 5, 1, -1)
|
||||
M << "\red You've been shot in the [parse_zone(def_zone)] by the [src.name]!"
|
||||
@@ -189,6 +189,11 @@
|
||||
return 1
|
||||
|
||||
|
||||
Process_Spacemove(var/movement_dir = 0)
|
||||
return 1 //Bullets don't drift in space
|
||||
|
||||
|
||||
|
||||
process(var/setAngle)
|
||||
if(setAngle) Angle = setAngle
|
||||
if(!legacy)
|
||||
@@ -332,7 +337,7 @@
|
||||
M = locate() in get_step(src,target)
|
||||
if(istype(M))
|
||||
return 1
|
||||
|
||||
|
||||
/proc/check_trajectory(atom/target as mob|obj, atom/firer as mob|obj, var/pass_flags=PASSTABLE|PASSGLASS|PASSGRILLE, flags=null) //Checks if you can hit them or not.
|
||||
if(!istype(target) || !istype(firer))
|
||||
return 0
|
||||
@@ -343,4 +348,4 @@
|
||||
trace.pass_flags = pass_flags //And the pass flags to that of the real projectile...
|
||||
var/output = trace.process() //Test it!
|
||||
qdel(trace) //No need for it anymore
|
||||
return output //Send it back to the gun!
|
||||
return output //Send it back to the gun!
|
||||
|
||||
Reference in New Issue
Block a user