mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 14:00:18 +01:00
Vendor Throwing (#11244)
This commit is contained in:
@@ -51,12 +51,18 @@
|
||||
if(!isturf(user.loc))
|
||||
to_chat(user, "You cannot turn the light on while in this [user.loc].") //To prevent some lighting anomalities.)
|
||||
return 0
|
||||
toggle()
|
||||
user.update_action_buttons()
|
||||
return 1
|
||||
|
||||
/obj/item/device/flashlight/proc/toggle()
|
||||
on = !on
|
||||
if(on && activation_sound)
|
||||
playsound(src.loc, activation_sound, 75, 1)
|
||||
update_icon()
|
||||
user.update_action_buttons()
|
||||
return 1
|
||||
|
||||
/obj/item/device/flashlight/vendor_action(var/obj/machinery/vending/V)
|
||||
toggle()
|
||||
|
||||
/obj/item/device/flashlight/examine(mob/user, distance)
|
||||
. = ..()
|
||||
|
||||
@@ -783,9 +783,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
base_state = icon_state
|
||||
if(user.r_hand == src || user.l_hand == src)
|
||||
if(!lit)
|
||||
lit = TRUE
|
||||
update_icon()
|
||||
playsound(src.loc, pick(activation_sound), 75, 1)
|
||||
handle_lighting()
|
||||
if(istype(src, /obj/item/flame/lighter/zippo))
|
||||
if(last_open <= world.time - 20) //Spam limiter.
|
||||
last_open = world.time
|
||||
@@ -806,8 +804,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(last_open <= world.time - 20) //Spam limiter.
|
||||
last_open = world.time
|
||||
user.visible_message(SPAN_DANGER("After a few attempts, <b>[user]</b> manages to light \the [src], they however burn their finger in the process."), range = 3)
|
||||
set_light(flame_light_power, flame_light_range, l_color = flame_light_color)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
else
|
||||
lit = FALSE
|
||||
update_icon()
|
||||
@@ -825,6 +821,15 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
return ..()
|
||||
return
|
||||
|
||||
/obj/item/flame/lighter/proc/handle_lighting()
|
||||
lit = TRUE
|
||||
update_icon()
|
||||
playsound(src.loc, pick(activation_sound), 75, 1)
|
||||
set_light(flame_light_power, flame_light_range, l_color = flame_light_color)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
/obj/item/flame/lighter/vendor_action(var/obj/machinery/vending/V)
|
||||
handle_lighting()
|
||||
|
||||
/obj/item/flame/lighter/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
|
||||
if(!istype(M, /mob))
|
||||
|
||||
@@ -59,21 +59,21 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/grenade/proc/activate(mob/user as mob)
|
||||
/obj/item/grenade/proc/activate(var/atom/user)
|
||||
if(active)
|
||||
return
|
||||
|
||||
if(user)
|
||||
msg_admin_attack("[user.name] ([user.ckey]) primed \a [fake ? ("fake ") : ("")][src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)",ckey=key_name(user))
|
||||
if(ismob(user))
|
||||
var/mob/M = user
|
||||
msg_admin_attack("[M.name] ([M.ckey]) primed \a [fake ? ("fake ") : ("")][src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[M.x];Y=[M.y];Z=[M.z]'>JMP</a>)",ckey=key_name(M))
|
||||
else
|
||||
message_admins("[user.name] primed \a [fake ? ("fake ") : ("")][src] (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[user.x];Y=[user.y];Z=[user.z]'>JMP</a>)")
|
||||
|
||||
icon_state = initial(icon_state) + "_active"
|
||||
active = 1
|
||||
playsound(loc, activation_sound, 75, 1, -3)
|
||||
|
||||
spawn(det_time)
|
||||
prime()
|
||||
return
|
||||
|
||||
addtimer(CALLBACK(src, .proc/prime), det_time)
|
||||
|
||||
/obj/item/grenade/proc/prime()
|
||||
var/turf/T = get_turf(src)
|
||||
@@ -84,3 +84,6 @@
|
||||
walk(src, null, null)
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/grenade/vendor_action(var/obj/machinery/vending/V)
|
||||
activate(V)
|
||||
Reference in New Issue
Block a user