mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
Merge pull request #5993 from GinjaNinja32/proximity2
More proximity fixes
This commit is contained in:
@@ -34,13 +34,15 @@
|
|||||||
user << "\blue The tank scoffs at your insolence. It only provides services to welders."
|
user << "\blue The tank scoffs at your insolence. It only provides services to welders."
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/weapon/weldpack/afterattack(obj/O as obj, mob/user as mob)
|
/obj/item/weapon/weldpack/afterattack(obj/O as obj, mob/user as mob, proximity)
|
||||||
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && src.reagents.total_volume < max_fuel)
|
if(!proximity) // this replaces and improves the get_dist(src,O) <= 1 checks used previously
|
||||||
|
return
|
||||||
|
if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume < max_fuel)
|
||||||
O.reagents.trans_to(src, max_fuel)
|
O.reagents.trans_to(src, max_fuel)
|
||||||
user << "\blue You crack the cap off the top of the pack and fill it back up again from the tank."
|
user << "\blue You crack the cap off the top of the pack and fill it back up again from the tank."
|
||||||
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
playsound(src.loc, 'sound/effects/refill.ogg', 50, 1, -6)
|
||||||
return
|
return
|
||||||
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && get_dist(src,O) <= 1 && src.reagents.total_volume == max_fuel)
|
else if (istype(O, /obj/structure/reagent_dispensers/fueltank) && src.reagents.total_volume == max_fuel)
|
||||||
user << "\blue The pack is already full!"
|
user << "\blue The pack is already full!"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@@ -114,7 +114,9 @@
|
|||||||
return
|
return
|
||||||
..()
|
..()
|
||||||
|
|
||||||
/obj/item/weapon/implanter/compressed/afterattack(atom/A, mob/user as mob)
|
/obj/item/weapon/implanter/compressed/afterattack(atom/A, mob/user as mob, proximity)
|
||||||
|
if(!proximity)
|
||||||
|
return
|
||||||
if(istype(A,/obj/item) && imp)
|
if(istype(A,/obj/item) && imp)
|
||||||
var/obj/item/weapon/implant/compressed/c = imp
|
var/obj/item/weapon/implant/compressed/c = imp
|
||||||
if (c.scanned)
|
if (c.scanned)
|
||||||
|
|||||||
@@ -65,7 +65,9 @@
|
|||||||
O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
|
O.show_message(text("\red [] waves [] over []'s head.", user, src, M), 1)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob)
|
/obj/item/weapon/nullrod/afterattack(atom/A, mob/user as mob, proximity)
|
||||||
|
if(!proximity)
|
||||||
|
return
|
||||||
if (istype(A, /turf/simulated/floor))
|
if (istype(A, /turf/simulated/floor))
|
||||||
user << "\blue You hit the floor with the [src]."
|
user << "\blue You hit the floor with the [src]."
|
||||||
call(/obj/effect/rune/proc/revealrunes)(src)
|
call(/obj/effect/rune/proc/revealrunes)(src)
|
||||||
|
|||||||
@@ -6,7 +6,9 @@
|
|||||||
name = "RoboTray"
|
name = "RoboTray"
|
||||||
desc = "An autoloading tray specialized for carrying refreshments."
|
desc = "An autoloading tray specialized for carrying refreshments."
|
||||||
|
|
||||||
/obj/item/weapon/tray/robotray/afterattack(atom/target, mob/user as mob)
|
/obj/item/weapon/tray/robotray/afterattack(atom/target, mob/user as mob, proximity)
|
||||||
|
if(!proximity)
|
||||||
|
return
|
||||||
if ( !target )
|
if ( !target )
|
||||||
return
|
return
|
||||||
// pick up items, mostly copied from base tray pickup proc
|
// pick up items, mostly copied from base tray pickup proc
|
||||||
|
|||||||
Reference in New Issue
Block a user