mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-28 06:27:26 +01:00
* 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
46 lines
2.3 KiB
Plaintext
46 lines
2.3 KiB
Plaintext
//Vehicle control flags. control flags describe access to actions in a vehicle.
|
|
|
|
///controls the vehicles movement
|
|
#define VEHICLE_CONTROL_DRIVE (1<<0)
|
|
///Can't leave vehicle voluntarily, has to resist.
|
|
#define VEHICLE_CONTROL_KIDNAPPED (1<<1)
|
|
///melee attacks/shoves a vehicle may have
|
|
#define VEHICLE_CONTROL_MELEE (1<<2)
|
|
///using equipment/weapons on the vehicle
|
|
#define VEHICLE_CONTROL_EQUIPMENT (1<<3)
|
|
///changing around settings and the like.
|
|
#define VEHICLE_CONTROL_SETTINGS (1<<4)
|
|
|
|
///ez define for giving a single pilot mech all the flags it needs.
|
|
#define FULL_MECHA_CONTROL ALL
|
|
|
|
//Ridden vehicle flags
|
|
|
|
/// Does our vehicle require arms to operate? Also used for piggybacking on humans to reserve arms on the rider
|
|
#define RIDER_NEEDS_ARMS (1<<0)
|
|
// As above but only reserves 1 arm instead of 2
|
|
#define RIDER_NEEDS_ARM (1<<1)
|
|
/// Do we need legs to ride this (checks against TRAIT_FLOORED)
|
|
#define RIDER_NEEDS_LEGS (1<<2)
|
|
/// If the rider is disabled or loses their needed limbs, do they fall off?
|
|
#define UNBUCKLE_DISABLED_RIDER (1<<3)
|
|
/// Do we need a carbon, a silicon, or a small mob, to ride the vehicle?
|
|
#define RIDER_CARBON_OR_SILICON_NO_LARGE_MOBS (1<<4)
|
|
|
|
/// The vehicle being ridden requires pixel offsets for all directions
|
|
#define RIDING_OFFSET_ALL "ALL"
|
|
|
|
/// Compensating for time dilation
|
|
GLOBAL_VAR_INIT(glide_size_multiplier, 1.0)
|
|
|
|
///Broken down, here's what this does:
|
|
/// divides the world icon_size (32) by delay divided by ticklag to get the number of pixels something should be moving each tick.
|
|
/// The division result is given a min value of 1 to prevent obscenely slow glide sizes from being set
|
|
/// Then that's multiplied by the global glide size multiplier. 1.25 by default feels pretty close to spot on. This is just to try to get byond to behave.
|
|
/// The whole result is then clamped to within the range above.
|
|
/// Not very readable but it works
|
|
#define DELAY_TO_GLIDE_SIZE(delay) (clamp(((world.icon_size / max((delay) / world.tick_lag, 1)) * GLOB.glide_size_multiplier), MIN_GLIDE_SIZE, MAX_GLIDE_SIZE))
|
|
|
|
///Similar to DELAY_TO_GLIDE_SIZE, except without the clamping, and it supports piping in an unrelated scalar
|
|
#define MOVEMENT_ADJUSTED_GLIDE_SIZE(delay, movement_disparity) (world.icon_size / ((delay) / world.tick_lag) * movement_disparity * GLOB.glide_size_multiplier)
|