mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-26 06:40:08 +01:00
[MIRROR] Fixes some click bugs (#12673)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
co-authored by
Cameron Lennox
parent
a766b686d4
commit
897de881b3
@@ -57,7 +57,7 @@
|
||||
|
||||
/obj/vehicle/bike/click_ctrl(mob/user)
|
||||
if(Adjacent(user) && anchored)
|
||||
toggle()
|
||||
return toggle_proc(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -65,18 +65,23 @@
|
||||
set name = "Toggle Engine"
|
||||
set category = "Object.Vehicle" //ChompEDIT - TGPanel
|
||||
set src in view(0)
|
||||
toggle_proc(usr)
|
||||
|
||||
if(!isliving(usr) || HAS_TRAIT(usr, TRAIT_AMBIENT_PEST_MOB))
|
||||
return
|
||||
/obj/vehicle/bike/proc/toggle_proc(mob/user)
|
||||
if(!isliving(user) || HAS_TRAIT(user, TRAIT_AMBIENT_PEST_MOB))
|
||||
return CLICK_ACTION_BLOCKING
|
||||
|
||||
if(usr.incapacitated()) return
|
||||
if(user.incapacitated())
|
||||
return CLICK_ACTION_BLOCKING
|
||||
|
||||
if(!on && cell && cell.charge > charge_use)
|
||||
turn_on()
|
||||
src.visible_message("\The [src] rumbles to life.", "You hear something rumble deeply.")
|
||||
visible_message("\The [src] rumbles to life.", "You hear something rumble deeply.")
|
||||
return CLICK_ACTION_SUCCESS
|
||||
else
|
||||
turn_off()
|
||||
src.visible_message("\The [src] putters before turning off.", "You hear something putter slowly.")
|
||||
visible_message("\The [src] putters before turning off.", "You hear something putter slowly.")
|
||||
return CLICK_ACTION_SUCCESS
|
||||
|
||||
/obj/vehicle/bike/click_alt(var/mob/user)
|
||||
if(Adjacent(user))
|
||||
|
||||
Reference in New Issue
Block a user