mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 08:08:49 +01:00
[MIRROR] [no gbp] Jump jets activate a linked jetpack in a more sensible way [MDB IGNORE] (#23685)
* [no gbp] Jump jets activate a linked jetpack in a more sensible way (#78296) ## About The Pull Request fikou pointed out that the code I wrote not only wasn't reliable on destroy but also was overengineered but only _after_ he merged it 😠 now we just ask the jetpack module if it is on rather than using a weird trait ## Changelog not player facing * [no gbp] Jump jets activate a linked jetpack in a more sensible way --------- Co-authored-by: Jacquerel <hnevard@gmail.com>
This commit is contained in:
@@ -639,8 +639,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_MOVE_PHASING "move_phasing"
|
||||
/// Disables the floating animation. See above.
|
||||
#define TRAIT_NO_FLOATING_ANIM "no-floating-animation"
|
||||
/// Trait applied while you're using a jetpack
|
||||
#define TRAIT_JETPACKING "using_a_jetpack"
|
||||
|
||||
/// Weather immunities, also protect mobs inside them.
|
||||
#define TRAIT_LAVA_IMMUNE "lava_immune" //Used by lava turfs and The Floor Is Lava.
|
||||
|
||||
@@ -84,8 +84,6 @@
|
||||
if(!check_on_move.Invoke(TRUE))
|
||||
return return_flag
|
||||
|
||||
ADD_TRAIT(user, TRAIT_JETPACKING, REF(src))
|
||||
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(move_react))
|
||||
RegisterSignal(user, COMSIG_MOVABLE_PRE_MOVE, PROC_REF(pre_move_react))
|
||||
RegisterSignal(user, COMSIG_MOVABLE_SPACEMOVE, PROC_REF(spacemove_react))
|
||||
@@ -97,8 +95,6 @@
|
||||
/datum/component/jetpack/proc/deactivate(datum/source, mob/user)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
REMOVE_TRAIT(user, TRAIT_JETPACKING, REF(src))
|
||||
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_MOVED)
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_PRE_MOVE)
|
||||
UnregisterSignal(user, COMSIG_MOVABLE_SPACEMOVE)
|
||||
|
||||
@@ -209,10 +209,9 @@
|
||||
launch_from.visible_message(span_warning("[mod.wearer] rockets into the air!"))
|
||||
new /obj/effect/temp_visual/jet_plume(launch_from)
|
||||
|
||||
if (!HAS_TRAIT(mod.wearer, TRAIT_JETPACKING))
|
||||
var/obj/item/mod/module/jetpack/linked_jetpack = locate() in mod.modules
|
||||
if (!isnull(linked_jetpack))
|
||||
linked_jetpack.on_activation()
|
||||
var/obj/item/mod/module/jetpack/linked_jetpack = locate() in mod.modules
|
||||
if (!isnull(linked_jetpack) && !linked_jetpack.active)
|
||||
linked_jetpack.on_activation()
|
||||
return TRUE
|
||||
|
||||
#undef FAILED_ACTIVATION_COOLDOWN
|
||||
|
||||
Reference in New Issue
Block a user