mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
modsuit works with speed potions + ai movement fix + file sortage (#63670)
modsuit examining now tells you about wire panels fixes being able to remove stuff with the dna lock fixes 63650 fixes 63633 sorts module files
This commit is contained in:
@@ -29,10 +29,10 @@
|
||||
|
||||
RegisterSignal(target, COMSIG_MOVABLE_PREBUCKLE, .proc/check_mounting)
|
||||
if(isvehicle(target))
|
||||
RegisterSignal(target, COMSIG_PARENT_ATTACKBY, .proc/check_potion)
|
||||
RegisterSignal(target, COMSIG_SPEED_POTION_APPLIED, .proc/check_potion)
|
||||
|
||||
/datum/element/ridable/Detach(datum/target)
|
||||
UnregisterSignal(target, list(COMSIG_MOVABLE_PREBUCKLE, COMSIG_PARENT_ATTACKBY))
|
||||
UnregisterSignal(target, list(COMSIG_MOVABLE_PREBUCKLE, COMSIG_SPEED_POTION_APPLIED))
|
||||
return ..()
|
||||
|
||||
/// Someone is buckling to this movable, which is literally the only thing we care about (other than speed potions)
|
||||
@@ -108,33 +108,28 @@
|
||||
return FALSE
|
||||
|
||||
/// Checks to see if we've been hit with a red xenobio potion to make us faster. This is only registered if we're a vehicle
|
||||
/datum/element/ridable/proc/check_potion(atom/movable/ridable_atom, obj/item/slimepotion/speed/speed_potion, mob/living/user, params)
|
||||
/datum/element/ridable/proc/check_potion(atom/movable/ridable_atom, obj/item/slimepotion/speed/speed_potion, mob/living/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!istype(speed_potion))
|
||||
return
|
||||
if(potion_boosted)
|
||||
to_chat(user, span_warning("[ridable_atom] has already been coated with red, that's as fast as it'll go!"))
|
||||
return
|
||||
if(ridable_atom.has_buckled_mobs()) // effect won't take place til the next time someone mounts it, so just prevent that situation
|
||||
to_chat(user, span_warning("It's too dangerous to smear [speed_potion] on [ridable_atom] while it's being ridden!"))
|
||||
return
|
||||
|
||||
var/speed_limit = round(CONFIG_GET(number/movedelay/run_delay) * 0.85, 0.01)
|
||||
var/datum/component/riding/theoretical_riding_component = riding_component_type
|
||||
var/theoretical_speed = initial(theoretical_riding_component.vehicle_move_delay)
|
||||
|
||||
if(theoretical_speed <= speed_limit) // i say speed but this is actually move delay, so you have to be ABOVE the speed limit to pass
|
||||
to_chat(user, span_warning("[ridable_atom] can't be made any faster!"))
|
||||
return
|
||||
|
||||
Detach(ridable_atom)
|
||||
ridable_atom.AddElement(/datum/element/ridable, component_type = riding_component_type, potion_boost = TRUE)
|
||||
to_chat(user, span_notice("You slather the red gunk over [ridable_atom], making it faster."))
|
||||
ridable_atom.remove_atom_colour(WASHABLE_COLOUR_PRIORITY)
|
||||
ridable_atom.add_atom_colour("#FF0000", FIXED_COLOUR_PRIORITY)
|
||||
qdel(speed_potion)
|
||||
return COMPONENT_NO_AFTERATTACK
|
||||
return SPEED_POTION_SUCCESSFUL
|
||||
|
||||
/// Remove all of the relevant [riding offhand items][/obj/item/riding_offhand] from the target
|
||||
/datum/element/ridable/proc/unequip_buckle_inhands(mob/living/carbon/user, atom/movable/target_movable)
|
||||
|
||||
Reference in New Issue
Block a user