mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-12 15:47:04 +01:00
5926589c16
* removes var/ inside all procs * . * ugh
24 lines
655 B
Plaintext
24 lines
655 B
Plaintext
//Removing the lock and the buttons.
|
|
/obj/item/gun/dropped(mob/living/user)
|
|
if(istype(user))
|
|
user.stop_aiming(src)
|
|
return ..()
|
|
|
|
/obj/item/gun/equipped(mob/living/user, slot)
|
|
if(istype(user) && (slot != slot_l_hand && slot != slot_r_hand))
|
|
user.stop_aiming(src)
|
|
return ..()
|
|
|
|
//Compute how to fire.....
|
|
//Return 1 if a target was found, 0 otherwise.
|
|
/obj/item/gun/proc/PreFire(atom/A, mob/living/user, params)
|
|
if(!user.aiming)
|
|
user.aiming = new(user)
|
|
user.face_atom(A)
|
|
if(ismob(A) && user.aiming)
|
|
user.aiming.aim_at(A, src)
|
|
if(!isliving(A) || A.is_incorporeal()) // Phase out can't be targetted when phased
|
|
return 0
|
|
return 1
|
|
return 0
|