mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-13 09:05:11 +01:00
[MIRROR] Adds UPSIDE_DOWN movetype for negative gravity / makes Atrocinator affected by less things [MDB IGNORE] (#25155)
* Adds `UPSIDE_DOWN` movetype for negative gravity / makes Atrocinator affected by less things (#79785) ## About The Pull Request Fixes #79764 I was going to tackle this issue by slamming `TRAIT_NO_SLIP_ALL` on Atrocinator users and calling it a day, but like, that didn't feel proper. So I thought hey, we could just give them the flying movetype, even though they technically aren't flying it means they're unaffected by things that flying would make you unaffected by. Nope, this means the mob technically "negates gravity", so no falling and no feetsteps. Let's try floating - this give us feetsteps but no falling upwards. So instead of going back to square one, with `TRAIT_NO_SLIP_ALL`, I decided to go for the more complex route of just adding a movetype. Hence, move type `UPSIDE_DOWN`. This covers situations where a mob would be "floating" above the ground, but still walking. ...Negative gravity. This means overall the Atrociator acts more as you'd expect - you don't slip on ice, you don't trigger bear traps or mouse traps, you can walk over railings, unaffected by conveyor belts, etc. ## Why It's Good For The Game Makes the Atrocinator a lot more consistent with how you'd expect for it to work. Admittedly it is a bit niche use of movetypes, but it can possibly be expanded to more things in the future, who knows? I applied it to mobs on meat spikes (even though they don't move), just for proof of concept. ## Changelog 🆑 Melbert fix: Atrocinating mobs will now behave more as you'd expect. Meaning they don't slip on wet patches, can't trigger bear traps / landmines / mouse traps, ignore conveyors, and can walk over tables and railings. fix: Floating mobs are unaffected by conveyor belts, acid (on the ground), glass tables fix: Floating mobs won't squish stuff like roaches anymore fix: Fixes bear traps triggering on floating / flying mobs /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com> * Adds `UPSIDE_DOWN` movetype for negative gravity / makes Atrocinator affected by less things --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Ghom <42542238+Ghommie@ users.noreply.github.com>
This commit is contained in:
@@ -163,6 +163,11 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
||||
#define FLOATING (1<<3)
|
||||
/// When moving, will Cross() everything, but won't stop or Bump() anything.
|
||||
#define PHASING (1<<4)
|
||||
/// The mob is walking on the ceiling. Or is generally just, upside down.
|
||||
#define UPSIDE_DOWN (1<<5)
|
||||
|
||||
/// Combination flag for movetypes which, for all intents and purposes, mean the mob is not touching the ground
|
||||
#define MOVETYPES_NOT_TOUCHING_GROUND (FLYING|FLOATING|UPSIDE_DOWN)
|
||||
|
||||
//Fire and Acid stuff, for resistance_flags
|
||||
#define LAVA_PROOF (1<<0)
|
||||
|
||||
@@ -531,6 +531,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
#define TRAIT_MOVE_VENTCRAWLING "move_ventcrawling"
|
||||
#define TRAIT_MOVE_FLOATING "move_floating"
|
||||
#define TRAIT_MOVE_PHASING "move_phasing"
|
||||
#define TRAIT_MOVE_UPSIDE_DOWN "move_upside_down"
|
||||
/// Disables the floating animation. See above.
|
||||
#define TRAIT_NO_FLOATING_ANIM "no-floating-animation"
|
||||
|
||||
@@ -843,7 +844,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
/// changelings with this trait can no longer talk over the hivemind
|
||||
#define TRAIT_CHANGELING_HIVEMIND_MUTE "ling_mute"
|
||||
#define TRAIT_HULK "hulk"
|
||||
|
||||
/// Isn't attacked harmfully by blob structures
|
||||
#define TRAIT_BLOB_ALLY "blob_ally"
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@
|
||||
#define SPECIES_FLIGHT_TRAIT "species-flight"
|
||||
#define FROSTMINER_ENRAGE_TRAIT "frostminer-enrage"
|
||||
#define NO_GRAVITY_TRAIT "no-gravity"
|
||||
#define NEGATIVE_GRAVITY_TRAIT "negative-gravity"
|
||||
|
||||
/// A trait gained from a mob's leap action, like the leaper
|
||||
#define LEAPING_TRAIT "leaping"
|
||||
|
||||
@@ -283,6 +283,7 @@ DEFINE_BITFIELD(movement_type, list(
|
||||
"GROUND" = GROUND,
|
||||
"PHASING" = PHASING,
|
||||
"VENTCRAWLING" = VENTCRAWLING,
|
||||
"UPSIDE_DOWN" = UPSIDE_DOWN,
|
||||
))
|
||||
|
||||
DEFINE_BITFIELD(obj_flags, list(
|
||||
|
||||
@@ -48,6 +48,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
|
||||
"TRAIT_MOVE_GROUND" = TRAIT_MOVE_GROUND,
|
||||
"TRAIT_MOVE_PHASING" = TRAIT_MOVE_PHASING,
|
||||
"TRAIT_MOVE_VENTCRAWLING" = TRAIT_MOVE_VENTCRAWLING,
|
||||
"TRAIT_MOVE_UPSIDE_DOWN" = TRAIT_MOVE_UPSIDE_DOWN,
|
||||
"TRAIT_NO_FLOATING_ANIM" = TRAIT_NO_FLOATING_ANIM,
|
||||
"TRAIT_NO_MANIFEST_CONTENTS_ERROR" = TRAIT_NO_MANIFEST_CONTENTS_ERROR,
|
||||
"TRAIT_NO_MISSING_ITEM_ERROR" = TRAIT_NO_MISSING_ITEM_ERROR,
|
||||
@@ -569,6 +570,7 @@ GLOBAL_LIST_INIT(movement_type_trait_to_flag, list(
|
||||
TRAIT_MOVE_VENTCRAWLING = VENTCRAWLING,
|
||||
TRAIT_MOVE_FLOATING = FLOATING,
|
||||
TRAIT_MOVE_PHASING = PHASING,
|
||||
TRAIT_MOVE_UPSIDE_DOWN = UPSIDE_DOWN,
|
||||
))
|
||||
|
||||
GLOBAL_LIST_INIT(movement_type_addtrait_signals, set_movement_type_addtrait_signals())
|
||||
|
||||
@@ -15,6 +15,7 @@ GLOBAL_LIST_INIT(admin_visible_traits, list(
|
||||
"TRAIT_MOVE_GROUND" = TRAIT_MOVE_GROUND,
|
||||
"TRAIT_MOVE_PHASING" = TRAIT_MOVE_PHASING,
|
||||
"TRAIT_MOVE_VENTCRAWLING" = TRAIT_MOVE_VENTCRAWLING,
|
||||
"TRAIT_MOVE_UPSIDE_DOWN" = TRAIT_MOVE_UPSIDE_DOWN,
|
||||
"TRAIT_RUNECHAT_HIDDEN" = TRAIT_RUNECHAT_HIDDEN,
|
||||
"TRAIT_SNOWSTORM_IMMUNE" = TRAIT_SNOWSTORM_IMMUNE,
|
||||
"TRAIT_VOIDSTORM_IMMUNE" = TRAIT_VOIDSTORM_IMMUNE,
|
||||
|
||||
@@ -254,7 +254,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
if(!isliving(arrived))
|
||||
return
|
||||
var/mob/living/crosser = arrived
|
||||
if(crosser.movement_type & FLYING)
|
||||
if(crosser.movement_type & MOVETYPES_NOT_TOUCHING_GROUND)
|
||||
return
|
||||
if(crosser.move_intent == MOVE_INTENT_WALK)
|
||||
return
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
if((flags & CALTROP_IGNORE_WALKERS) && H.move_intent == MOVE_INTENT_WALK)
|
||||
return
|
||||
|
||||
if(H.movement_type & (FLOATING|FLYING)) //check if they are able to pass over us
|
||||
if(H.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) //check if they are able to pass over us
|
||||
//gravity checking only our parent would prevent us from triggering they're using magboots / other gravity assisting items that would cause them to still touch us.
|
||||
return
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
return CHASM_NOT_DROPPING
|
||||
if(is_type_in_typecache(dropped_thing, forbidden_types) || (!isliving(dropped_thing) && !isobj(dropped_thing)))
|
||||
return CHASM_NOT_DROPPING
|
||||
if(dropped_thing.throwing || (dropped_thing.movement_type & (FLOATING|FLYING)))
|
||||
if(dropped_thing.throwing || (dropped_thing.movement_type & MOVETYPES_NOT_TOUCHING_GROUND))
|
||||
return CHASM_REGISTER_SIGNALS
|
||||
|
||||
//Flies right over the chasm
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
source.delay = speed //We use the default delay
|
||||
if(living_parent)
|
||||
var/mob/living/moving_mob = parent
|
||||
if((moving_mob.movement_type & FLYING) && !moving_mob.stat)
|
||||
if((moving_mob.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) && !moving_mob.stat)
|
||||
return MOVELOOP_SKIP_STEP
|
||||
var/atom/movable/moving_parent = parent
|
||||
if(moving_parent.anchored || !moving_parent.has_gravity())
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
if(HAS_TRAIT(turf, TRAIT_TURF_IGNORE_SLIPPERY))
|
||||
return
|
||||
var/mob/living/victim = arrived
|
||||
if((victim.movement_type & (FLYING | FLOATING)))
|
||||
if(victim.movement_type & MOVETYPES_NOT_TOUCHING_GROUND)
|
||||
return
|
||||
if(can_slip_callback && !can_slip_callback.Invoke(holder, victim))
|
||||
return
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
return //Everything worked, we're done!
|
||||
if(isliving(crossing_movable))
|
||||
var/mob/living/crossing_mob = crossing_movable
|
||||
if(crossing_mob.mob_size > MOB_SIZE_SMALL && !(crossing_mob.movement_type & FLYING))
|
||||
if(crossing_mob.mob_size > MOB_SIZE_SMALL && !(crossing_mob.movement_type & MOVETYPES_NOT_TOUCHING_GROUND))
|
||||
if(HAS_TRAIT(crossing_mob, TRAIT_PACIFISM))
|
||||
crossing_mob.visible_message(span_notice("[crossing_mob] carefully steps over [parent_as_living]."), span_notice("You carefully step over [parent_as_living] to avoid hurting it."))
|
||||
return
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
var/obj/item/I = arrived
|
||||
if(I.item_flags & ABSTRACT)
|
||||
return
|
||||
if(arrived.movement_type & (FLYING|FLOATING) || !arrived.has_gravity())
|
||||
if((arrived.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) || !arrived.has_gravity())
|
||||
return
|
||||
if(ismob(arrived) && !arrived.density) // Prevents 10 overlapping mice from making an unholy sound while moving
|
||||
return
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
*/
|
||||
/datum/element/immerse/proc/try_immerse(atom/movable/movable, atom/movable/buckled)
|
||||
var/atom/movable/to_check = buckled || movable
|
||||
if(!(to_check.movement_type & (FLYING|FLOATING)) && !movable.throwing)
|
||||
if(!(to_check.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) && !movable.throwing)
|
||||
add_immerse_overlay(movable)
|
||||
if(!buckled)
|
||||
RegisterSignal(movable, COMSIG_MOVETYPE_FLAG_ENABLED, PROC_REF(on_move_flag_enabled))
|
||||
@@ -243,7 +243,7 @@
|
||||
*/
|
||||
/datum/element/immerse/proc/try_unimmerse(atom/movable/movable, atom/movable/buckled)
|
||||
var/atom/movable/to_check = buckled || movable
|
||||
if(!(to_check.movement_type & (FLYING|FLOATING)) && !movable.throwing)
|
||||
if(!(to_check.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) && !movable.throwing)
|
||||
remove_immerse_overlay(movable)
|
||||
if(!buckled)
|
||||
UnregisterSignal(movable, list(COMSIG_MOVETYPE_FLAG_ENABLED, COMSIG_MOVETYPE_FLAG_DISABLED, COMSIG_MOVABLE_POST_THROW, COMSIG_MOVABLE_THROW_LANDED))
|
||||
@@ -256,7 +256,7 @@
|
||||
///Removes the overlay from mob and bucklees is flying.
|
||||
/datum/element/immerse/proc/on_move_flag_enabled(atom/movable/source, flag, old_movement_type)
|
||||
SIGNAL_HANDLER
|
||||
if(!(flag & (FLYING|FLOATING)) || old_movement_type & (FLYING|FLOATING) || source.throwing)
|
||||
if(!(flag & MOVETYPES_NOT_TOUCHING_GROUND) || (old_movement_type & MOVETYPES_NOT_TOUCHING_GROUND) || source.throwing)
|
||||
return
|
||||
remove_immerse_overlay(source)
|
||||
for(var/mob/living/buckled_mob as anything in source.buckled_mobs)
|
||||
@@ -265,7 +265,7 @@
|
||||
///Works just like on_move_flag_enabled, except it only has to check that movable isn't flying
|
||||
/datum/element/immerse/proc/on_throw(atom/movable/source)
|
||||
SIGNAL_HANDLER
|
||||
if(source.movement_type & (FLYING|FLOATING))
|
||||
if(source.movement_type & MOVETYPES_NOT_TOUCHING_GROUND)
|
||||
return
|
||||
remove_immerse_overlay(source)
|
||||
for(var/mob/living/buckled_mob as anything in source.buckled_mobs)
|
||||
@@ -274,7 +274,7 @@
|
||||
///Readds the overlay to the mob and bucklees if no longer flying.
|
||||
/datum/element/immerse/proc/on_move_flag_disabled(atom/movable/source, flag, old_movement_type)
|
||||
SIGNAL_HANDLER
|
||||
if(!(flag & (FLYING|FLOATING)) || source.movement_type & (FLYING|FLOATING) || source.throwing)
|
||||
if(!(flag & MOVETYPES_NOT_TOUCHING_GROUND) || (source.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) || source.throwing)
|
||||
return
|
||||
add_immerse_overlay(source)
|
||||
for(var/mob/living/buckled_mob as anything in source.buckled_mobs)
|
||||
@@ -283,7 +283,7 @@
|
||||
///Works just like on_move_flag_disabled, except it only has to check that movable isn't flying
|
||||
/datum/element/immerse/proc/on_throw_landed(atom/movable/source)
|
||||
SIGNAL_HANDLER
|
||||
if(source.movement_type & (FLYING|FLOATING))
|
||||
if(source.movement_type & MOVETYPES_NOT_TOUCHING_GROUND)
|
||||
return
|
||||
add_immerse_overlay(source)
|
||||
for(var/mob/living/buckled_mob as anything in source.buckled_mobs)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
/datum/status_effect/limp/proc/check_step(mob/whocares, OldLoc, Dir, forced)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(!owner.client || owner.body_position == LYING_DOWN || !owner.has_gravity() || (owner.movement_type & FLYING) || forced || owner.buckled)
|
||||
if(!owner.client || owner.body_position == LYING_DOWN || !owner.has_gravity() || (owner.movement_type & (FLYING|FLOATING)) || forced || owner.buckled)
|
||||
return
|
||||
|
||||
// less limping while we have determination still
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
for(var/obj/structure/structure_to_check in mob_turf)
|
||||
if(structure_to_check.density)
|
||||
return FALSE
|
||||
if(mob_to_check.movement_type & (FLYING|FLOATING))
|
||||
if(mob_to_check.movement_type & MOVETYPES_NOT_TOUCHING_GROUND)
|
||||
return FALSE
|
||||
|
||||
/datum/weather/floor_is_lava/weather_act(mob/living/victim)
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
return FALSE
|
||||
living_mob = on_who
|
||||
|
||||
if(living_mob?.incorporeal_move || on_who.movement_type & FLYING)
|
||||
if(living_mob?.incorporeal_move || (on_who.movement_type & MOVETYPES_NOT_TOUCHING_GROUND))
|
||||
return foot_on_mine ? IS_WEAKREF_OF(on_who, foot_on_mine) : FALSE //Only go boom if their foot was on the mine PRIOR to flying/phasing. You fucked up, you live with the consequences.
|
||||
|
||||
return TRUE
|
||||
|
||||
@@ -380,7 +380,7 @@
|
||||
. = ..()
|
||||
update_appearance()
|
||||
var/static/list/loc_connections = list(
|
||||
COMSIG_ATOM_ENTERED = PROC_REF(spring_trap),
|
||||
COMSIG_ATOM_ENTERED = PROC_REF(trap_stepped_on),
|
||||
)
|
||||
AddElement(/datum/element/connect_loc, loc_connections)
|
||||
|
||||
@@ -412,10 +412,23 @@
|
||||
update_appearance()
|
||||
playsound(src, 'sound/effects/snap.ogg', 50, TRUE)
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/proc/spring_trap(datum/source, atom/movable/target, thrown_at = FALSE)
|
||||
/obj/item/restraints/legcuffs/beartrap/proc/trap_stepped_on(datum/source, atom/movable/entering, ...)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
spring_trap(entering)
|
||||
|
||||
/**
|
||||
* Tries to spring the trap on the target movable.
|
||||
*
|
||||
* This proc is safe to call without knowing if the target is valid or if the trap is armed.
|
||||
*
|
||||
* Does not trigger on tiny mobs.
|
||||
* If ignore_movetypes is FALSE, does not trigger on floating / flying / etc. mobs.
|
||||
*/
|
||||
/obj/item/restraints/legcuffs/beartrap/proc/spring_trap(atom/movable/target, ignore_movetypes = FALSE)
|
||||
if(!armed || !isturf(loc) || !isliving(target))
|
||||
return
|
||||
|
||||
var/mob/living/victim = target
|
||||
if(istype(victim.buckled, /obj/vehicle))
|
||||
var/obj/vehicle/ridden_vehicle = victim.buckled
|
||||
@@ -424,12 +437,14 @@
|
||||
ridden_vehicle.visible_message(span_danger("[ridden_vehicle] triggers \the [src]."))
|
||||
return
|
||||
|
||||
//don't close the trap if they're as small as a mouse, or not touching the ground
|
||||
if(victim.mob_size <= MOB_SIZE_TINY || (!thrown_at && victim.movement_type & (FLYING|FLOATING)))
|
||||
//don't close the trap if they're as small as a mouse
|
||||
if(victim.mob_size <= MOB_SIZE_TINY)
|
||||
return
|
||||
if(!ignore_movetypes && (victim.movement_type & MOVETYPES_NOT_TOUCHING_GROUND))
|
||||
return
|
||||
|
||||
close_trap()
|
||||
if(thrown_at)
|
||||
if(ignore_movetypes)
|
||||
victim.visible_message(span_danger("\The [src] ensnares [victim]!"), \
|
||||
span_userdanger("\The [src] ensnares you!"))
|
||||
else
|
||||
@@ -477,7 +492,7 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/attack_hand(mob/user, list/modifiers)
|
||||
spring_trap(null, user)
|
||||
spring_trap(user)
|
||||
return ..()
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/energy/cyborg
|
||||
@@ -554,7 +569,7 @@
|
||||
|
||||
/obj/item/restraints/legcuffs/bola/energy/ensnare(atom/hit_atom)
|
||||
var/obj/item/restraints/legcuffs/beartrap/energy/cyborg/B = new (get_turf(hit_atom))
|
||||
B.spring_trap(null, hit_atom, TRUE)
|
||||
B.spring_trap(hit_atom, ignore_movetypes = TRUE)
|
||||
qdel(src)
|
||||
|
||||
/**
|
||||
|
||||
@@ -388,7 +388,7 @@ GLOBAL_LIST_INIT(plastitaniumglass_recipes, list(
|
||||
SIGNAL_HANDLER
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
if(!(L.movement_type & (FLYING|FLOATING)) || L.buckled)
|
||||
if(!(L.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) || L.buckled)
|
||||
playsound(src, 'sound/effects/footstep/glass_step.ogg', HAS_TRAIT(L, TRAIT_LIGHT_STEP) ? 30 : 50, TRUE)
|
||||
|
||||
/obj/item/shard/plasma
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
* * victim - whoever just slipped, point and laugh at them
|
||||
*/
|
||||
/obj/effect/decal/cleanable/traitor_rune/proc/slip(mob/living/victim)
|
||||
if(victim.movement_type & FLYING)
|
||||
if(victim.movement_type & MOVETYPES_NOT_TOUCHING_GROUND)
|
||||
return
|
||||
if (!victim.slip(slip_time, src, slip_flags))
|
||||
return
|
||||
|
||||
@@ -125,6 +125,7 @@
|
||||
m180.Turn(180)
|
||||
animate(target, transform = m180, time = 3)
|
||||
target.pixel_y = target.base_pixel_y + PIXEL_Y_OFFSET_LYING
|
||||
ADD_TRAIT(target, TRAIT_MOVE_UPSIDE_DOWN, REF(src))
|
||||
|
||||
/obj/structure/kitchenspike/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
|
||||
if(buckled_mob != user)
|
||||
@@ -156,6 +157,7 @@
|
||||
m180.Turn(180)
|
||||
animate(buckled_mob, transform = m180, time = 3)
|
||||
buckled_mob.pixel_y = buckled_mob.base_pixel_y + PIXEL_Y_OFFSET_LYING
|
||||
REMOVE_TRAIT(buckled_mob, TRAIT_MOVE_UPSIDE_DOWN, REF(src))
|
||||
|
||||
/obj/structure/kitchenspike/deconstruct(disassembled = TRUE)
|
||||
if(disassembled)
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
/obj/structure/railing/CanPass(atom/movable/mover, border_dir)
|
||||
. = ..()
|
||||
if(border_dir & dir)
|
||||
return . || mover.throwing || mover.movement_type & (FLYING | FLOATING)
|
||||
return . || mover.throwing || (mover.movement_type & MOVETYPES_NOT_TOUCHING_GROUND)
|
||||
return TRUE
|
||||
|
||||
/obj/structure/railing/CanAStarPass(to_dir, datum/can_pass_info/pass_info)
|
||||
@@ -144,7 +144,7 @@
|
||||
if (leaving.throwing)
|
||||
return
|
||||
|
||||
if (leaving.movement_type & (PHASING | FLYING | FLOATING))
|
||||
if (leaving.movement_type & (PHASING|MOVETYPES_NOT_TOUCHING_GROUND))
|
||||
return
|
||||
|
||||
if (leaving.move_force >= MOVE_FORCE_EXTREMELY_STRONG)
|
||||
|
||||
@@ -450,7 +450,7 @@
|
||||
check_break(M)
|
||||
|
||||
/obj/structure/table/glass/proc/check_break(mob/living/M)
|
||||
if(M.has_gravity() && M.mob_size > MOB_SIZE_SMALL && !(M.movement_type & FLYING))
|
||||
if(M.has_gravity() && M.mob_size > MOB_SIZE_SMALL && !(M.movement_type & MOVETYPES_NOT_TOUCHING_GROUND))
|
||||
table_shatter(M)
|
||||
|
||||
/obj/structure/table/glass/proc/table_shatter(mob/living/victim)
|
||||
|
||||
@@ -285,7 +285,7 @@
|
||||
return TRUE
|
||||
|
||||
/turf/open/handle_slip(mob/living/carbon/slipper, knockdown_amount, obj/slippable, lube, paralyze_amount, force_drop)
|
||||
if(slipper.movement_type & (FLYING | FLOATING))
|
||||
if(slipper.movement_type & MOVETYPES_NOT_TOUCHING_GROUND)
|
||||
return FALSE
|
||||
if(!has_gravity(src))
|
||||
return FALSE
|
||||
@@ -446,4 +446,3 @@
|
||||
|
||||
playsound(src, 'sound/weapons/genhit.ogg', 50, TRUE)
|
||||
new /obj/structure/girder/tram(src)
|
||||
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
. = TRUE
|
||||
|
||||
/turf/open/lava/proc/can_burn_stuff(atom/movable/burn_target)
|
||||
if(burn_target.movement_type & (FLYING|FLOATING)) //you're flying over it.
|
||||
if(burn_target.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) //you're flying over it.
|
||||
return LAVA_BE_IGNORING
|
||||
|
||||
if(isobj(burn_target))
|
||||
@@ -265,7 +265,7 @@
|
||||
var/mob/living/burn_living = burn_target
|
||||
var/atom/movable/burn_buckled = burn_living.buckled
|
||||
if(burn_buckled)
|
||||
if(burn_buckled.movement_type & (FLYING|FLOATING))
|
||||
if(burn_buckled.movement_type & MOVETYPES_NOT_TOUCHING_GROUND)
|
||||
return LAVA_BE_PROCESSING
|
||||
if(isobj(burn_buckled))
|
||||
var/obj/burn_buckled_obj = burn_buckled
|
||||
|
||||
@@ -189,7 +189,7 @@
|
||||
if(armed)
|
||||
if(ismob(AM))
|
||||
var/mob/MM = AM
|
||||
if(!(MM.movement_type & FLYING))
|
||||
if(!(MM.movement_type & MOVETYPES_NOT_TOUCHING_GROUND))
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.move_intent == MOVE_INTENT_RUN)
|
||||
|
||||
@@ -296,7 +296,7 @@
|
||||
return
|
||||
if(isliving(movable))
|
||||
var/mob/living/crusher = movable
|
||||
if(crusher.move_intent != MOVE_INTENT_WALK && (!(crusher.movement_type & (FLYING|FLOATING)) || crusher.buckled))
|
||||
if(crusher.move_intent != MOVE_INTENT_WALK && (!(crusher.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) || crusher.buckled))
|
||||
playsound(src, 'sound/effects/footstep/glass_step.ogg', 30, TRUE)
|
||||
visible_message(span_warning("[crusher] steps on [src], damaging it!"))
|
||||
take_damage(100, sound_effect = FALSE)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(!iscarbon(target) || blocked >= 100)
|
||||
return
|
||||
var/obj/item/restraints/legcuffs/beartrap/mega_arachnid/restraint = new(get_turf(target))
|
||||
restraint.spring_trap(null, target)
|
||||
restraint.spring_trap(target)
|
||||
|
||||
/obj/item/restraints/legcuffs/beartrap/mega_arachnid
|
||||
name = "fleshy restraints"
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
/// Called when something enters our turf, if it is a non-flying mob then give it a stab
|
||||
/obj/effect/temp_visual/thrusting_spines/proc/on_entered(datum/source, atom/movable/arrived)
|
||||
if (!active || !isliving(arrived) || (arrived.movement_type & (FLYING | FLOATING)))
|
||||
if (!active || !isliving(arrived) || (arrived.movement_type & MOVETYPES_NOT_TOUCHING_GROUND))
|
||||
return
|
||||
if (!COOLDOWN_FINISHED(src, thrust_delay))
|
||||
return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/carbon/slip(knockdown_amount, obj/slipped_on, lube_flags, paralyze, force_drop = FALSE)
|
||||
if(movement_type & (FLYING | FLOATING))
|
||||
if(movement_type & MOVETYPES_NOT_TOUCHING_GROUND)
|
||||
return FALSE
|
||||
if(!(lube_flags & SLIDE_ICE))
|
||||
log_combat(src, (slipped_on || get_turf(src)), "slipped on the", null, ((lube_flags & SLIDE) ? "(SLIDING)" : null))
|
||||
|
||||
@@ -1241,6 +1241,7 @@
|
||||
if(-INFINITY to NEGATIVE_GRAVITY)
|
||||
if(!istype(gravity_alert, /atom/movable/screen/alert/negative))
|
||||
throw_alert(ALERT_GRAVITY, /atom/movable/screen/alert/negative)
|
||||
ADD_TRAIT(src, TRAIT_MOVE_UPSIDE_DOWN, NEGATIVE_GRAVITY_TRAIT)
|
||||
var/matrix/flipped_matrix = transform
|
||||
flipped_matrix.b = -flipped_matrix.b
|
||||
flipped_matrix.e = -flipped_matrix.e
|
||||
@@ -1265,6 +1266,7 @@
|
||||
if(istype(gravity_alert, /atom/movable/screen/alert/weightless))
|
||||
REMOVE_TRAIT(src, TRAIT_MOVE_FLOATING, NO_GRAVITY_TRAIT)
|
||||
if(istype(gravity_alert, /atom/movable/screen/alert/negative))
|
||||
REMOVE_TRAIT(src, TRAIT_MOVE_UPSIDE_DOWN, NEGATIVE_GRAVITY_TRAIT)
|
||||
var/matrix/flipped_matrix = transform
|
||||
flipped_matrix.b = -flipped_matrix.b
|
||||
flipped_matrix.e = -flipped_matrix.e
|
||||
|
||||
@@ -288,6 +288,7 @@
|
||||
RegisterSignal(mod.wearer, COMSIG_MOVABLE_MOVED, PROC_REF(check_upstairs))
|
||||
RegisterSignal(mod.wearer, COMSIG_MOB_SAY, PROC_REF(on_talk))
|
||||
ADD_TRAIT(mod.wearer, TRAIT_SILENT_FOOTSTEPS, MOD_TRAIT)
|
||||
passtable_on(mod.wearer, MOD_TRAIT)
|
||||
check_upstairs() //todo at some point flip your screen around
|
||||
|
||||
/obj/item/mod/module/atrocinator/on_deactivation(display_message = TRUE, deleting = FALSE)
|
||||
@@ -304,6 +305,7 @@
|
||||
UnregisterSignal(mod.wearer, COMSIG_MOB_SAY)
|
||||
step_count = 0
|
||||
REMOVE_TRAIT(mod.wearer, TRAIT_SILENT_FOOTSTEPS, MOD_TRAIT)
|
||||
passtable_off(mod.wearer, MOD_TRAIT)
|
||||
var/turf/open/openspace/current_turf = get_turf(mod.wearer)
|
||||
if(istype(current_turf))
|
||||
current_turf.zFall(mod.wearer, falling_from_move = TRUE)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
if(!isliving(moving_atom))
|
||||
return
|
||||
var/mob/living/moving_mob = moving_atom
|
||||
if(!(moving_mob.movement_type & (FLYING|FLOATING)) || moving_mob.buckled)
|
||||
if(!(moving_mob.movement_type & MOVETYPES_NOT_TOUCHING_GROUND) || moving_mob.buckled)
|
||||
playsound(src, 'sound/effects/footstep/glass_step.ogg', HAS_TRAIT(moving_mob, TRAIT_LIGHT_STEP) ? 30 : 50, TRUE)
|
||||
if(status == LIGHT_BURNED || status == LIGHT_OK)
|
||||
shatter(moving_mob)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
new/obj/item/restraints/legcuffs/beartrap/energy(get_turf(loc))
|
||||
else if(iscarbon(target))
|
||||
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy(get_turf(target))
|
||||
B.spring_trap(null, target)
|
||||
B.spring_trap(target)
|
||||
. = ..()
|
||||
|
||||
/obj/projectile/energy/trap/on_range()
|
||||
@@ -88,7 +88,7 @@
|
||||
qdel(src)
|
||||
if(iscarbon(target))
|
||||
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy/cyborg(get_turf(target))
|
||||
B.spring_trap(null, target)
|
||||
B.spring_trap(target)
|
||||
QDEL_IN(src, 10)
|
||||
. = ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user