mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-20 11:40:07 +01:00
## About The Pull Request Makes the dragon boat dropped from lavaland tendrils capable of being bottled back up by alt clicking after a 2 second delay. This should give it a semblance of a purpose and make it not a completely dead drop. They've also been reduced in size from normal to small, allowing them to be placed in pockets and boxes. Also, boats no longer refer to their oars as keys in examine tooltips. ## Why It's Good For The Game Ship in a bottle is possibly the worst drop from tendrils on-par with book of babel, as its effectively a one-time use crossing tool since you rarely need to cross lava in the exact same place you've left your boat. These two changes should make it at least a bit viable if you get nasty river generation and need to cross them frequently, and don't want to use a raptor or upgrade a MODsuit. ## Changelog 🆑 balance: Ship from a bottle can now be bottled back up by alt-clicking it balance: Ship in a bottle can now be deployed by throwing it, and are a small item instead of normal-sized spellcheck: Boats no longer refer to oars as keys /🆑
79 lines
2.3 KiB
Plaintext
79 lines
2.3 KiB
Plaintext
/obj/vehicle/ridden
|
|
name = "ridden vehicle"
|
|
can_buckle = TRUE
|
|
max_buckled_mobs = 1
|
|
buckle_lying = 0
|
|
pass_flags_self = PASSTABLE
|
|
COOLDOWN_DECLARE(message_cooldown)
|
|
interaction_flags_click = NEED_DEXTERITY
|
|
|
|
/obj/vehicle/ridden/examine(mob/user)
|
|
. = ..()
|
|
var/key_message = examine_key_message()
|
|
if (key_message)
|
|
. += key_message
|
|
|
|
/obj/vehicle/ridden/proc/examine_key_message()
|
|
if(!key_type)
|
|
return
|
|
if(!inserted_key)
|
|
return span_notice("Put a key inside it by clicking it with the [key_type::name].")
|
|
else
|
|
return span_notice("Alt-click [src] to remove \the [inserted_key].")
|
|
|
|
/obj/vehicle/ridden/generate_action_type(actiontype)
|
|
var/datum/action/vehicle/ridden/A = ..()
|
|
. = A
|
|
if(istype(A))
|
|
A.vehicle_ridden_target = src
|
|
|
|
/obj/vehicle/ridden/post_unbuckle_mob(mob/living/M)
|
|
remove_occupant(M)
|
|
return ..()
|
|
|
|
/obj/vehicle/ridden/post_buckle_mob(mob/living/M)
|
|
add_occupant(M)
|
|
return ..()
|
|
|
|
/obj/vehicle/ridden/item_interaction(mob/living/user, obj/item/tool, list/modifiers)
|
|
if(!key_type || is_key(inserted_key) || !is_key(tool))
|
|
return NONE
|
|
if(!user.transferItemToLoc(tool, src))
|
|
to_chat(user, span_warning("[tool] seems to be stuck to your hand!"))
|
|
return ITEM_INTERACT_BLOCKING
|
|
to_chat(user, span_notice("You insert \the [tool] into \the [src]."))
|
|
if(inserted_key) //just in case there's an invalid key
|
|
inserted_key.forceMove(drop_location())
|
|
inserted_key = tool
|
|
return ITEM_INTERACT_SUCCESS
|
|
|
|
/obj/vehicle/ridden/click_alt(mob/user)
|
|
if(!inserted_key)
|
|
return CLICK_ACTION_BLOCKING
|
|
if(!is_occupant(user))
|
|
to_chat(user, span_warning("You must be riding the [src] to remove [src]'s [inserted_key]!"))
|
|
return CLICK_ACTION_BLOCKING
|
|
to_chat(user, span_notice("You remove \the [inserted_key] from \the [src]."))
|
|
user.put_in_hands(inserted_key)
|
|
inserted_key = null
|
|
return CLICK_ACTION_SUCCESS
|
|
|
|
/obj/vehicle/ridden/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
|
|
if(!in_range(user, src) || !in_range(M, src))
|
|
return FALSE
|
|
return ..(M, user, FALSE)
|
|
|
|
/obj/vehicle/ridden/buckle_mob(mob/living/M, force = FALSE, check_loc = TRUE)
|
|
if(!force && occupant_amount() >= max_occupants)
|
|
return FALSE
|
|
|
|
var/response = SEND_SIGNAL(M, COMSIG_VEHICLE_RIDDEN, src)
|
|
if(response & EJECT_FROM_VEHICLE)
|
|
return FALSE
|
|
|
|
return ..()
|
|
|
|
/obj/vehicle/ridden/zap_act(power, zap_flags)
|
|
zap_buckle_check(power)
|
|
return ..()
|