Port /tg/ move manager, drift and jetpack components. (#27698)

* Port /tg/ move manager, drift and jetpack components.

* don't add go through newtonian movement if not moved to a turf

* various cleans for blood drifts and mob speed

* fix slow meteors

* why on fuck's earth aren't speedbikes vehicles

* style lint

* also wtf

* okay i'm an idiot

* fix meaty ore speed and blood decal double stepping

* fix not unbuckling pulled object occupants

* don't bother dealing with immovable rods just yet

* exclude bubblegum and vetus from move manager for now

* fix issues related to null weightless blood icons

* reset blood icon state properly

* fuck it, we'll deal with mobs when basic mobs happen

* break infinite loop in decal splat
This commit is contained in:
warriorstar-orion
2025-01-22 17:49:58 -05:00
committed by GitHub
parent 3954981ff2
commit 157276d6cb
105 changed files with 2366 additions and 538 deletions
+3 -3
View File
@@ -106,7 +106,7 @@
if(!mod.active || mod.activating || !mod.get_charge())
to_chat(mod.wearer, "<span class='warning'>Module is unpowered!</span>")
return FALSE
if(SEND_SIGNAL(src, COMSIG_MODULE_TRIGGERED) & MOD_ABORT_USE)
if(SEND_SIGNAL(src, COMSIG_MODULE_TRIGGERED, mod.wearer) & MOD_ABORT_USE)
return FALSE
if(module_type == MODULE_ACTIVE)
if(mod.selected_module && !mod.selected_module.on_deactivation(display_message = FALSE))
@@ -157,7 +157,7 @@
else if(display_message)
to_chat(mod.wearer, "<span class='notice'>[src] deactivated.</span>")
//mod.wearer.update_clothing(mod.slot_flags)
SEND_SIGNAL(src, COMSIG_MODULE_DEACTIVATED)
SEND_SIGNAL(src, COMSIG_MODULE_DEACTIVATED, mod.wearer)
mod.update_mod_overlays()
return TRUE
@@ -169,7 +169,7 @@
if(!check_power(use_power_cost))
to_chat(mod.wearer, "<span class='warning'>Module costs too much power to use!</span>")
return FALSE
if(SEND_SIGNAL(src, COMSIG_MODULE_TRIGGERED) & MOD_ABORT_USE)
if(SEND_SIGNAL(src, COMSIG_MODULE_TRIGGERED, mod.wearer) & MOD_ABORT_USE)
return FALSE
COOLDOWN_START(src, cooldown_timer, cooldown_time)
//addtimer(CALLBACK(mod.wearer, TYPE_PROC_REF(/mob, update_clothing), mod.slot_flags), cooldown_time+1) //need to run it a bit after the cooldown starts to avoid conflicts
+31 -20
View File
@@ -128,40 +128,51 @@
overlay_state_inactive = "module_jetpack"
overlay_state_active = "module_jetpack_on"
/// Do we stop the wearer from gliding in space.
var/stabilizers = FALSE
var/stabilize = FALSE
var/thrust_callback
/obj/item/mod/module/jetpack/proc/set_stabilizers(new_stabilizers)
if(stabilizers == new_stabilizers)
return
stabilizers = new_stabilizers
/obj/item/mod/module/jetpack/Initialize(mapload)
. = ..()
thrust_callback = CALLBACK(src, PROC_REF(allow_thrust))
configure_jetpack(stabilize)
/obj/item/mod/module/jetpack/Destroy()
thrust_callback = null
return ..()
/**
* configures/re-configures the jetpack component
*
* Arguments
* stabilize - Should this jetpack be stabalized
*/
/obj/item/mod/module/jetpack/proc/configure_jetpack(stabilize)
src.stabilize = stabilize
AddComponent( \
/datum/component/jetpack, \
src.stabilize, \
COMSIG_MODULE_TRIGGERED, \
COMSIG_MODULE_DEACTIVATED, \
MOD_ABORT_USE, \
thrust_callback, \
/datum/effect_system/trail_follow/ion/grav_allowed \
)
/obj/item/mod/module/jetpack/get_configuration()
. = ..()
.["stabilizers"] = add_ui_configuration("Stabilizers", "bool", stabilizers)
.["stabilizers"] = add_ui_configuration("Stabilizers", "bool", stabilize)
/obj/item/mod/module/jetpack/configure_edit(key, value)
switch(key)
if("stabilizers")
set_stabilizers(value)
configure_jetpack(value)
/obj/item/mod/module/jetpack/proc/allow_thrust()
if(!active)
return
if(!drain_power(use_power_cost))
return FALSE
return TRUE
/obj/item/mod/module/jetpack/proc/get_user()
return mod.wearer
/obj/item/mod/module/jetpack/on_activation()
. = ..()
mod.jetpack_active = TRUE
/obj/item/mod/module/jetpack/on_deactivation(display_message, deleting)
. = ..()
mod.jetpack_active = FALSE
/obj/item/mod/module/jetpack/advanced
name = "MOD advanced ion jetpack module"
desc = "An improvement on the previous model of electric thrusters. This one achieves better efficency through \