mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
fixes message spam from ridden vehicles (#44116)
* fixes message spam from ridden vehicles * e
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
var/legs_required = 2
|
||||
var/arms_required = 1 //why not?
|
||||
var/fall_off_if_missing_arms = FALSE //heh...
|
||||
var/message_cooldown = 0
|
||||
|
||||
/obj/vehicle/ridden/Initialize()
|
||||
. = ..()
|
||||
@@ -64,7 +65,9 @@
|
||||
if(legs_required)
|
||||
var/how_many_legs = user.get_num_legs()
|
||||
if(how_many_legs < legs_required)
|
||||
to_chat(user, "<span class='warning'>You can't seem to manage that with[how_many_legs ? " your leg[how_many_legs > 1 ? "s" : null]" : "out legs"]...</span>")
|
||||
if(message_cooldown < world.time)
|
||||
to_chat(user, "<span class='warning'>You can't seem to manage that with[how_many_legs ? " your leg[how_many_legs > 1 ? "s" : null]" : "out legs"]...</span>")
|
||||
message_cooldown = world.time + 5 SECONDS
|
||||
return FALSE
|
||||
if(arms_required)
|
||||
var/how_many_arms = user.get_num_arms()
|
||||
@@ -78,7 +81,9 @@
|
||||
L.Stun(30)
|
||||
return FALSE
|
||||
|
||||
to_chat(user, "<span class='warning'>You can't seem to manage that with[how_many_arms ? " your arm[how_many_arms > 1 ? "s" : null]" : "out arms"]...</span>")
|
||||
if(message_cooldown < world.time)
|
||||
to_chat(user, "<span class='warning'>You can't seem to manage that with[how_many_arms ? " your arm[how_many_arms > 1 ? "s" : null]" : "out arms"]...</span>")
|
||||
message_cooldown = world.time + 5 SECONDS
|
||||
return FALSE
|
||||
var/datum/component/riding/R = GetComponent(/datum/component/riding)
|
||||
R.handle_ride(user, direction)
|
||||
|
||||
Reference in New Issue
Block a user